Skip to content
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

Replace deprecated CDK APIs #120

Closed
wants to merge 2 commits into from
Closed

Conversation

stekern
Copy link
Contributor

@stekern stekern commented Jan 14, 2022

Replace deprecated CDK APIs in preparation of upgrading from CDK v1 to v2.

  • Replace deprecated properties used in various constructs
  • Replace "old" CDK Pipelines API with the new one
    • Besides updating snapshots, library consumers that use Liflig CDK Pipelines will need to make small adjustments to their CDK codebase, mainly changing pipeline.addApplicationStage(...) to pipeline.addStage(...).
    • (The biggest change for us as library maintainers is that we now need to pass in a synth property when creating the pipeline. This property basically needs to resolve to an artifact that contains the cloud assembly. The changes introduced in this PR shoehorns the necessary changes into the existing code structure, so there are probably cleaner ways to do this. But we should be able to defer a potential refactor to a later PR without causing any diff in the snapshots)
    • Some tags are unexpectedly removed from various CDK Pipelines-related resources (e.g., IAM roles using by CodePipeline) when upgrading to the new CDK Pipelines API. Seems like the aspect we've set up for tagging is not being applied to all constructs, and it is not clear to me why this is happening. It's not a big deal if it only affects these a handful of pipeline-related roles, but this is unexpected behavior that I'd like to get to the bottom of. In general, we should be able to trust that an aspect visits all constructs in a given stack. I've created an issue (pipelines): Various pipeline-related constructs not visited by aspect aws/aws-cdk#18440.

I'm leaning towards merging these changes to an alpha branch. On this branch, the release plugin will then automatically publish releases such as 1.5.3-alpha.1, etc. This makes it easy for consumers of the library to test out the changes before we merge it into master and a stable release. (And we can re-use the branch for the CDK v2 updates -- e.g., 2.0.0-alpha.1 etc.)

As a user of Liflig CDK Pipelines, this update mostly requires you to change
`pipeline.addApplicationStage(...)` to `pipeline.addStage(...)`.
@stekern stekern changed the title [WIP] Replace deprecated APIs Replace deprecated APIs Jan 19, 2022
@stekern stekern changed the title Replace deprecated APIs Replace deprecated CDK APIs Jan 19, 2022
@stekern
Copy link
Contributor Author

stekern commented Feb 2, 2022

Closed in #124

@stekern stekern closed this Feb 2, 2022
@stekern stekern deleted the replace-deprecated-apis branch February 2, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant