-
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
CodeBuild PipelineProject LinuxBuildImage.STANDARD_6_0 somehow got mixed up with aws-cdk-lib.aws_codebuild.LinuxBuildImage.AMAZON_LINUX_2_ARM #29528
Comments
Even if other build images are used, |
We have a separate library project that does something similar but this one works correctly.
Can't tell what is the difference that causes proper behaviour. |
Update to CDK 2.133.0 did not solve the problem. Probably because the same underlying Amazon.JSII.Runtime 1.94.0 is used. UPDATE Force Amazon.JSII.Runtime update to 1.95.0 at top propject level still yields same result. |
Following the inner libraries' stack the lowest I can get to is
Client relies on Runtime to perform requests and responses for the enum property values but Runtime cannot be decompiled/navigated to thus cannot see how its performing these value references. |
Value caching in play?More details about our stack, and where the "culprit" is. Our system consists for five separate applications and the constructor of the stack defines a CodePipeline for each individual app.
The first three use a different pipeline construct to build and push container images to ECR. CDK has no problem synthesizing those. It's only on the fourth (React) pipeline where the error happens, wihch made us wonder what's wrong with the React pipeline construct. However on later testing by commenting out the container pipelines did CDK finally synthesize the React pipelines as expected. Reversing the order of pipelines (React before container) also works. The former pipeline construct's CodeBuild makes use of
Those somehow have a lingering effect on the latter fourth (React) pipeline to reference I can't track any relation between |
Hi I am not .NET expert but this works for me in cdk v2.126.0 using Amazon.CDK;
using Amazon.CDK.AWS.CodeBuild;
using Constructs;
namespace Dotnet
{
public class DotnetStack : Stack
{
internal DotnetStack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
{
// The code that defines your stack goes here
new PipelineProject(this, "foo", new PipelineProjectProps
{
Environment = new BuildEnvironment
{
BuildImage = LinuxBuildImage.STANDARD_6_0,
ComputeType = ComputeType.MEDIUM
},
ProjectName = "foo",
Timeout = Duration.Minutes(10),
Badge = false,
Cache = Cache.Local(LocalCacheMode.CUSTOM),
});
}
}
} and
LinuxArmBuildImage is for ARM-based images aws-cdk/packages/aws-cdk-lib/aws-codebuild/lib/project.ts Lines 1791 to 1799 in 0fee99b
LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 is defined here. LinuxBuildImage.STANDARD_7_0 is defined here for AMD64 standard images.
How did you upgrade from 2.94.0 to 2.130.0 ? |
We have our own L3 library assembly which depended on 2.130.0, now 2.133.0. The pipeline constructs in play however are not part of that library but with the top-level CDK project. Synth works when the CodePipeline/Codebuild depending on WIth the original reverse order, that's when the strange mis-reference happens. Something that I cannot see with the Runtime class in use (from Client.StaticGet()). |
So who exactly is in charge of the .NET packages? (Amazon.JSII.Runtime) |
I am having the same issue. It's annoying that I had to refactor code because of this silly little bug |
Describe the bug
We have a .NET CDK project that handles deployment of CodePipleline/CodeBuild and has been working based on Amazon.CDK.Lib 2.94.0.
For our React application pipelines, the CodeBuild setup is like
Upon updating to CDK 2.130.0, attempting cdk list would result in strange error.
Why is there involvement with LinuxBuildImage.AMAZON_LINUX_2_ARM? Our definition is for STANDARD_6_0 (Ubuntu).
Expected Behavior
CodeBuild continue to use LinuxBuildImage.STANDARD_6_0 like previously.
Current Behavior
LinuxBuildImage.STANDARD_6_0 somehow ends up as LinuxBuildImage.AMAZON_LINUX_2_ARM and not properly defined under the covers?
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.130.0
Framework Version
.NET 6.0
Node.js Version
18.9.0
OS
Windows 11
Language
.NET
Language Version
C# 10
Other information
No response
The text was updated successfully, but these errors were encountered: