Skip to content

ci: add lock mutex and update latest #918

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

Merged
merged 1 commit into from
May 10, 2021

Conversation

tsuyoshicho
Copy link
Contributor

概要

#909 (comment)

でコメントされているエラーについて調査し、修正を作成しました。

原因

問題の原因ですが、根本としては

  • GitHub workflow の並列度が高いこと
  • マージが複数連続で実施されたこと
  • 特に gh-pages は生成に時間がかかること

が重なり、push 先である vimdoc-ja のコミットの状態が clone 時と push 時で差ができ、push失敗したことによります。

対策

これに対し、次の対策をするようにしました。

  • 変更したファイルを格納する前に、git pull --rebaseするようにした
  • 最新への更新 & 変更の格納 & コミットまでをアトミックに操作するための排他処理の導入

排他だけでも対策は不可能ではないけど、ロック時間の短縮と他の操作の可能性を考慮し、軽減策はそのまま入れています

参考

@tsuyoshicho
Copy link
Contributor Author

ほぼ同時の更新での失敗と成功の参考

https://github.com/tsuyoshicho/vimdoc-ja-working/actions

@k-takata
Copy link
Member

Let's merge this.

@k-takata k-takata merged commit 3d8e27d into vim-jp:master May 10, 2021
@tsuyoshicho tsuyoshicho deleted the fix/ci-lock-20210509 branch May 10, 2021 06:28
tsuyoshicho added a commit to tsuyoshicho/vimdoc-ja-working that referenced this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants