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(custom-resources): corrected the AWS SDK v2 to v3 mapping for memorydb service. #31874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashishdhingra
Copy link
Contributor

@ashishdhingra ashishdhingra commented Oct 24, 2024

Issue # (if applicable)

Closes #31755.

Reason for this change

Per MemoryDBClient, the service name is memorydb (not memory-db) with package name as @aws-sdk/client-memorydb. However, sdk-v2-to-v3.json is using wrong v3 service name for memorydb, which is causing failure to load package. Refer #31755 (comment) for more details.

Description of changes

  • Updated package.json to change aws-sdk-js-codemod version to ^2.3.3.
  • Executed yarn install
  • Made sure to stage yarn.lock for commit.
  • Verified that /node_modules/aws-sdk-js-codemod/dist/transforms/v2-to-v3/config/CLIENT_PACKAGE_NAMES_MAP.js has correct updated mapping for MemoryDB.
  • Ran /scripts/update-sdkv3-parameters-model.sh to generate new sdk-v2-to-v3.json. Made sure to include all generated files are staged for commit.
  • Corrected packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-memorydb.ts to fix onUpdate
  • Added new integration test packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-memorydb.ts
  • Executed yarn integ --directory test/custom-resources/test from directory packages/@aws-cdk-testing/framework-integ. This would report snapshots changed error.
  • For each changed snapshot, run yarn integ <<test.js-path>> —update-on-failed
    • yarn integ test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-athena.js --update-on-failed
    • yarn integ test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-dynamodb.js --update-on-failed
    • yarn integ test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-memorydb.js --update-on-failed
    • yarn integ test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js --update-on-failed
    • yarn integ test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js --update-on-failed
  • Additional snapshots to be updated: (TBD -> Some require a domain name and hosted zone. Refer https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk-testing/framework-integ)
    • yarn integ test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js --update-on-failed
    • yarn integ test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js --update-on-failed
    • yarn integ test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js --update-on-failed
    • yarn integ test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js --update-on-failed
    • yarn integ test/aws-events-targets/test/logs/integ.log-group.js --update-on-failed
    • yarn integ test/aws-globalaccelerator-endpoints/test/integ.globalaccelerator.js --update-on-failed
    • yarn integ test/aws-lambda-nodejs/test/integ.latest.js --update-on-failed
    • yarn integ test/aws-logs-destinations/test/integ.lambda.js --update-on-failed
    • yarn integ test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js --update-on-failed
    • yarn integ test/aws-opensearchservice/test/integ.opensearch.js --update-on-failed
    • yarn integ test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js --update-on-failed
    • yarn integ test/aws-route53/test/integ.vpc-endpoint-service-domain-name.js --update-on-failed
    • yarn integ test/aws-s3/test/integ.bucket-auto-delete-objects.js --update-on-failed
    • yarn integ test/aws-synthetics/test/integ.canary-auto-delete-lambda.js --update-on-failed

Description of how you validated changes

Added integration test

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team October 24, 2024 06:16
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Oct 24, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 24, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: fe1f085
  • Result: FAILED
  • Build Logs (available for 30 days)

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

This was referenced Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(custom-resources): Package @aws-sdk/client-memory-db does not exist
2 participants