-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(cdk): fix a bug with CodePipelineSource to create nested repositories #27668
Conversation
There was a problem hiding this 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.
@anshikam, good addition. This will require an integ test. Other than that it looks good! |
Thanks @scanlonp for reviewing this :) I can try adding that based on guidance provided in https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#integration-tests. |
@anshikam you can look here too https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md. I also recently added an example using a pipelines test, so that is (hopefully) doubly helpful! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the integ test, I think we actually need a bit more.
We will need a change to the readme with an example of using a nested repository.
We will need a separate validation function with more descriptive error messages and that catches edge cases.
We will need a test of the validation function with allowed and non-allowed strings.
Each of these should be fairly minor. Thanks!
if (Token.isUnresolved(repoString) || parts.length < 2) { | ||
throw new Error(`GitHub repository name should be a resolved string like '<owner>/<repo>', got '${repoString}'`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move this validation into a function. It should cover the edge case of a string such as 'owner/group1//repo' and give a specific error message.
if (Token.isUnresolved(repoString) || parts.length < 2) { | ||
throw new Error(`CodeStar repository name should be a resolved string like '<owner>/<repo>', got '${repoString}'`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also consider changing the verbiage in the error message regarding the expected resolved string format. As an example, the same repository name field in the console expresses the format as group/subgroup/project.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Hi! What is the status of this PR? |
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. |
@jgilewski-siili looks like the review comments need to be addressed. If you would like to pick it up, go for it! |
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. |
The pull request linter fails with the following errors:
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 |
I got sidetracked with other work. @jgilewski-siili feel free to take up if you have bandwidth |
@anshikam Yap, the bandwidth is the problem. I will probably have some time in the next week. |
@jgilewski-siili is this something you have looked into revisiting? |
Closes #27504.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license