Skip to content

chore: bringing the changes from v2-main to master related to the experimental modules#16401

Merged
mergify[bot] merged 12 commits intoaws:masterfrom
otaviomacedo:v2-to-master
Sep 7, 2021
Merged

chore: bringing the changes from v2-main to master related to the experimental modules#16401
mergify[bot] merged 12 commits intoaws:masterfrom
otaviomacedo:v2-to-master

Conversation

@otaviomacedo
Copy link
Copy Markdown
Contributor

@otaviomacedo otaviomacedo commented Sep 7, 2021

Bringing the changes from v2-main to master related to the experimental modules. These changes were made directly in v2-main because the version of the @aws-cdk/assert library compatible with aws-cdk-lib only existed in v2-main.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

skinny85 and others added 10 commits September 7, 2021 15:13
…mation (#15890)

As part of #15722, the decision was made to change the package.json files for
experimental packages to add 'alpha' identifiers. This ends up causing issues
for our ubergen-ed packages (i.e., aws-cdk-lib), which then try to include L1s
for these packages under the 'alpha' namespaces. Instead, switch (back) to
adding the alpha identifiers as part of the package transformation step.

Reverted the change to the pkglint rules, and re-ran `yarn pkglint` to update
the package.json files.

I also did some light refactoring, since the method was a bit hard to read.

fixes #15845

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The `@aws-cdk/assertions` library was previously excluded from the V2 build of the experimental modules,
because the `vendor.sh` script it used for vendoring in a few modules
(`cfnspec`, `cloudformation-diff`, and `assert-internal`)
used paths relative to the V1 module inside the repository.

Change the `vendor.sh` script to short-circuit and exit when running in `transform` phase for
the alpha packages. That's required because the transform phase re-writes imports when copying
the TS files (because it needs to know which modules are also experimental to do the rewriting correctly),
but the `vendor.sh` script runs only after the `build` script for the package has been invoked,
which means any TS files copied by it successfully would _not_ have their imports re-written.
Since the build for alpha packages runs after the build for `@aws-cdk/assertions`
(we add an explicit dependency to make sure that happens),
those files are already "vendored in" correctly, and will be copied when creating the separate package.

Also adjust the module copying logic to account for bundled dependencies,
which `@aws-cdk/assertion` uses.

Closes #15589

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The proposal for what conventions to use for naming the individually-published
experimental packages has changed a few times, and the current implementation
was the work-in-progress naming.

This change aligns the implementation to the latest proposal.

closes #15576

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…#16112)

One of the steps of the build of experimental packages is to run `yarn --silent jsii-rosetta extract` for each package. Since yarn can't find the `jsii-rosetta` executable, the build fails. For some reason, running `yarn bin jsii-rosetta` at the `individual-packages` folder shows that yarn can find it at the root folder's `node_modules`, but running the same command inside each individual package result in "error Couldn't find a binary named "jsii-rosetta"".

This change adds a `.bin` symlink to each individual package's `node_module` pointing to the root folder's `node_modules/.bin` folder.

Fixes #15825

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#16132)

Both parameters to `find` (the folder to where the search is restricted and what patterns to exclude) should be given by the function parameter, to make sure that they refer to the same folder. Otherwise, we can get errors like `ln: <folder name>: Operation not permitted`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I'm not sure whether this is the best place to document these things. I'm happy to move it somewhere else, if someone has a better idea.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Sep 7, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 7, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 7, 2021

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@otaviomacedo otaviomacedo changed the title V2 to master chore: cherry-picked some commits from v2-main to master Sep 7, 2021
@otaviomacedo otaviomacedo changed the title chore: cherry-picked some commits from v2-main to master chore: bringing the changes from v2-main to master related to the experimental modules Sep 7, 2021
@otaviomacedo otaviomacedo marked this pull request as ready for review September 7, 2021 15:09
@otaviomacedo otaviomacedo requested review from a team, njlynch and skinny85 September 7, 2021 15:09
Copy link
Copy Markdown
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Huzzah!

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 7, 2021

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-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 50e2c2c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 86e63f8 into aws:master Sep 7, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 7, 2021

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).

@nija-at
Copy link
Copy Markdown
Contributor

nija-at commented Sep 10, 2021

Yayyy! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants