-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to build sam with specified manifest file. #25
base: main
Are you sure you want to change the base?
Conversation
Testing on this build, one component running with --manifest and one running without, both passing build stage https://github.com/govuk-one-login/onboarding-self-service-experience/actions/runs/8018686483/job/21905082605?pr=636 |
@@ -71,7 +74,7 @@ runs: | |||
env: | |||
OS: ${{ runner.os }} | |||
CACHE_NAME: ${{ inputs.cache-name }} | |||
HASH: ${{ hashFiles(inputs.template || '**/template.y*ml', inputs.source-dir) }} | |||
HASH: ${{ hashFiles(inputs.template || '**/template.y*ml', inputs.source-dir, inputs.manifest) }} |
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.
How confident are we that when manifest
is not provided that this results in the same hash result as the original list of inputs? Do we have a test for this?
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.
Assuming all non-required inputs are empty this hash will not produce the same result as before, hashFiles will evaluate and hash empty inputs as empty strings, this will essentially be a cache busting change. Is this what you're asking?
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.
Sorry @kalpaitch, my question could've been phrased more clearly 😓 Before/after this change is merged, will an existing consumer of the action see the same hash for a given set of input files, assuming they don't populate the manifest
? I'm trying to work out whether the build artifacts are still effectively hermetic regardless of which version of the action a team is using to generate the hash.
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.
As I read the documentation, the answer would be no @pcornish
The addition of an extra parameter, be it empty or not, will change the hash. From my understanding this would be a cache busting upgrade, do you think this an issue?
6144f39
to
1123b41
Compare
We have an issue where we are building multiple components from the same repository, all with their own template files and package.json files.
The current build-action supports specifying the template file, but not the manifest.
Please let me know what the process is for raising this request, but I thought a PR with an example of the changes requested could help :)