-
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
feat(pipelines): add static PipelineBase.isPipeline method #21075
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.
Thank you for your contribution! I've exempted the requirements for a README update and integ-tests, but this will need unit tests. We really should have had unit tests for pipeline-base, but since we don't, feel free to create a new test file for it.
Everything else looks good.
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. |
Along with unit test
Pull request has been modified.
@TheRealAmazonKendra Sorry for the delay on this. I just added a unit test for the new |
@Mergifyio update |
✅ Branch has been successfully updated |
Hey @Rabadash8820 change looks good but could you please make sure your code is using the correct styling. You can run the linter locally to fix or the PR build tells you any violations. Thanks. |
@mrgrain Which PR check shows the styling violations? I don't have access to the AWS account linked from the |
@Rabadash8820 I've been there. The build posts a comment with link to the public build logs. Will be much easier if you run |
As @mrgrain notes, we have multiple linters. The PR linter only informs you of what is missing from the PR, i.e. unit tests, integration tests, or a README update. We also run eslint, pkglint, and awslint in the build. If you look at the message posted by aws-cdk-automation, you can see the output of the build (pasted below for your convenience):
The build logs link will take our straight to the build output so you can see any failure messages, errors, etc. We cannot accept code changes that do not pass the build. With ~65 open PRs and ~1700 open issues, we do not have the capacity to fix tests and code on behalf of contributors. We appreciate the work of everyone and we are happy to answer any questions about failures/error/unclear documentation. |
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.
Putting this back into changes requested so we can see more clearly when updates have been made.
- Assertions now use correct types - Test Pipeline object is now less ceremonious and just uses an anonymous type, and passes the required `synth` prop to PipelineBase constructor - Also fixed some styling/casing errors and inconsistencies
Pull request has been modified.
Thanks for the pointers, @mrgrain and @TheRealAmazonKendra. I've fixed those styling issues and updated the unit test so that it actually passes (see latest commit message for more info). It took a little while cause the |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This change adds a new `isPipeline` method to `PipelineBase`. This method works the same way as `Stack.isStack` (checking if a specific `Symbol` property is defined on the provided object), and serves the same purpose: to check if a provided object extends `PipelineBase` (e.g., `CodePipeline` would return true, while `Stack` or `s3.Bucket` would return false). ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### ~Adding new Unconventional Dependencies:~ ~* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)~ ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change adds a new
isPipeline
method toPipelineBase
. This method works the same way asStack.isStack
(checking if a specificSymbol
property is defined on the provided object), and serves the same purpose: to check if a provided object extendsPipelineBase
(e.g.,CodePipeline
would return true, whileStack
ors3.Bucket
would return false).All Submissions:
Adding new Unconventional Dependencies:* [ ] This PR adds new unconventional dependencies following the process described hereNew Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license