-
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
(pipelines): pipeline type v2 #29146
Comments
I am also impacted by this issue and can offer you some additional information @wcb-pont The issue, briefly summarized, is this:
If your only concern is the warning message, this is suppressible. As an example (see the example included in pipelines for reference): const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
synth: new pipelines.ShellStep('Synth', {
// Use a connection created using the AWS console to authenticate to GitHub
// Other sources are available.
input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
}),
commands: [
'npm ci',
'npm run build',
'npx cdk synth',
],
}),
});
cdk.Annotations.of(pipeline).acknowledgeWarning('@aws-cdk/aws-codepipeline:unspecifiedPipelineType', 'Ignored because we know we are using v1'); This will suppress the warning. BUT - we need this issue to be looked at so that support for the flag/feature can be added to pipelines. It would be much better to just set the PipelineType in pipelines. |
I found something else sort of interesting in this commit: 40ffe2b#diff-8e15d23929b5ff6c128d73523da6a4322f975856fea30df4f969a21edf5f4eb2 The packages/aws-cdk-lib/pipelines/test/codepipeline/codepipeline.test.ts file (part of pipelines and not aws-codepipeline) was modified so that the test would pass when the features were added to aws-codepipeline to support v2. The test in this file appears to do nothing now as the I don't know if this was the most ideal choice. I am not sure what the lift is to have full support for v2 in the pipelines library, but it seems like it would be a relatively easy change to pass PipelineType = v1 and add a note to the readme that currently only supports v1 pipelines. This would resolve the warning. Alternatively, add the annotation in the pipelines library to suppress the warning |
The warning seems to be from here: aws-cdk/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts Lines 492 to 495 in 1fd5485
And according to this, I believe you can acknowledge it using acknowledgeWarning() and looks like you have added that in your code. |
@pahud yes, but the issue is that the official CDK pipelines construct should be the one to either suppress this warning or set PipelineType to V1 when it creates the pipeline object using aws-codepipeline library. I am glad that I can suppress it in my code, but would much rather have the ability to set that directly when i use pipelines. Right now that isn't an option, because pipelines was created long ago before v2 pipelines were a thing. The original creator of this issue wants v2 support added to pipelines. Me personally, i'd be happy if pipelines at least for the short term set PipelineType to v1 when creating the pipeline "under its hood" |
related to #29190 |
I guess this issue can be closed #29199 |
|
Describe the feature
the aws_codepipeline package was update to allow pipeline type v2 (super excited, love it, have been waiting a long time for this)
I have services that use both the pipelines and aws_codepipeline package depending on the use case. I have very easily done the upgrade on my more complex pipelines and shortly will be doing some work for environment variables.
so 2 things:
[Warning at example] V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`. [ack: @aws-cdk/aws-codepipeline:unspecifiedPipelineType]
Hope this doesn't seem pushy, I'm just really excited that the first part came through and even more then wanting to get rid of the warnings. I would like to move a bunch of things to env variables instead of some of the hardcoded arns and ssm work arounds I have going on.
P.S. Got started working on the cognito pre token generation v2 for scopes transition this week and am finishing it up this weekend. like 19 thumbs up on that, makes my multi tenant (users can have multiple tenants also and different scopes per tenant) 1000000x simpler
Use Case
described in feature*
Proposed Solution
described in feature*
if its backlogged to be done shortly, I'm super excited. if not I can toss it in to my work in a few weeks and create a pr
Other Information
No response
Acknowledgements
CDK version used
2.128.0
Environment details (OS name and version, etc.)
n/a
The text was updated successfully, but these errors were encountered: