-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[CI] Fix moon cache usage #259760
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
[CI] Fix moon cache usage #259760
Changes from all commits
f176b0d
ab4e988
dc3ba0b
43e1640
6b96b04
0908280
3a5c0c6
ed987dc
feeef53
614e6b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,10 @@ export async function buildWebpackPackages({ log, quiet, dist }: TaskContext) { | |
|
|
||
| const args = ['kbn', 'build-shared']; | ||
| if (quiet) args.push('--quiet'); | ||
| if (dist) args.push('--dist'); | ||
| if (dist) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This avoids reusing a bad cache |
||
| args.push('--dist'); | ||
| args.push('--no-cache'); | ||
| } | ||
|
|
||
| await execa('yarn', args, { cwd: REPO_ROOT, stdio }); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,8 +112,8 @@ export const command = { | |
|
|
||
| await Promise.all([ | ||
| time('prepare webpack bundles for packages', async () => { | ||
| log.info('extract relevant versions for packages and pre-build webpack bundles'); | ||
| await moonRun([':extract-version-dependencies', ':build-webpack'], { | ||
| log.info('pre-build webpack bundles'); | ||
| await moonRun([':build-webpack'], { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the extract-version-dependencies tasks are already marked as dependencies of the webpack build. I've experimented with this, and it seems we don't benefit from the cache until the 2nd rerun locally if we run both tasks like this, but we do if we just rely on |
||
| pipe: !quiet, | ||
| quiet, | ||
| noCache: forceInstall, | ||
|
|
||
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.
This was trying to retrieve a warmed moon cache from the VM image build.
It seems that cache cannot be reused, probably because some absolute paths are no longer valid on the executors compared to the VM image builder's context. Since it is not useful any longer, it just adds extra weight to the
.moon/cacheprior to archiving it per-build, that also could have been the reason for failing bootstraps