-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix: update cache.fingerprint file to java-builds dir #1748
Conversation
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
@@ -36,8 +36,8 @@ jobs: | |||
- name: Restore Java test-fixture cache | |||
uses: actions/cache@v3 | |||
with: | |||
path: syft/pkg/cataloger/java/test-fixtures/java-builds/packages | |||
key: ${{ runner.os }}-unit-java-cache-${{ hashFiles( 'syft/pkg/cataloger/java/test-fixtures/java-builds/packages.fingerprint' ) }} | |||
path: syft/pkg/cataloger/java/test-fixtures/java-builds |
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 cache would overwrite what's checked into git (all other locations under java-builds that is outside of packages)
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.
^ My fault - I thought this is what we wanted where we were checking for any changes under java-builds
and rebuilding on changes to those files - thinking more segmenting out the packages folder is the right choice since it keeps the cache smaller, we probably just want to update the makefile to also key off of rebuilding if there are changes to any of the shell scripts *.sh
find example-* build-* Makefile -type f -exec sha256sum {} \; | sort | tee /dev/stderr | tee $(PKGSDIR).fingerprint | ||
sha256sum $(PKGSDIR).fingerprint | ||
.PHONY: cache.fingerprint | ||
cache.fingerprint: |
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.
I don't think this fundamentally changed anything -- that is, I think this PR now passes since the fingerprint has changed, but ultimately the cache won't be automatically busted when there is a source change.
* main: Add sections of interest for Gemfile.lock cataloger (#1749) fix: update cache.fingerprint file to java-builds dir (#1748) Add ALPM Metadata to CYCLONEDX and SPDX output formats (#1747) chore: bump stereoscope to latest version (#1741) chore(deps): update bootstrap tools to latest versions (#1744) chore(deps): bump github.com/docker/docker (#1746) Create consul binary classifier (#1738) chore(deps): update bootstrap tools to latest versions (#1740) Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Summary
The
validations
workflow was looking under thepackages
directory for a fingerprint file that was not being created correctly. This caused tests to fail on PR that used the older cache after this update was made:This PR syncs the
Makefile
forjava-build
fixtures with patterns that exist already in the codebase. It also links these changes into the main Makefile so that CI can correctly validate when the cache needs to be busted.