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

fix(pipelines): using the same repo more than once as a connection in a pipeline causes duplicate id error #27408

Closed
wants to merge 19 commits into from

Conversation

scanlonp
Copy link
Contributor

@scanlonp scanlonp commented Oct 5, 2023

Differentiates between sources of the same repository by appending the branch name onto the node id and input/output artifacts. This avoids the duplicate id errors for different branches of the same repository, as well as validating that each source is a unique repository & branch combination.

The only change to the CFN template is the input & output artifacts, but since these are not stateful resources, they can be modified without breaking changes. The artifacts are also updates in tandem, so the pipeline source behavior will stay the same.

This change impacts these CodePipelineSources:

  • s3() - objectKey appended
  • connection()
  • codeCommit()

Does not change ecr() behavior as there is no notion of folders or branches.
Does not change github() behavior as doing so would cause destructive changes of webhooks.

Closes #23916 and #19875.


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

@aws-cdk-automation aws-cdk-automation requested a review from a team October 5, 2023 02:00
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Oct 5, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 5, 2023
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.

@scanlonp
Copy link
Contributor Author

scanlonp commented Oct 5, 2023

I have tested this locally, but I am still working on tests - both unit and integ. Wanted to first get confirmation that this will not be a breaking change.

@aws-cdk-automation aws-cdk-automation dismissed their stale review October 17, 2023 20:04

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@scanlonp
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 17, 2023

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/issue-label-assign.yml without workflows permission

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 Oct 19, 2023
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ CLI code has changed. A maintainer must run the code through the testing pipeline (git fetch origin pull/27408/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

AWS CodeBuild CI Report

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

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

@scanlonp
Copy link
Contributor Author

Reopened in #27602.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1 pr/needs-cli-test-run This PR needs CLI tests run against it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(pipelines): using the same repo more than once as a connection in a pipeline causes duplicate id error
2 participants