-
Notifications
You must be signed in to change notification settings - Fork 0
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
Action does not properly handle rebases #3
Comments
Here are the two unrelated commmits: uclahs-cds/pipeline-generate-SQC-BAM@d1c56e3 |
From Nick's comment:
This is essentially what happened.
We can see the steps play out by examining the comments in this PR and the action log:
The problem seems to be with step 2, in that the previous commit SHA GitHub gives to the action is no longer valid. |
@aholmes does that mean that this will happen every time a rebase occurs in a repository with this action and an image? |
I'm wondering about that. I haven't seen this before, but this observation does seem like it would occur every time. I'm not certain whether I missed a specific detail. |
Wait, why did the workflow even run in the first place? ---
name: PlantUML Generation
on:
push:
paths:
- '**.puml'
workflow_dispatch: The dependabot PR shouldn't have included any PlantUML files... |
The rebase includes PUML files (and the PlantUML action addition itself). |
I'm considering changing the action to test whether the previous commit SHA is valid and, if it isn't, defaulting to the "every PUML file" mode rather than attempting to include only the PUML files since the last push. |
There's some weirdness bandying about here - the actual commit itself (uclahs-cds/pipeline-generate-SQC-BAM@9d91432) includes no PlantUML files. Comparing the old/abandoned commit and the new one (https://github.com/uclahs-cds/pipeline-generate-SQC-BAM/compare/d1c56e3ab79e4534a825b8e19f3c5d1bf339edd9..9d914328d0782e17f7c41257e9cc2131734c174b) shows that a PlantUML file was added, but that's not part of this pull request. I would have thought the workflow filter would care about the changes relative to the mergee-branch (https://github.com/uclahs-cds/pipeline-generate-SQC-BAM/compare/0a5aae07cdb53c7da6977f682f46c0d73f3f5ca0..9d914328d0782e17f7c41257e9cc2131734c174b). Weird! I agree though that this is a super-edge case where a new PlantUML file appears in the commits jumped by a rebase. I also agree that including a valid SHA check is fair. |
Yeah, I'm not sure I can speak to exactly what's going on there beyond speculation. Observing this shows that there is the possibility that Actions treats a rebase as a big chunk of changes rather than just a rebase. Whether that's true, it should be safe for us to act like that's the case, and code accordingly. |
Ahh, okay, this isn't a "pull request" workflow, it's just a workflow. There's no concept of a "mergee-branch" (whatever the proper name for that is) - it only has reference to the last known commit, hence why the PlantUML file appears new. |
Ah - good point. Yes, this Action considers everything from the last push. So the issue is there. :) |
@nwiltsie suggested using https://docs.github.com/en/webhooks/webhook-events-and-payloads#push and the |
Originally posted by @sorelfitzgibbon in uclahs-cds/pipeline-generate-SQC-BAM#22 (comment)
The text was updated successfully, but these errors were encountered: