-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix checking of PR status #10085
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 checking of PR status #10085
Conversation
This was previously checking the status of the build object, but I think we want to check the status that is passed in, and only link to the built docs when the build was successful.
|
||
if build.state in BUILD_FINAL_STATES and build.success: | ||
if status == BUILD_STATUS_SUCCESS: |
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.
@humitos I think this is actually what we want? Basically just check if the status was success, then link to the built docs?
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.
Yeah, I think so 😅
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.
Makes sense, BUILD_STATUS_SUCCESS
!= BUILD_STATE_FINISHED
- the previous implementation wouldn't find its way to get_absolute_url()
on "success"
because it compared it with a build state "finished"
👍
I like the attempt to differentiate between "state" and "status", but I'm not advanced enough in the English language to know what the difference would be.. but I get that it has different definitions in the code base 👍
test failures seem legit |
He, we had have some talks about this and I dislike these words because for me they are synonymous 😅 . Besides, they also look pretty similar at first sight and I never know what each of them mean without context. In any case, this topic is un-related from this PR, but just wanted to make my own note about this 😄 |
I was mostly just cleaning up the usage, since the code was using them interchangably, as well 🙃 |
I'm not 100% sure whats happening on tests, will have to dive into that a bit deeper. |
I'm holding off on this, because it's not a huge priority, and my sprint is getting slammed. If anyone is excited to finish this up, feel free to get the tests passing. |
Testing this on a local setup with GitHub OAuth and webhook delivery to local development environment... but getting
|
Tested that using positional arguments for I'm suspecting that Celery validates arguments differently from how Python can use positional arguments by name. |
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.
Judging from local testing, we need to use positional arguments because of Celery.
I fixed the tests to match this.
If there's anything else you'd like to add, LMK.. I can test locally.
Just verified the last thing that came cross my mind: All other services with a |
Auto-merge vs. merge vs. linting 🙃 |
This was previously checking the status of the build object,
but I think we want to check the status that is passed in,
and only link to the built docs when the build was successful.
Fixes #10018