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

feat: update pull and branch head in commit update #915

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

joseph-sentry
Copy link
Contributor

@joseph-sentry joseph-sentry commented Nov 27, 2024

we want to eventually replace the db triggers that exist to update the pull head and branch head when a commit is either inserted or updated

as a first step we want to duplicate the logic that those db triggers run in this commit update task which should run whenever a commit is inserted

the second step will be to run this task when a commit object is updated which is usually when we receive a webhook from github with some new information about a commit

the last step will be to remove the newly redundant db triggers

Fixes: https://github.com/codecov/internal-issues/issues/1027

we want to eventually replace the db triggers that exist to update the
pull head and branch head when a commit is either inserted or
updated

as a first step we want to duplicate the logic that those db triggers
run in this commit update task which should run whenever a commit is
inserted

the second step will be to run this task when a commit object is updated
which is usually when we recieve a webhook from github with some new
information about a commit

the last step will be to remove the newly redundant db triggers
Copy link

sentry-io bot commented Nov 27, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: tasks/commit_update.py

Function Unhandled Issue
run_impl TypeError: argument of type 'NoneType' is not iterable app.tasks.commit_update.Commit...
Event Count: 8.4k
run_impl TypeError: can't compare offset-naive and offset-aware datetimes app.tasks.commit_upd...
Event Count: 1.3k

Did you find this useful? React with a 👍 or 👎

@joseph-sentry joseph-sentry marked this pull request as draft November 27, 2024 20:59
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.97%. Comparing base (f7c3aad) to head (09292b5).
Report is 7 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/commit_update.py 85.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #915      +/-   ##
==========================================
- Coverage   97.98%   97.97%   -0.01%     
==========================================
  Files         446      446              
  Lines       35602    35668      +66     
==========================================
+ Hits        34884    34946      +62     
- Misses        718      722       +4     
Flag Coverage Δ
integration 42.11% <94.11%> (+0.09%) ⬆️
unit 90.68% <11.76%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@codecov-notifications
Copy link

Codecov Report

Attention: Patch coverage is 94.11765% with 4 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/commit_update.py 85.18% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@joseph-sentry joseph-sentry marked this pull request as ready for review November 28, 2024 14:25
@joseph-sentry joseph-sentry requested a review from a team November 28, 2024 14:25
@joseph-sentry joseph-sentry added this pull request to the merge queue Dec 2, 2024
Merged via the queue into main with commit d493782 Dec 2, 2024
18 of 27 checks passed
@joseph-sentry joseph-sentry deleted the joseph/commit-update-once-again branch December 2, 2024 17:12
Copy link

sentry-io bot commented Dec 3, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pulls_repoid_pu... app.tasks.commit_update.CommitUpdate View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants