-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add tox -e lint
to GHA
#2412
base: master
Are you sure you want to change the base?
Add tox -e lint
to GHA
#2412
Conversation
6dd062b
to
e1e8e31
Compare
If you check the build, you can see that the step updated the |
If you do it like this, the files will be formatted wrongly in version control.. you have to: run the Linter and push the updated file to the branch! |
44943c6
to
cd0e581
Compare
f09d6e3
to
b296cb6
Compare
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.
Excellent!
@erik-whiting I approve, is this ok to merge? |
@matentzn no I don't think so. notice that the checks are still "Waiting for status to be reported." Something about the changes here are causing the checks to hang and I need to figure out why before merging or this will happen on every PR |
QC cannot run in response to a commit generated by GHA I think.. So if a change to a branch was induced by a GHA, then no other actions are run to avoid infinite snowballing |
oh I see, let's merge then 🤞 |
The problem is though that we will never know then if the PR is broken for other reasons... I think the solution is to combine both actions (qc and lint), first run the lint, then the qc pipeline (make sure though you "check out" again). But I am not sure how these cases are solved, you may need to reach out to your colleagues or chatgpt: "I have a GHA that updates my branch with a linter, and a GHA that runs a validation for my code - what is the best practice to make sure that the branch is first updated, then validated?" |
@matentzn See the screenshot below Is this what you mean by the PR being "broken for other reasons?" Notice that GitHub indicates which action it was that failed. So in the screenshot you can see that the PR passed the lint check but failed the validation step because the |
As long as the QC is run AFTER the lint is applied, we are good! Is that the case? |
@erik-whiting did you see Nico's question? |
I saw his question and took some initial stabs at making it the way Nico wants but I have been really busy with work and school |
Ok, no worries! You do a ton of volunteer work for OBO Foundry and we are grateful for whatever you have time for. 🙏 |
@erik-whiting until you find some time to respond (good luck with your stuff) I will move this PR to "draft" |
Have spent some time thinking about this on and off over the past few weeks. I think that maybe the solution which makes everyone happy is something like: an auto-formatter action that runs the tox format task, then runs the tox QA task. If the QA task passes, it commits, but if it fails, then the Action reports a failure (probably the user has accidentally submitted some malformed YAML or something). My outstanding question, for my own reference, is how to deal with this annoying "waiting for status to be reported" hangup -- if tests can't run from GitHub Actions-created PRs, I'd rather they don't show up at all, rather than showing up in an "infinite deferral" status. |
What if the QC check:
that way the trigger is the usual (manual curation), and the qc is just "the last step" of the QC pipeline. |
Resolves #2369