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

chore(redshift-alpha): migrate database query handlers #28130

Closed
wants to merge 7 commits into from

Conversation

colifran
Copy link
Contributor

This PR moves the database query handlers to our new centralized location for custom resource handlers in the @aws-cdk package.


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

Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
@github-actions github-actions bot added the p2 label Nov 25, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team November 25, 2023 05:07
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 25, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3524d8d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 25, 2023
Copy link
Contributor

@vinayak-kukreja vinayak-kukreja left a comment

Choose a reason for hiding this comment

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

Hey, just some clarification questions as comments.

I also wanted to understand, if the following files are new or were just moved for migration:

  • packages/@aws-cdk/custom-resource-handlers/lib/aws-redshift-alpha/database-query-handlers/handler-props.ts
  • packages/@aws-cdk/custom-resource-handlers/lib/aws-redshift-alpha/database-query-handlers/types.ts
  • packages/@aws-cdk/custom-resource-handlers/lib/aws-redshift-alpha/database-query-handlers/util.ts

@@ -46,7 +46,7 @@ jest.mock('@aws-sdk/client-secrets-manager', () => ({
},
}));

import { handler as manageUser } from '../../lib/private/database-query-provider/user';
import { handler as manageUser } from '../../../lib/aws-redshift-alpha/database-query-handlers/user';
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing this to 'database-query-handlers' would be breaking change for users when importing. We should add that to the PR.

@@ -0,0 +1,39 @@
import { Column, TableDistStyle, TableSortStyle } from './types';

export type ClusterProps = Omit<DatabaseQueryHandlerProps, 'handler'>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am surprised Omit works with JSII. Can you confirm this?

@@ -6,7 +6,7 @@ import { ICluster } from './cluster';
import { DatabaseOptions } from './database-options';
import { DatabaseSecret } from './database-secret';
import { DatabaseQuery } from './private/database-query';
import { HandlerName } from './private/database-query-provider/handler-name';
import { HandlerName } from './private//handler-name';
Copy link
Contributor

Choose a reason for hiding this comment

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

// in the import

Copy link
Contributor

Choose a reason for hiding this comment

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

Also do you have context why these are named private and handler-name?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can this instead be a constants.ts?

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. handler-migration p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants