Skip to content

Commit

Permalink
fix: handle new flake model (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry authored Dec 16, 2024
1 parent 0f8147b commit 536c4e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion database/models/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ def id(self):
return self.id_


class Flake(CodecovBaseModel, MixinBaseClassNoExternalID):
class Flake(CodecovBaseModel):
__tablename__ = "reports_flake"
id_ = Column("id", types.BigInteger, primary_key=True)
repoid = Column(types.Integer, ForeignKey("repos.repoid"))
repository = relationship("Repository", backref=backref("flakes"))

Expand All @@ -367,6 +368,10 @@ class Flake(CodecovBaseModel, MixinBaseClassNoExternalID):
start_date = Column(types.DateTime)
end_date = Column(types.DateTime, nullable=True)

@property
def id(self):
return self.id_


class DailyTestRollup(CodecovBaseModel, MixinBaseClassNoExternalID):
__tablename__ = "reports_dailytestrollups"
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
https://github.com/codecov/test-results-parser/archive/c840502d1b4dd7d05b2efc2c1328affaf2acd27c.tar.gz#egg=test-results-parser
https://github.com/codecov/shared/archive/e41a4a1d4dd4efe44a917b47032f1a0d73775426.tar.gz#egg=shared
https://github.com/codecov/shared/archive/2674ae99811767e63151590906691aed4c5ce1f9.tar.gz#egg=shared
https://github.com/codecov/timestring/archive/d37ceacc5954dff3b5bd2f887936a98a668dda42.tar.gz#egg=timestring
asgiref>=3.7.2
analytics-python==1.3.0b1
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ sentry-sdk==2.13.0
# shared
setuptools==75.6.0
# via nodeenv
shared @ https://github.com/codecov/shared/archive/e41a4a1d4dd4efe44a917b47032f1a0d73775426.tar.gz#egg=shared
shared @ https://github.com/codecov/shared/archive/2674ae99811767e63151590906691aed4c5ce1f9.tar.gz#egg=shared
# via -r requirements.in
six==1.16.0
# via
Expand Down

0 comments on commit 536c4e0

Please sign in to comment.