chore(prlint): ban 'breaking changes' clause on stable modules#14861
chore(prlint): ban 'breaking changes' clause on stable modules#14861
Conversation
Testing
|
NetaNir
left a comment
There was a problem hiding this comment.
Great addition, nice test coverage.
There is one issue that requires attention - using the relative path (see inline comment), the rest are suggestions.
tools/prlint/module.ts
Outdated
| const modules: string[] = []; | ||
|
|
||
| export function findModulePath(fuzz: string): string { | ||
| if (modules.length === 0) { |
There was a problem hiding this comment.
can we extract this findAllModules into a separate function that will be called once (outside of the map) in assertStability?
There was a problem hiding this comment.
Why? It's run once now, no?
There was a problem hiding this comment.
Simply for code cleanliness and avoiding a global variable
b7f3a9c to
89f1649
Compare
|
|
||
| function discoverModules() { | ||
| if (modules.length === 0) { | ||
| if (!process.env.REPO_ROOT) { |
There was a problem hiding this comment.
I personally don't see why we couldn't just default to CWD, but I'm fine with this.
There was a problem hiding this comment.
I will still need some way to configure this for unit tests.
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…4861) The `scripts/check-api-compatibility.sh` script prevents breaking API changes in stable CDK modules. However, this does not prevent functional breaking changes. It is infeasible to actually detect and prevent this. The CDK must be more strict on preventing such changes and the impact due to their perception. A linter error when a 'BREAKING CHANGE' clause for a stable module is encountered in the PR is a good way to communicate this information.
…18102) This PR introduces a proposed new label, `pr-linter/exempt-breaking-change` that, when added, circumvents the check that asserts stable modules do not have breaking changes. Motivation: A situation like #18027 where we have are willing to accept a functional breaking change to a stable module. The regular `allowed-breaking-changes.txt` file does not work here, since there is no breaking change to the API. We want to be able to document the breaking change, but by documenting we alert `prlint` that we are breaking a stable module. Counterargument: Functional breaking changes were explicitly banned in #14861. From the PR description: "The CDK must be more strict on preventing such changes and the impact due to their perception." I also added some "manual linting" to the file myself since it was bothering me, and now it muddies the diff. Sorry! ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ws#18102) This PR introduces a proposed new label, `pr-linter/exempt-breaking-change` that, when added, circumvents the check that asserts stable modules do not have breaking changes. Motivation: A situation like aws#18027 where we have are willing to accept a functional breaking change to a stable module. The regular `allowed-breaking-changes.txt` file does not work here, since there is no breaking change to the API. We want to be able to document the breaking change, but by documenting we alert `prlint` that we are breaking a stable module. Counterargument: Functional breaking changes were explicitly banned in aws#14861. From the PR description: "The CDK must be more strict on preventing such changes and the impact due to their perception." I also added some "manual linting" to the file myself since it was bothering me, and now it muddies the diff. Sorry! ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The
scripts/check-api-compatibility.shscript prevents breaking APIchanges in stable CDK modules.
However, this does not prevent functional breaking changes. It is
infeasible to actually detect and prevent this.
The CDK must be more strict on preventing such changes and the impact
due to their perception.
A linter error when a 'BREAKING CHANGE' clause for a stable module is
encountered in the PR is a good way to communicate this information.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license