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(msk-alpha): add brokerEndpoints property on cluster #33547

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

Conversation

vdahlberg
Copy link
Contributor

Reason for this change

Currently only some broker endpoints are retrievable;

new CfnOutput(this, 'BootstrapBrokers', { value: cluster.bootstrapBrokers });
new CfnOutput(this, 'BootstrapBrokersTls', { value: cluster.bootstrapBrokersTls });
new CfnOutput(this, 'BootstrapBrokersSaslScram', { value: cluster.bootstrapBrokersSaslScram });
new CfnOutput(this, 'BootstrapBrokerStringSaslIam', { value: cluster.bootstrapBrokersSaslIam });

While the BootstrapBrokers API can return many more.

The CustomResource used to fetch the brokers also use the first fetched responseField in the logical id;

  private _bootstrapBrokers(responseField: string): string {
    if (!this._clusterBootstrapBrokers) {
      this._clusterBootstrapBrokers = new cr.AwsCustomResource(this, `BootstrapBrokers${responseField}`, {

This means just changing the order, changes the logical id. Which isn't a breaking change as I understand, but a somewhat unnecessary behavioral change.

Description of changes

Introduced brokerEndpoints property which uses a custom resource to retrieve all bootstrap broker endpoints.
Keep old API for full backwards compability, but should probably be deprecated in the future.

Description of how you validated changes

Unit tests not really applicable.
Deploying minimal stacks and using cloudformation exports to export several various broker endpoints depending on cluster setup.
Updated integrations tests but can not run them unfortunately.

Checklist


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

@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Feb 21, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 21, 2025 15:14
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 fails with the following errors:

❌ Features must contain a change to an integration test file and the resulting snapshot.

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.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@vdahlberg
Copy link
Contributor Author

Exemption Request

I am not able to run the integration test and store the snapshot myself .
Can a maintainer help with this please?

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Feb 21, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Can you re-run the integration test and update the snapshot please?

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-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants