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

fix(deps): use writer and readers instead [CLK-272228] #85

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

jzhang-clickup
Copy link
Contributor

@jzhang-clickup jzhang-clickup commented Oct 5, 2023

what

https://staging.clickup.com/t/333/CLK-272228

follow this aws migration doc: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds-readme.html#migrating-from-instanceprops

test

npx progen test and deprecation warning is gone.

@ahammond please advise other test steps needed.

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #85 (8d759c0) into main (0cdfd4c) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   96.55%   96.58%   +0.02%     
==========================================
  Files           6        6              
  Lines        1741     1756      +15     
  Branches      185      187       +2     
==========================================
+ Hits         1681     1696      +15     
  Misses         60       60              
Files Coverage Δ
src/aurora.ts 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cdfd4c...8d759c0. Read the comment docs.

src/aurora.ts Outdated Show resolved Hide resolved
src/aurora.ts Outdated Show resolved Hide resolved
src/aurora.ts Outdated Show resolved Hide resolved
@ahammond ahammond changed the title fix(cdk): fix deprecate warn undefinedinstances [CLK-272228] fix(deps): use writer and readers instead [CLK-272228] Oct 6, 2023
@jzhang-clickup jzhang-clickup force-pushed the jz-CLK-272228-fix-deprecate-warn branch 2 times, most recently from d08a657 to 93b7495 Compare October 10, 2023 18:24
@ahammond
Copy link
Collaborator

Looks good! Final testing:

  • use the infratest-aurora-cdk repo (note that this repo does not have CD enabled).
  • get it fully up to date with the before version of this change by deploying it. This will require manually running cdk from the CLI
  • use yalc to pull the development version of this library over into the infratest-aurora-cdk repo. Use cdk diff to see what the expected changes are. Post that diff into this PR as evidence that the change is low risk.

@jzhang-clickup
Copy link
Contributor Author

get it fully up to date with the before version of this change by deploying it. This will require manually running cdk from the CLI

run the following to make sure there is no diff:

export AWS_PROFILE=usCdkPipelines
export AWS_REGION=us-east-1
click a # for auth
aws sts get-caller-identity

yarn --check-files

then run:

npx cdk list

which gives:

InfratestAuroraPipeline
cross-region-stack-013819181968:us-west-2
InfratestAuroraPipeline/OicdUsCdkPipelinesUsEast1/InfratestAuroraCdkGithubActions
InfratestAuroraPipeline/OicdUsQaUsEast1/InfratestAuroraCdkGithubActions
InfratestAuroraPipeline/OicdGlobalProdUsEast1/InfratestAuroraCdkGithubActions
InfratestAuroraPipeline/UsQaUsWest2/InfratestAurora
InfratestAuroraPipeline/UsQaQaUsWest26/InfratestAurora

for each stack, run:

npx cdk diff <MyStack>
npc cdk deploy <MyStack>  # if there is a diff

@jzhang-clickup
Copy link
Contributor Author

use yalc to pull the development version of this library over into the infratest-aurora-cdk repo. Use cdk diff to see what the expected changes are. Post that diff into this PR as evidence that the change is low risk.

i did the following:

# Set up library to be tested
export MY_LIB=cdk-aurora
cd "$MY_LIB"
git checkout jz-CLK-272228-fix-deprecate-warn
yarn --check-files
npx projen compile
yalc publish --push  # publishes your local build to a local repo

# Set up app for testing
export MY_APP=infratest-aurora-cdk
cd "../$MY_APP"
yarn --check-files
yalc add "@time-loop/$MY_LIB"
npx cdk diff InfratestAuroraPipeline/UsQaUsWest2/InfratestAurora

gives the following diff:

Stack InfratestAuroraPipeline/UsQaUsWest2/InfratestAurora (UsQaUsWest2-InfratestAurora)
Resources
[~] AWS::RDS::DBInstance UsQaUsWest2/InfratestAurora/Or1Infratest/Database/Instance1 Or1InfratestDatabaseInstance1CD96917B replace
 └─ [-] DBInstanceIdentifier (requires replacement)
     └─ Or1Infratest1
npx cdk diff InfratestAuroraPipeline/UsQaQaUsWest26/InfratestAurora

gives the following diff:

Stack InfratestAuroraPipeline/UsQaQaUsWest26/InfratestAurora (UsQaQaUsWest26-InfratestAurora)
Resources
[~] AWS::RDS::DBInstance UsQaQaUsWest26/InfratestAurora/QaUsWest26Infratest/Database/Instance1 QaUsWest26InfratestDatabaseInstance1DFBD1E49 replace
 └─ [-] DBInstanceIdentifier (requires replacement)
     └─ QaUsWest26Infratest1

@jzhang-clickup jzhang-clickup force-pushed the jz-CLK-272228-fix-deprecate-warn branch 2 times, most recently from 82f617f to 706fa0e Compare October 25, 2023 21:27
@jzhang-clickup jzhang-clickup force-pushed the jz-CLK-272228-fix-deprecate-warn branch from 706fa0e to f4618d2 Compare October 25, 2023 21:28
Signed-off-by: github-actions <github-actions@github.com>
@jzhang-clickup
Copy link
Contributor Author

follow the workaround here: aws/aws-cdk#27177 there is no diff from cdk diff now.

@jzhang-clickup jzhang-clickup merged commit 774d574 into main Oct 25, 2023
@jzhang-clickup jzhang-clickup deleted the jz-CLK-272228-fix-deprecate-warn branch October 25, 2023 22:25
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.

2 participants