-
Notifications
You must be signed in to change notification settings - Fork 4
Consolidate the sync-*
workflows
#12
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
Conversation
In the upcoming work to support a project other than Git, we will need to synchronize a different upstream repository to a different "PR repository". To that end, let's consolidate `sync-git-gui` and `sync-gitster-git` into a single, matrix workflow that will continue to synchronize the Git GUI and the fine-grained branches from `gitster/git` to `gitgitgadget/git`, but can be overridden in another fork of `gitgitgadget-workflows` via a repository variable that contains the project config to perform the equivalent job of synchronizing upstream branches into the repository where GitGitGadget handles the Pull Requests for said project. This is step 1 to support that: renaming the `sync-git-gui` workflow to `sync-upstream-branches`. Subsequent commits will transmogrify that workflow into the desired shape. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The workflow still only handles the `git-gui` branches, but is now almost generic enough to become a matrix workflow that also handles the `gitster/git` synchronization. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This still does the exact same thing, but avoids storing intermediate states of the `data` array's transformation. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…orkflow With a few touch-ups, the workflow can become generic enough to handle also the synchronization of `gitster/git`'s branches to `gitgitgadget/git`. The overall goal, of course, is to prepare for supporting projects other than Git, via configurations stored in repository variables. That's the task of the next commit(s). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
I want to use the same workflow in a fork to synchronize _Cygwin's_ mailing list mirror; Let's rename the workflow and its job so that it stops claiming to synchronize _Git's_ mailing list mirror. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rather than hard-coding the exact minutes at which the workflow should run, just specify that it should run every five minutes, and leave it to GitHub to figure out the specifics. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
36d1292
to
3c327fc
Compare
I also noticed that it makes no sense to introduce kebap-cased matrix variables only to switch them to CamelCased ones later. Instead, I now introduce CamelCased ones right away. Range-diff
|
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'll let you complete this so you can control the timing.
Authorization is hard. So hard, in fact, that it seems that (maybe due to incorrect optimizations?) pushes to GitHub with an installation access token that has _just_ been obtained sometimes fail with a 403, even though it seems that a re-run "fixes" the problem. The first instances of this problem was https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/runs/17543752351/job/49820347084#step:6:11 on Sep 8, 2025, 9:52 AM GMT+2: Run git push ***github.com/$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH remote: Permission to gitgitgadget/git-mailing-list-mirror.git denied to gitgitgadget[bot]. fatal: unable to access 'https://github.com/gitgitgadget/git-mailing-list-mirror/': The requested URL returned error: 403 Error: Process completed with exit code 128. This happened relatively shortly after I had merged gitgitgadget#12 on Sep 5, 2025, 7:55 AM GMT+2, and there were 30 such occurrences of denied pushes due to apparently not-yet-valid installation tokens in https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml (which isn't bad, given that there have been 1,892 runs of that workflow since Sep 5, 8:44 AM GMT+2, as of time of writing). So it _might_ seem as if the flake has something to do with this change, but then, it occurs too rarely to be _caused_ by that change, _and_ it seems to happen a tad more frequently than once a day _but_ started 3 days after merging that PR. As I stated above, I have come to the conclusion that it is something on GitHub's side where they changed something on their side that _sometimes_ lets installation access tokens be _not quite ready for pushing_ for a little while right after the tokens have been issued. Corroborating evidence for that suspicion are the 8 occurrences of the same issue in the sister repository I established for Cygwin: https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml And in that repository, essentially the same workflow had been running a quite a few days longer _without_ any issues, more concretely, it has done its job without problems since Aug 30, 2025, 6:40 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17346140096 until it failed for the first time on Sep 22, 2025, 7:24 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17923242729/job/50963073473#step:6:11 with the same 403. Let's just work around that by trying again to push, if necessary a couple of times (with a back-off strategy). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Authorization is hard. So hard, in fact, that it seems that (maybe due to incorrect optimizations?) pushes to GitHub with an installation access token that has _just_ been obtained sometimes fail with a 403, even though it seems that a re-run "fixes" the problem. The first instances of this problem was https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/runs/17543752351/job/49820347084#step:6:11 on Sep 8, 2025, 9:52 AM GMT+2: Run git push ***github.com/$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH remote: Permission to gitgitgadget/git-mailing-list-mirror.git denied to gitgitgadget[bot]. fatal: unable to access 'https://github.com/gitgitgadget/git-mailing-list-mirror/': The requested URL returned error: 403 Error: Process completed with exit code 128. This happened relatively shortly after I had merged gitgitgadget#12 on Sep 5, 2025, 7:55 AM GMT+2, and there were 30 such occurrences of denied pushes due to apparently not-yet-valid installation tokens in https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml (which isn't bad, given that there have been 1,892 runs of that workflow since Sep 5, 8:44 AM GMT+2, as of time of writing). So it _might_ seem as if the flake has something to do with this change, but then, it occurs too rarely to be _caused_ by that change, _and_ it seems to happen a tad more frequently than once a day _but_ started 3 days after merging that PR. As I stated above, I have come to the conclusion that it is something on GitHub's side where they changed something on their side that _sometimes_ lets installation access tokens be _not quite ready for pushing_ for a little while right after the tokens have been issued. Corroborating evidence for that suspicion are the 8 occurrences of the same issue in the sister repository I established for Cygwin: https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml And in that repository, essentially the same workflow had been running a quite a few days longer _without_ any issues, more concretely, it has done its job without problems since Aug 30, 2025, 6:40 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17346140096 until it failed for the first time on Sep 22, 2025, 7:24 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17923242729/job/50963073473#step:6:11 with the same 403. Let's just work around that by trying again to push, if necessary a couple of times (with a back-off strategy). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Authorization is hard. So hard, in fact, that it seems that (maybe due to incorrect optimizations?) pushes to GitHub with an installation access token that has _just_ been obtained sometimes fail with a 403, even though it seems that a re-run "fixes" the problem. The first instances of this problem was https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/runs/17543752351/job/49820347084#step:6:11 on Sep 8, 2025, 9:52 AM GMT+2: Run git push ***github.com/$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH remote: Permission to gitgitgadget/git-mailing-list-mirror.git denied to gitgitgadget[bot]. fatal: unable to access 'https://github.com/gitgitgadget/git-mailing-list-mirror/': The requested URL returned error: 403 Error: Process completed with exit code 128. This happened relatively shortly after I had merged gitgitgadget#12 on Sep 5, 2025, 7:55 AM GMT+2, and there were 30 such occurrences of denied pushes due to apparently not-yet-valid installation tokens in https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml (which isn't bad, given that there have been 1,892 runs of that workflow since Sep 5, 8:44 AM GMT+2, as of time of writing). So it _might_ seem as if the flake has something to do with this change, but then, it occurs too rarely to be _caused_ by that change, _and_ it seems to happen a tad more frequently than once a day _but_ started 3 days after merging that PR. As I stated above, I have come to the conclusion that it is something on GitHub's side where they changed something on their side that _sometimes_ lets installation access tokens be _not quite ready for pushing_ for a little while right after the tokens have been issued. Corroborating evidence for that suspicion are the 8 occurrences of the same issue in the sister repository I established for Cygwin: https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/workflows/sync-mailing-list-mirror.yml And in that repository, essentially the same workflow had been running a quite a few days longer _without_ any issues, more concretely, it has done its job without problems since Aug 30, 2025, 6:40 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17346140096 until it failed for the first time on Sep 22, 2025, 7:24 PM GMT+2 in https://github.com/cygwingitgadget/gitgitgadget-workflows/actions/runs/17923242729/job/50963073473#step:6:11 with the same 403. Let's just work around that by trying again to push, if necessary a couple of times (with a back-off strategy). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In preparation for supporting projects other than Git, let's combine the
sync-git-gui
andsync-gitster-git
workflows into a single, matrix one. The next step after that will be to define the project-specific parts in a project configuration and consume it from there.While at it, also rename the workflow that synchronizes the mailing list mirror, so that it does not talk about Git specifically.