Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle new flake model #958

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
start_date = Column(types.DateTime)
end_date = Column(types.DateTime, nullable=True)

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

Check warning on line 373 in database/models/reports.py

View check run for this annotation

Codecov Notifications / codecov/patch

database/models/reports.py#L373

Added line #L373 was not covered by tests


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
Loading