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: unbreak upload retries (two bugs) #71

Merged
merged 2 commits into from
Aug 17, 2023
Merged

Conversation

matt-codecov
Copy link
Contributor

UploadTask retries seem to be broken and i'm not sure how long ago they broke

first problem

the first problem is in tasks/base.py: celery's apply_async() function takes an options dict which may have a "headers" key. i believe it's None by default (docs aren't explicit) and as a result we attempt **None which errors with:

'NoneType' object is not a mapping

the fix for this problem is straightforward

second problem

second problem was recently introduced (by me). by changing self.retry() to self.retry(args=args, kwargs=kwargs), i excluded the repoid and commitid arguments which led to an exception in celery_task_router.py:

_get_user_plan_from_repoid() missing 1 required positional argument: 'repoid'

strangely, the clearest fix for a missing positional argument is... to add it to kwargs. regular args are not plumbed through to celery_task_router.py, and i tried to plumb them through but i just don't have the tools (read: static type system) to be confident i caught all the task operations that need to be updated.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link
Contributor

@giovanni-guidini giovanni-guidini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 🙏

@matt-codecov matt-codecov changed the title Matt/fix upload retries 2 fix: unbreak upload retries (two bugs) Aug 17, 2023
@matt-codecov matt-codecov merged commit ae66235 into main Aug 17, 2023
12 checks passed
@matt-codecov matt-codecov deleted the matt/fix-upload-retries-2 branch August 17, 2023 20:44
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.

None yet

2 participants