-
Notifications
You must be signed in to change notification settings - Fork 3.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
chore: regenerate attributions on automatic dependency upgrades #19439
Conversation
Side NoteWe can get rid of all this hackery by simply generating the attributions document at build time, and not have it in source control. I am still somewhat reluctant to do this for now because I feel there is value in having these source code diffs for later inspection in unexpected cases. Interested to hear more opinions on this though. |
I validated this works on my fork. You can see an example PR here: https://github.com/iliapolo/aws-cdk/pull/1 |
- name: Install Tools | ||
run: |- | ||
npm -g install lerna npm-check-updates@^9.0.0 | ||
- name: Build CLI | ||
run: cd packages/aws-cdk && ../../scripts/buildup |
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.
We need to build the CLI in order to generate attributions (the bundler looks for the .js
files)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Even since #18667, our build process validates that the
THIRD_PARTY_LICENSES
file of the CLI package is up to date. That is, the version of it committed to source code matches the one being auto generated.This behavior breaks our automatic dependency upgrades whenever it includes an upgrade to one of the CLI's dependencies. This is because the autogenerated file will (for sure) have different dependency versions, and possibly also include new transitive dependencies.
This manifests an error like so:
To fix this, we currently need to manually regenerate the
THIRD_PARTY_LICENSES
file by runningyarn pkglint
on the CLI package.This PR adds a regeneration step to the upgrade workflow so that the PR also includes the up to date document.
Note that if this doesn't mean attribution validation will always pass. If any dependencies changed licenses to one that isn't allowlisted, the validation will still fail.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license