-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Cache Node.js artifacts from maven-frontend-plugin
on CI
#33815
Conversation
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.
Thank you for this PR. See below for some concerns I have when reviewing this change.
- uses: actions/cache@v4 | ||
name: Cache Node.js related artifacts | ||
with: | ||
path: | | ||
~/.m2/repository/com/github/eirslett/node | ||
~/.m2/repository/com/github/eirslett/pnpm | ||
key: ${{ runner.os }}-frontend-plugin-artifacts |
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.
The cache key is static. Therefore it will be cached once, and the cache is never refreshed for a different node or NPM version, which is then downloaded all the time. Consider adding a combined cache key for npm & node.
This doesn't respect the setting create-cache-if-it-doesnt-exist
. This could lead to a situation where there is no frontend being built, and then an empty cache is being created. Please create the cache only when this is set, and provide a download-only version when it is not set.
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.
The cache key is static. Therefore it will be cached once, and the cache is never refreshed for a different node or NPM version, which is then downloaded all the time. Consider adding a combined cache key for npm & node.
Done. The key for the cache now includes both the Node.js version and the PNPM version.
This doesn't respect the setting
create-cache-if-it-doesnt-exist
. This could lead to a situation where there is no frontend being built, and then an empty cache is being created.
Like we discussed offline, the directory paths are very specific and would only create an artifact if the directories exist and contain files. Hence this should not be a problem for this specific cache action.
f930886
to
f72578e
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
8ea2480
to
0b0270b
Compare
Closes keycloak#31835 Signed-off-by: Jon Koops <[email protected]>
e58db6f
to
cf707b5
Compare
One problem that remains is that it is not possible to exclude the existing artifacts that are cached from |
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.broker.KcOidcBrokerTest#testPostBrokerLoginFlowWithOTP_bruteForceEnabledKeycloak CI - Java Distribution IT (windows-latest - temurin - 17)
|
…33815) Closes keycloak#31835 Signed-off-by: Jon Koops <[email protected]>
Closes #31835