-
Notifications
You must be signed in to change notification settings - Fork 246
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(release): 1.43.0 #3141
Merged
Merged
chore(release): 1.43.0 #3141
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… merge it (no-squash)' rule
chore: using queue action in the 'Synchronize that PR to upstream and merge it (no-squash)' rule
A package may accidentally (or on purpose) contain a `.jsii.tabl.json` file, containing pretranslated examples. When an assembly is added for snippet discovery, this tablet will be loaded implicitly to save live conversion time. However, if the tablet file is old, or not even a tablet file, this will stop rosetta with an error. Catch that error and continue anyway. Fixes an issue in Construct Hub. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
…3.0 in /packages/jsii-pacmak/lib/targets/python (#3090)
The new `infuse` feature replicates examples from READMEs to types. However, because of caching, example locations have become part of their identifying key. Because an example has moved to a different location, it now has a different key, and because that key is not in the tablet yet the example will count as untranslated (requiring live conversion during `pacmak` time, and increasing the pack time). When we copy an example to a different type, also create a copy at the new type location in the tablet, so that it will count as pretranslated. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
In CDK, we use the `@example` tag a lot to indicate example values of some property, instead of code examples. For example, a `bucketArn` property might have as annotation `@example arn:aws:s3:....`. Rosetta would try to compile those, and fail. To get around this, we would skip values that *looked* like they weren't source in `rosetta extract`. This doesn't combine well with pacmak live-translation. We are either forced to try and compile them again during pacmak (adding compile time), or fail pacmak as soon as we encounter these. And all of this is to work around abuse of the `@example` tag for something it's not intended for. So stop treating these examples specially. They will just fail compilation unless rewritten. This will force us to deal with them properly in the CDK source code. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
We used to only remember snippets we live-translated using the rosetta API if we were able to find a fixture for them. There's no good reason for this. Also remember them if we live-translate without a fixture. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
When the version of `jsii-pacmak` is `0.0.0`, it will write the following requirement for `jsii-runtime`: `[,0.0.1)`. There is no version that satisfies that dependency, so the build fails. Make an exception: if the version we're trying to install is `^0.0.0`, translate it to "any old version" instead. Fixes #3107. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Pacmak outputs both the command-line commands as well as stdout/stderr for those commands under the `verbose` loglevel. That's too much at one log level: I definitely want to know about the commands without getting spammed with all the command outputs. Introduce a new loglevel, `silly`, and move the command output to that level. Also remove a log line from `npmPack` that is redundant with the log line that prints the command that's going to be executed. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Because of backwards compatibility reasons, pacmak will try to live-translate example code it encounters. However, this can add unpredictably to the compile times, especially while we're making sure that rosetta and pacmak agree on API locations for all snippets that are being translated (which are now part of the snippet keys). Add an option to pacmak to fail if any snippets are encountered that are not pre-translated in any of the tablets. This most likely signifies an error. This will be enabled in cdklabs/cdk-ops#1777. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
In #3045, the `OneByOneBuilder` was switched to build all packages in series (instead of all in parallel), because there would be race conditions in case of inter-package dependencies. This is correct, but leaves a bunch of possible parallelism on the table that is notably blowing up pack times for Python. Re-introduce a (limited) form of parallelism by retaining the sets of mutually independent packages, as toposorted, and doing those in parallel. Rename the class to `IndependentPackageBuilder` to more clearly describe the intent behind the class. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
The `rosetta` fixtures directory is assembly-scoped. That means that in the monocdk transform, all Rosetta fixtures from the individual assemblies need to be tossed together into one `rosetta` directory for all of them. Inevitably this leads to conflicts, where the various individual `default.ts-fixture` files compete with each other to be the one, global `default.ts-fixture`. What ends up happening is they end up overwriting each other and the last module to get copied in wins. All other modules' examples fail to compile. Ideally the `ubergen` tool that combines these fixtures would ensure it doesn't clobber existing files, and renames the fixtures to unique names (maybe `s3.default.ts-fixture`). But if it does that, *none* of them are called `default.ts-fixture` and so all snippets require explicit fixture references. Unfortunately, we now need to also automatically add in those references and it's nontrivial to do this automatically. `ubergen` would need to parse and generate both Markdown and Typescript, to add these markers in the right places. Instead, this PR adds the concept of scoped fixtures. If a class (or README) is defined in a submodule, say `aws_s3`, then we will first try `rosetta/aws_s3/default.ts-fixture` before trying `rosetta/default.ts-fixture`. That way, `ubergen` and other tools like it will have an easier time combining default fixtures. Also renamed `AssemblyFixture` => `TestJsiiModule` and made a distinction between the two directories exposed by the object for more clarity on what it's doing. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
The code generators in pacmak are now passing API locations to Rosetta, to indicate the source of the snippets they're finding. This is necessary to distinguish the same code snippet found in a different submodule, because it might be using a different fixture. They all had the same mistake though, in that `rosetta extract` was identifying snippets by "defining API element", whereas pacmak was identifying snippets by what class it was generating code for... and in the case of inheritance, those two locations would be different. Put in extra effort in the pacmak target generators to keep track of where we found a method or property, so we can use the same location translating the examples. This was validated by running pacmak over the entire CDK repository, with the option `--rosetta-unknown-snippets=fail`, and making sure it completed successfully. We prevent regressions by doing the same in the jsii integ tests: cdklabs/cdk-ops#1777. I hope that will do, I'm not sure how to turn this into a proper unit test. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
aws-cdk-automation
added
the
pr/no-squash
This PR should be merged instead of squash-merging it
label
Nov 8, 2021
rix0rrr
approved these changes
Nov 8, 2021
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (no-squash)... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See CHANGELOG