-
Notifications
You must be signed in to change notification settings - Fork 549
cinder returns 201 for override decision #23708
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
cinder returns 201 for override decision #23708
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: src/olympia/abuse/cinder.py
Did you find this useful? React with a 👍 or 👎 |
@@ -2986,7 +2986,7 @@ def _test_report_to_cinder( | |||
responses.POST, | |||
f'{settings.CINDER_SERVER_URL}decisions/{overridden_id}/override/', | |||
json={'uuid': uuid.uuid4().hex}, | |||
status=200, |
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.
Can we have at least one test returning 200 so that we know our logic doesn't care about the specific code.?
I believe this failure is due to the fact that this PR comes from a fork where the I've already made a patch to fix that but could you define that variable to any non empty string to see if it fixes the issue (proving what I think is wrong is what is wrong)
should do it. Then rerun the CI. |
I ran |
They are indeed set on the repo, but in this case there are 2 repos, yours and the origin. It looks like what is happening is that on the My patch fixes the issue by making the workflow able to run if the variables are not defined, like in a fork PR. |
FYI I wouldn't let the bug or my patch delay this patch. As long as all of the other CI is passing, the commit will build just fine on the push since that runs on the origin repo. |
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.
Make sure to make at least one of the tests return 200 so we know the error handling is enforced to be lazy.
399f32f did that |
* cinder returns 201 for override decision * relax status code check * one test returning 200 so that we know our logic doesn't care about the specific code
Fixes: mozilla/addons#15734
Description
Relaxes the status code enforcement we have for a decision request to Cinder, to only raise for >=400 error codes.
Context
See issue. Cinder originally implemented the override decision endpoint to return a 200, rather than a 201 for the other decision endpoints. Now it's returning a 201.
Testing
It's such a trivial change it doesn't really need testing, but if you want to:
https://mozilla-staging.cinderapp.com/api/v1/
Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.