-
Notifications
You must be signed in to change notification settings - Fork 10
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
disable populating log_context based on commit_sha/commit_id #977
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
✅ All tests successful. No failed tests were found. 📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
|
||
# repo_id is enough to get repo and owner | ||
elif self.repo_id: | ||
if self.repo_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the intent here is to reenables the log context without the commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
the stated problem is that populating the log context slammed the commit table. turns out if we don't query the commit table the only thing we are likely to lose is the DB PK of the commit which we don't tend to use anyway. so this PR stops querying the commit table
this may just move the problem, and we should maybe do the followup described in the PR description anyway
followup task for the model reuse codecov/engineering-team#3140 |
apparently populating the log context was slamming the commit table. so this PR stops using the commit table when populating log context
previously:
commit_id
orcommit_sha
+repo_id
were available, query the commits table to populate every fieldcommit_id
(the DB PK for the commit)now:
commit_id
andcommit_sha
will be set if available but not used to query anything elserepo_id
is available, that will take care of populating the repo + ownerit's possible this will just move the problem to the repos table. if that is the case, it's solvable but will take a little elbow grease:
populate_from_sqlalchemy()
inhelpers/log_context.py
intopopulate_log_context(kwargs) -> (Commit, Repository, Owner)
intasks/base.py
run_impl()
stub toBaseCodecovTask
which takesowner
,commit
, andrepo
kwargs, make all task subclasses accept the same (with defaultNone
) valuesfollow-up issue for model reuse: codecov/engineering-team#3140