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

Possible GitHub Pages update conflicts in multi-specs repos #58

Open
tidoust opened this issue Apr 30, 2021 · 1 comment
Open

Possible GitHub Pages update conflicts in multi-specs repos #58

tidoust opened this issue Apr 30, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tidoust
Copy link
Member

tidoust commented Apr 30, 2021

The matrix setting effectively duplicates the job. These jobs seem to run in parallel. This can create conflicts when they check out the GitHub Pages branch and try to update it at the same time.

That typically happened with last commit to WebCodecs:
https://github.com/w3c/webcodecs/runs/2462176606

git push --force-with-lease origin "gh-pages"
    To https://github.com/w3c/webcodecs.git/
     ! [remote rejected] gh-pages -> gh-pages (cannot lock ref 'refs/heads/gh-pages': is at a369eebbf6d854fd3815c6bf26afc9e577f47d26 but expected e9dfdfa373befa8cff557a6fd66221ff077ef686)
    error: failed to push some refs to 'https://github.com/w3c/webcodecs.git/'

I see that there exists a strategy.max-parallel setting that can probably be set to 1 to serialize the jobs. I don't know if there's a way to do that in spec-prod directly instead of requiring that setting to be set in the YML file.

@sidvishnoi sidvishnoi added the bug Something isn't working label Apr 30, 2021
@sidvishnoi
Copy link
Member

sidvishnoi commented Apr 30, 2021

strategy.max-parallel setting would be a fine way if you're ok with a slow CI. It would need to be set in the workflow (the action can't do that).

I was hoping that git pull just before git push might reduce the chances of clash. I will add some code to retry the push if it fails due to a clash.

tidoust added a commit to w3c/webcodecs that referenced this issue Apr 30, 2021
One job runs for each of the 3 documents in the repository. Each of them
updates the "gh-pages" branch. Problem is that these jobs are typically run in
parallel, leading to "not up to date" issues when "git push" commands are run.

For an example of such a problem, see:
https://github.com/w3c/webcodecs/runs/2462176606

Also see discussion in:
w3c/spec-prod#58

This update tells GitHub to serialize the jobs. Since the jobs are relatively
independent otherwise, it also tells GitHub to run them to completion even
when one of them fails.
tidoust added a commit to tidoust/spec-prod that referenced this issue Jun 3, 2021
This adjusts the documentation for a multi-documents repository to clarify how
to pass Echidna tokens per document (see w3c#55), and to highlight the possible
need to serialize jobs (at least until w3c#58 gets addressed).
sidvishnoi pushed a commit that referenced this issue Jun 3, 2021
)

This adjusts the documentation for a multi-documents repository to clarify how
to pass Echidna tokens per document (see #55), and to highlight the possible
need to serialize jobs (at least until #58 gets addressed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants