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

feat: rds.DatabaseInstance.fromLookup #32358

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pcheungamz
Copy link

Issue # (if applicable)

#31720

Reason for this change

Add new rds.DatabaseInstance.fromLookup feature.
This change depends on cdklabs/cloud-assembly-schema#72

Description of changes

  • Added RDS_DATABASE_INSTANCE_PROVIDER and DatabaseInstanceContextQuery to cloud-assembly.
  • Added IRdsClient.
  • Added DatabaseInstanceContextProviderPlugin.
  • Added fromLookup to DatabaseInstanceBase.

Description of how you validated changes

Included these tests:

  • context provider test for getting instanceIdentifier
  • unit test for rds.DatabaseInstance.fromLookup.

Checklist


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

@pcheungamz pcheungamz requested a review from a team as a code owner December 2, 2024 15:02
@aws-cdk-automation aws-cdk-automation requested a review from a team December 2, 2024 15:02
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Dec 2, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation added the pr/needs-cli-test-run This PR needs CLI tests run against it. label Dec 2, 2024
@pcheungamz pcheungamz changed the title New code for rds.DatabaseInstance.fromLookup feat: rds.DatabaseInstance.fromLookup Dec 2, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@pcheungamz
Copy link
Author

cd packages/@aws-cdk-testing/framework-integ
yarn integ --directory test/aws-rds/test

Verifying integration test snapshots...

UNCHANGED integ.cluster-dual 1.515s
UNCHANGED integ.cluster-s3 1.657s
UNCHANGED integ.cluster-instance-ca-certificate 1.741s
UNCHANGED integ.cluster-s3.mysql-8 1.725s
UNCHANGED integ.cluster-io 1.847s
UNCHANGED integ.cluster-serverless-v2-acu 1.993s
UNCHANGED integ.cluster-instance-id 2.093s
UNCHANGED integ.cluster-performance-insights 2.076s
UNCHANGED integ.cluster-s3.postgres 2.191s
UNCHANGED integ.cluster-rotation.lit 2.272s
UNCHANGED integ.cluster-kerberos 2.243s
UNCHANGED integ.cluster-enable-local-write-forwarding 2.366s
UNCHANGED integ.cluster-data-api-to-imported-cluster 2.408s
UNCHANGED integ.cluster-data-api 2.537s
UNCHANGED integ.cluster-serverless-v2 2.707s
UNCHANGED integ.cluster-public-subnets 2.666s
UNCHANGED integ.instance-ca-certificate 1.732s
UNCHANGED integ.instance-gp3 1.662s
UNCHANGED integ.instance-dual 1.766s
UNCHANGED integ.instance-create-grant 2.081s
UNCHANGED integ.cluster 2.218s
UNCHANGED integ.instance-s3-postgres 1.823s
UNCHANGED integ.instance-io2 2.131s
UNCHANGED integ.instance-kerberos-without-domainRole 2.133s
UNCHANGED integ.cluster-snapshot 2.818s
UNCHANGED integ.instance-with-parameter-group 1.828s
UNCHANGED integ.instance-with-metric 2.098s
UNCHANGED integ.instance-kerberos 2.204s
UNCHANGED integ.proxy-mariadb 1.842s
UNCHANGED integ.proxy-sql-server 1.668s
UNCHANGED integ.read-replica 1.653s
UNCHANGED integ.serverless-cluster-secret-rotation-custom-names 1.215s
UNCHANGED integ.serverless-cluster-secret-rotation 1.229s
UNCHANGED integ.read-replica-with-allocated-storage 1.911s
UNCHANGED integ.serverless-cluster-scaling 1.418s
UNCHANGED integ.proxy 1.999s
UNCHANGED integ.rolling-instance-updates 1.861s
UNCHANGED integ.instance-from-generated-password 4.872s
UNCHANGED integ.instance-s3 4.665s
UNCHANGED integ.serverless-cluster-no-vpc 3.05s
UNCHANGED integ.instance.lit 4.792s
UNCHANGED integ.serverless-cluster 3.261s

Snapshot Results:

Tests: 42 passed, 42 total
Done in 8.46s.

@pcheungamz
Copy link
Author

Hi, I touched packages/aws-cdk, but I didn't change any CLI. This is a Clarification Request.

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Dec 2, 2024
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Features must contain a change to an integration test file and the resulting snapshot.
❌ CLI code has changed. A maintainer must run the code through the testing pipeline (git fetch origin pull/32358/head && git push -f origin FETCH_HEAD:test-main-pipeline), then add the 'pr-linter/cli-integ-tested' label when the pipeline succeeds.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-cli-test-run This PR needs CLI tests run against it. pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants