-
Notifications
You must be signed in to change notification settings - Fork 7
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 #234: GitHub action api verification #246
Conversation
@robnagler ready for review |
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.
I think this is ok, but I would like to resolve the conditional complexity.
pykern/pkcli/github.py
Outdated
s = b.commit.sha | ||
c = [c.conclusion for c in b.commit.check_runs()] | ||
if not c: | ||
pkcli.command_error("No workflow runs for 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.
Include branch name and sha. Watch for repetition when you do this to the next error message to.
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.
What do you mean by watch for repetition? Should I just print branch name and sha once before all the error checking?
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.
First step is add the branch and sha to all messages. Then, see what patterns repeat. Then, simplify the repetition.
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.
pksubprocess_test keeps randomly failing on this pr. Do you know what might be causing it?
=================================== FAILURES ===================================
_________________________ test_check_call_with_signals _________________________
Traceback (most recent call last):
File "/home/runner/work/pykern/pykern/tests/pksubprocess_test.py", line 65, in test_check_call_with_signals
pksubprocess.check_call_with_signals(cmd, output=o, msg=msg)
File "/home/vagrant/.pyenv/versions/3.7.2/envs/py3/lib/python3.7/site-packages/_pytest/python_api.py", line 966, in __exit__
fail(self.message)
File "/home/vagrant/.pyenv/versions/3.7.2/envs/py3/lib/python3.7/site-packages/_pytest/outcomes.py", line 196, in fail
raise Failed(msg=reason, pytrace=pytrace)
Failed: DID NOT RAISE <class 'RuntimeError'>
============================== 1 failed in 10.15s ==============================
error: FAILED=1 passed=37
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.
No, I don't. How would you instrument pksubrocess_test to debug this? How would you debug this more easily?
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.
I think the failing test is unrelated to the changes in this pr, so I can make an issue for it. This pr is ready for re-review. ea3c408
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.
That's what I was looking for.
fix #234: GitHub Action verification that HEAD's SHA has passed all actions
Here is something functional. Looking forward to feedback.
pykern github: error: unrecognized arguments: main