fix: improving geolite workflow#37706
Conversation
|
When using github.sha, the workflow passes the first time, but fails when rerun because it throws a “fetch first” error. This happens because the PR created by the previous successful workflow run is still open or unmerged, so the branch already exists. Use github.sha never changes when you rerun the workflow on the same commit, the workflow kept generating the same branch name, the push failed with a “fetch first” error. |
|
@ktyagiapphelix2u can you give me some more info? Doesn't that just mean that a PR already exists that should get merged instead of making a new one? Or is the goal here to replace the old PR with a new one because the old one is out of date? |
|
@feanil Since github.sha doesn’t change when rerunning the workflow on the same commit, the workflow kept generating the same branch name, causing the push to fail with a “fetch first” error. https://2u-internal.atlassian.net/browse/BOMS-267 |
|
So is the issue you're trying to fix, that a PR is created with a version of the geolite database that's out of date? And you want to create a new PR manually but there have been no updates to the platform in the intervening time and the branch name you're trying to use already exists? The change seems harmless enough but I'm trying to understand the motivation behind the issue because I haven't run into why you need to keep re-running the workflow manually if a PR already exists. Why not merge the PR and then re-run to get further updates? |
|
@feanil Since this is an enhancement, I was considering it for future improvement. As you mentioned, it's harmless, so we can proceed with it. Otherwise, it's fine to leave things as they are and close the PR. Thanks. |
Description
We changed the branch name logic because the workflow regenerated the same branch name on reruns (since it was based on github.sha), causing GitHub to reject the push with “fetch first” because the branch already existed on the remote.