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

[BUG] Only one PDKPipeline can be created per account/region #239

Closed
cogwirrel opened this issue Dec 7, 2022 · 6 comments · Fixed by #338
Closed

[BUG] Only one PDKPipeline can be created per account/region #239

cogwirrel opened this issue Dec 7, 2022 · 6 comments · Fixed by #338
Labels
backlog bug Something isn't working

Comments

@cogwirrel
Copy link
Member

Describe the bug

See: #235

The exportName for the CodeRepositoryGRCUrl is hardcoded and so conflicts with a second deployment of PDKPipeline.

Expected Behavior

Able to deploy multiple PDKPipeline constructs in the same account/region

Current Behavior

Export with name CodeRepositoryGRCUrl is already exported by stack PipelineStack. Rollback requested by user.

Reproduction Steps

Deploy more than one PDKPipeline, either in the same app or as separate apps.

Possible Solution

Include props.repositoryName in the export name since this is already a unique name.

Additional Information/Context

No response

PDK version used

0.12.4

What languages are you seeing this issue on?

Typescript, Java, Python

Environment details (OS name and version, etc.)

OSX

@cogwirrel cogwirrel added the bug Something isn't working label Dec 7, 2022
@JeremyJonas
Copy link
Contributor

@cogwirrel Agree that props.repositoryName prefix seems like a good solution, and creates a deterministic export name. Are there other exports we should consider prefixing while we are in there? Since all exports must be unique, best to always prefix to don't block other stacks

@cogwirrel
Copy link
Member Author

Just had a quick look and yes, we should also prefix SonarqubeSecretArn https://github.com/aws/aws-prototyping-sdk/blob/5a2afcb075b20ca2980dc74d81e271adb38d52ec/packages/pipeline/src/code_scanner/sonar-code-scanner.ts#L227-L230

For this one we'll have to make sure our internal tool points to the new export name as we automate writing the sonar qube token to that secret :)

@github-actions
Copy link

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

@jstrunk
Copy link
Contributor

jstrunk commented Apr 5, 2023

Why is this even an export and not simply an output? I can't find anything that imports the value. I searched all of GitHub for CodeRepositoryGRCUrl, and the only results are the export and test snapshots.

If we make this a simple output, it will solve this problem.

@jstrunk
Copy link
Contributor

jstrunk commented Apr 5, 2023

I see examples of SonarqubeSecretArn getting imported but only in the aws-sample that was based on, so there's still a question of whether that needs to be exported.

How are developers using these values?

@cogwirrel
Copy link
Member Author

cogwirrel commented Apr 5, 2023

The sonar qube secret export is used by our internal tool for bootstrapping new prototyping projects :) I'll send you a link!

As far as I know the code repo url is exported just so it's printed after a CDK deploy, so that users know what to put in the git remote add command :)

jstrunk added a commit to jstrunk/aws-prototyping-sdk that referenced this issue Apr 10, 2023
The pipeline package was exporting `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` which meant the
stack could only be deployed once per region. Nothing seems to be importing these exports. After
discussing with the maintainers, we determined that simple outputs are sufficient.

BREAKING CHANGE: `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` are no longer CloudFormation
exports. Any systems that relied on those being exports will need to be updated to look up the
output value by the stack name.

fix aws#239
jstrunk added a commit to jstrunk/aws-prototyping-sdk that referenced this issue Apr 12, 2023
The pipeline package was exporting `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` which meant the
stack could only be deployed once per region. Nothing seems to be importing these exports. After
discussing with the maintainers, we determined that simple outputs are sufficient.

BREAKING CHANGE: `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` are no longer CloudFormation
exports. Any systems that relied on those being exports will need to be updated to look up the
output value by the stack name.

fix aws#239
agdimech added a commit that referenced this issue Apr 14, 2023
The pipeline package was exporting `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` which meant the
stack could only be deployed once per region. Nothing seems to be importing these exports. After
discussing with the maintainers, we determined that simple outputs are sufficient.

BREAKING CHANGE: `CodeRepositoryGRCUrl` and `SonarqubeSecretArn` are no longer CloudFormation
exports. Any systems that relied on those being exports will need to be updated to look up the
output value by the stack name.

fix #239

Co-authored-by: Adrian Dimech <51220968+agdimech@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants