Skip to content
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

Bot re-rendering pushes empty commit (related to GHA automerge changes) #706

Open
jakirkham opened this issue May 14, 2024 · 3 comments
Open

Comments

@jakirkham
Copy link
Member

Asked the bot to re-render in this PR comment: conda-forge/cuda-nvtx-feedstock#13 (comment)

Instead of pushing changes or noting that no changes could be made, it pushed an empty commit: conda-forge/cuda-nvtx-feedstock@0228ab7

Looking at the bot's logs in more detail ( conda-forge/cuda-nvtx-feedstock#13 (comment) ), it appears to have tried to make some kind of change in an initial commit. However it then made a follow up commit, which was pushed. That follow up commit was empty

When trying locally ( conda-forge/cuda-nvtx-feedstock#13 (comment) ), it appears that conda-smithy is updating the GHA automerge workflow. This works ok locally

Not sure why the bot loses these changes and pushes an empty commit instead

@beckermr
Copy link
Member

This all appears correct. The token used when rerendering cannot push changes to GitHub workflows. The rerender job runs smithy. Then it checks if any changes to the workflows have been made. If there are changes to the workflows, it reverts them for just those files. Then the rerender job pushes a commit.

So in this case, since this pr was made before we migrated the workflows, the files on the pr branch are behind. Thus even if the rerender produces those changes, they won't get pushed because our infrastructure can't.

@jakirkham
Copy link
Member Author

Instead of pushing an empty commit, could the bot leave a comment to tell the user that they might need to do something?

@beckermr
Copy link
Member

The empty commit is just because there were not any other changes in the rerender. Usually there are other changes and so the commit is not empty.

Anyone should feel free to add code to detect if the commit will be empty and to warn instead of pushing. One should also add code to warn folks that changes were backed out and that they should rerender and push by hand or try to merge upstream into their branch.

@beckermr beckermr transferred this issue from conda-forge/webservices-dispatch-action Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants