-
Notifications
You must be signed in to change notification settings - Fork 298
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
feat(ci): try fetching olean caches from older commits #2278
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bryangingechen
added
CI
This issue or PR is about continuous integration
awaiting-review
The author would like community review of the PR
labels
Mar 29, 2020
bryangingechen
changed the title
feat(ci): try fetchnig older branch oleans
feat(ci): try fetching older branch oleans
Mar 29, 2020
bryangingechen
changed the title
feat(ci): try fetching older branch oleans
feat(ci): try fetching olean caches from older commits
Mar 29, 2020
gebner
reviewed
Mar 29, 2020
gebner
added
awaiting-author
A reviewer has asked the author a question or requested changes
and removed
awaiting-review
The author would like community review of the PR
labels
Mar 29, 2020
bryangingechen
added
awaiting-review
The author would like community review of the PR
and removed
awaiting-author
A reviewer has asked the author a question or requested changes
labels
Mar 29, 2020
gebner
reviewed
Mar 29, 2020
gebner
approved these changes
Mar 29, 2020
gebner
added
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
and removed
awaiting-review
The author would like community review of the PR
labels
Mar 29, 2020
mergify bot
pushed a commit
that referenced
this pull request
Apr 4, 2020
PR #2048 changed the CI so that olean caches are not pushed to Azure if a later commit on the same branch occurs. The reasoning was that it was unlikely that anyone would fetch those caches. That's changed as of #2278, since `fetch_olean_cache.sh` now looks for caches from commits earlier in the history. This means that currently, we can observe the following wasteful sequence of events in several PRs (e.g. #2258): 1. commit A gets pushed to a certain branch and CI_A starts. 2. While CI_A is still running the `leanpkg build` step, commit B is pushed and CI_B starts. 3. CI_A finishes `leanpkg build` but doesn't upload its cache to Azure because of #2048 4. Now commit C is pushed and can't use the results of CI_A 5. CI_B finishes `leanpkg build` but doesn't upload its cache 6. Commit D is pushed and can't use the results of CI_A or CI_B ... (This can keep happening as long as the next commit arrives before the most recent CI uploads to Azure). I also cleaned up some stuff that was left over from when we ran the build on both "pr" and "push" events.
anrddh
pushed a commit
to anrddh/mathlib
that referenced
this pull request
May 15, 2020
…mmunity#2278) * feat(ci): try fetching older branch oleans * docstring edits for set_theory.surreal * debug * debug 2 * formatting * try fetching * just increase depth * improve script, improve surreal docstrings * env context * quieter curl * fix overwriting * git clean * ci test: delete surreal.lean * fix env var GIT_HISTORY_DEPTH * add back surreal * reviewer comments Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
anrddh
pushed a commit
to anrddh/mathlib
that referenced
this pull request
May 15, 2020
PR leanprover-community#2048 changed the CI so that olean caches are not pushed to Azure if a later commit on the same branch occurs. The reasoning was that it was unlikely that anyone would fetch those caches. That's changed as of leanprover-community#2278, since `fetch_olean_cache.sh` now looks for caches from commits earlier in the history. This means that currently, we can observe the following wasteful sequence of events in several PRs (e.g. leanprover-community#2258): 1. commit A gets pushed to a certain branch and CI_A starts. 2. While CI_A is still running the `leanpkg build` step, commit B is pushed and CI_B starts. 3. CI_A finishes `leanpkg build` but doesn't upload its cache to Azure because of leanprover-community#2048 4. Now commit C is pushed and can't use the results of CI_A 5. CI_B finishes `leanpkg build` but doesn't upload its cache 6. Commit D is pushed and can't use the results of CI_A or CI_B ... (This can keep happening as long as the next commit arrives before the most recent CI uploads to Azure). I also cleaned up some stuff that was left over from when we ran the build on both "pr" and "push" events.
anrddh
pushed a commit
to anrddh/mathlib
that referenced
this pull request
May 16, 2020
…mmunity#2278) * feat(ci): try fetching older branch oleans * docstring edits for set_theory.surreal * debug * debug 2 * formatting * try fetching * just increase depth * improve script, improve surreal docstrings * env context * quieter curl * fix overwriting * git clean * ci test: delete surreal.lean * fix env var GIT_HISTORY_DEPTH * add back surreal * reviewer comments Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
anrddh
pushed a commit
to anrddh/mathlib
that referenced
this pull request
May 16, 2020
PR leanprover-community#2048 changed the CI so that olean caches are not pushed to Azure if a later commit on the same branch occurs. The reasoning was that it was unlikely that anyone would fetch those caches. That's changed as of leanprover-community#2278, since `fetch_olean_cache.sh` now looks for caches from commits earlier in the history. This means that currently, we can observe the following wasteful sequence of events in several PRs (e.g. leanprover-community#2258): 1. commit A gets pushed to a certain branch and CI_A starts. 2. While CI_A is still running the `leanpkg build` step, commit B is pushed and CI_B starts. 3. CI_A finishes `leanpkg build` but doesn't upload its cache to Azure because of leanprover-community#2048 4. Now commit C is pushed and can't use the results of CI_A 5. CI_B finishes `leanpkg build` but doesn't upload its cache 6. Commit D is pushed and can't use the results of CI_A or CI_B ... (This can keep happening as long as the next commit arrives before the most recent CI uploads to Azure). I also cleaned up some stuff that was left over from when we ran the build on both "pr" and "push" events.
cipher1024
pushed a commit
to cipher1024/mathlib
that referenced
this pull request
Mar 15, 2022
PR leanprover-community#2048 changed the CI so that olean caches are not pushed to Azure if a later commit on the same branch occurs. The reasoning was that it was unlikely that anyone would fetch those caches. That's changed as of leanprover-community#2278, since `fetch_olean_cache.sh` now looks for caches from commits earlier in the history. This means that currently, we can observe the following wasteful sequence of events in several PRs (e.g. leanprover-community#2258): 1. commit A gets pushed to a certain branch and CI_A starts. 2. While CI_A is still running the `leanpkg build` step, commit B is pushed and CI_B starts. 3. CI_A finishes `leanpkg build` but doesn't upload its cache to Azure because of leanprover-community#2048 4. Now commit C is pushed and can't use the results of CI_A 5. CI_B finishes `leanpkg build` but doesn't upload its cache 6. Commit D is pushed and can't use the results of CI_A or CI_B ... (This can keep happening as long as the next commit arrives before the most recent CI uploads to Azure). I also cleaned up some stuff that was left over from when we ran the build on both "pr" and "push" events.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI
This issue or PR is about continuous integration
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, during CI, we search for oleans on Azure using the
lean_file_hash
. If nothing matches, then we give up and build from scratch.This PR changes the
fetch_olean_cache.sh
script so that if the above search fails, we attempt to look for olean caches using the first 10 commits ingit log --first-parent
. This should save quite a bit of build time for commits that only touch files which aren't imported by very much.For testing, I made some docstring formatting edits (splitting long lines, removing indentation) to
surreal.lean
since it isn't imported by any other files. See an example result here, corresponding to commit d097188.