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(sns): add fromTopicName api to import a sns topic via the topic name #26635

Closed
wants to merge 1 commit into from
Closed

feat(sns): add fromTopicName api to import a sns topic via the topic name #26635

wants to merge 1 commit into from

Conversation

MiguelBebensee
Copy link

This pull request extends the SNS topic by importing via the topic name. In addition, the documentation of the API is improved.

There is no link to an issue.

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Aug 4, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 4, 2023 10:40
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.

@MiguelBebensee MiguelBebensee changed the title feature(sns): add fromTopicName api to import a sns topic via the topic name feat(sns): add fromTopicName api to import a sns topic via the topic name Aug 4, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi @MiguelBebensee, thanks for opening this PR. We cannot take a look until the build succeeds. See the current error:

aws-cdk-lib: FAIL aws-sns/test/sns.test.js
aws-cdk-lib:   ● Topic › fromTopicName
aws-cdk-lib:     expect(received).toEqual(expected) // deep equality
aws-cdk-lib:     Expected: "arn:aws:sns:*:123456789012:my_corporate_topic"
aws-cdk-lib:     Received: "arn:${Token[AWS.Partition.11]}:sns:${Token[AWS.Region.12]}:${Token[AWS.AccountId.8]}:my_corporate_topic"
aws-cdk-lib:     �[0m �[90m 359 |�[39m     �[90m// THEN�[39m�[0m
aws-cdk-lib:     �[0m �[90m 360 |�[39m     expect(imported�[33m.�[39mtopicName)�[33m.�[39mtoEqual(�[32m'my_corporate_topic'�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m�[31m�[1m>�[22m�[39m�[90m 361 |�[39m     expect(imported�[33m.�[39mtopicArn)�[33m.�[39mtoEqual(�[32m'arn:aws:sns:*:123456789012:my_corporate_topic'�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m �[90m     |�[39m                               �[31m�[1m^�[22m�[39m�[0m
aws-cdk-lib:     �[0m �[90m 362 |�[39m     expect(imported�[33m.�[39mfifo)�[33m.�[39mtoEqual(�[36mfalse�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m �[90m 363 |�[39m�[0m
aws-cdk-lib:     �[0m �[90m 364 |�[39m   })�[33m;�[39m�[0m
aws-cdk-lib:       at Object.toEqual (aws-sns/test/sns.test.ts:361:31)
aws-cdk-lib:   ● Topic › fromTopicName fifo
aws-cdk-lib:     expect(received).toEqual(expected) // deep equality
aws-cdk-lib:     Expected: "arn:aws:sns:*:123456789012:mytopic.fifo"
aws-cdk-lib:     Received: "arn:${Token[AWS.Partition.11]}:sns:${Token[AWS.Region.12]}:${Token[AWS.AccountId.8]}:mytopic.fifo"
aws-cdk-lib:     �[0m �[90m 373 |�[39m     �[90m// THEN�[39m�[0m
aws-cdk-lib:     �[0m �[90m 374 |�[39m     expect(imported�[33m.�[39mtopicName)�[33m.�[39mtoEqual(�[32m'mytopic.fifo'�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m�[31m�[1m>�[22m�[39m�[90m 375 |�[39m     expect(imported�[33m.�[39mtopicArn)�[33m.�[39mtoEqual(�[32m'arn:aws:sns:*:123456789012:mytopic.fifo'�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m �[90m     |�[39m                               �[31m�[1m^�[22m�[39m�[0m
aws-cdk-lib:     �[0m �[90m 376 |�[39m     expect(imported�[33m.�[39mfifo)�[33m.�[39mtoEqual(�[36mtrue�[39m)�[33m;�[39m�[0m
aws-cdk-lib:     �[0m �[90m 377 |�[39m   })�[33m;�[39m�[0m
aws-cdk-lib:     �[0m �[90m 378 |�[39m�[0m
aws-cdk-lib:       at Object.toEqual (aws-sns/test/sns.test.ts:375:31)

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@@ -21,6 +21,26 @@ const topic = new sns.Topic(this, 'Topic', {

Note that FIFO topics require a topic name to be provided. The required `.fifo` suffix will be automatically generated and added to the topic name if it is not explicitly provided.

## Import
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't use the term "import". This is confusing because it doesn't actually import resources into the stack (which people might otherwise think it does).

We prefer the term "referencing existing resources".

@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Sep 3, 2023
@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.

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.

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 closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants