-
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(codebuild): API cleanup #2745
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.
Does it make sense to put artifacts and sources in separate packages? Wouldn't a single package for both be just as effective (and less overhead)?
Also, I would be fine with names a la In effect, service + integration type. This is what we've been settling on for most of the integration classes (except the SFN tasks one, where it's an action verb, |
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.
+1 on merging artifacts into -sources
(or leaving in @aws-cdk/codebuild).
Just so I understand - for the second option, are you saying to leave just Artifacts in |
+1 for leaving sources in codebuild |
Any justification why do we want to make CodeBuild inconsistent with our other integration packages? |
Are you asking about the sources? It seems to be codebuild sources are not really “integrations”, but if you feel strongly about it, I don’t have a strong opinion. |
Whatever then. Let's change this PR to finalize the names, in that case (and do small cleanups, like removing the Currently, the names are:
I'm thinking of removing the
I think I would also like to get rid of the |
Names look good. Not sure why you think NoSource and NoArtifacts are not useful. It’s actually a very common use case in the CDK’s ops app (all our canaries are codebuild projects without a source) |
Because |
got it. Yeah I guess as long as users can use these features I guess you can hide those. |
d1b5f7d
to
a39a748
Compare
I've re-purposed the PR for general changes in the CodeBuild modules (see description). |
a39a748
to
f88d482
Compare
f88d482
to
e753892
Compare
Changes taking into account the comments from the previous revision. |
e753892
to
d76083f
Compare
Change the names of the source classes to be more consistent with other integrations. Introduce an ISource interface. Make all Source subclasses package-private, and use static factory methods on Source (renamed from BuildSource) instead. Change the names of artifacts classes to be more consistent with other integrations. Introduce the IArtifacts interface. Make all Artifacts subclasses package-private, and use static factory methods on Artifacts (renamed from BuildArtifacts) instead. Get rid of the SourceType enum. Remove the buildScriptAsset and buildScriptAssetEntrypoint properties. Make Project implements ec2.IConnectable instead of exposing secuirtyGroups directly. BREAKING CHANGE: * codebuild: rename BuildSource to Source, BuildArtifacts to Artifacts * codebuild: all Source and Artifacts classes can only be created through static factory methods instead of constructors * codebuild: the construction properties buildScriptAsset and buildScriptAssetEntrypoint were removed * codebuild: the Projet.securityGroups property has been removed; Project now implements ec2.IConnectable instead
d76083f
to
6403b4f
Compare
Latest batch of changes. |
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.
See some comments for future improvements.
Change the names of the source classes to be more consistent with other integrations. Make the abstract Source classes package-private. Add static factory methods to Source.
Change the names of artifacts classes to be more consistent with other integrations. Add static factory methods to Artifacts.
Make CodePipelineSource, CodePipelineArtifacts, NoSource, and NoArtifacts package-private.
Get rid of the SourceType enum.
BREAKING CHANGE:
Pull Request Checklist
design
folderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.