-
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
ec2: InitCommand.argvCommand dedupes its args, causing the wrong command to be generated) #26221
Closed
fidothe opened this issue
Jul 4, 2023
· 3 comments
· Fixed by #30821 or mannjaro/serverless-bedrock-proxy#2 · May be fixed by NOUIY/aws-solutions-constructs#120, NOUIY/aws-solutions-constructs#121 or NOUIY/aws-solutions-constructs#128
Closed
ec2: InitCommand.argvCommand dedupes its args, causing the wrong command to be generated) #26221
fidothe opened this issue
Jul 4, 2023
· 3 comments
· Fixed by #30821 or mannjaro/serverless-bedrock-proxy#2 · May be fixed by NOUIY/aws-solutions-constructs#120, NOUIY/aws-solutions-constructs#121 or NOUIY/aws-solutions-constructs#128
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Comments
fidothe
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jul 4, 2023
github-actions
bot
added
the
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
label
Jul 4, 2023
fidothe
added a commit
to fidothe/cdk-ec2-construct-bug-repro
that referenced
this issue
Jul 4, 2023
fidothe
changed the title
(aws-cdk/aws_ec2): (ec2.InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
(aws-cdk-lib/aws-ec2): (ec2.InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
Jul 4, 2023
pahud
changed the title
(aws-cdk-lib/aws-ec2): (ec2.InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
ec2: (ec2.InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
Jul 5, 2023
pahud
changed the title
ec2: (ec2.InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
ec2: InitCommand.argvCommand dedupes its args, causing the wrong command to be generated)
Jul 5, 2023
Yes I can reproduce this in my account With this configuration: init: ec2.CloudFormationInit.fromElements(
ec2.InitCommand.argvCommand([
'useradd', '-a', '-u', '1001', '-g', '1001', 'eguser',
]),
ec2.InitCommand.argvCommand([
'useradd', '-a', '-u', '1001', '-g', '1001', 'eguser',
]),
ec2.InitCommand.argvCommand([
'useradd', '-u', '1001', '-g', '1001', 'eguser',
]), I got incorrect template definition(001 and 002) as below:
|
1 task
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
using
ec2.InitCommand.argvCommand()
can, in some circumstances, remove duplicate strings from the input array, causing unexpected output.Expected Behavior
Expected the following
To generate the following YAML:
Current Behavior
The following YAML was generated. Note the omission of the second occurrence of '1001' in the second command:
Reproduction Steps
The CDK App in the provided repo contains the minimal resources needed to demonstrate the bug when running
cdk synth
:https://github.com/fidothe/cdk-ec2-construct-bug-repro
git clone https://github.com/fidothe/cdk-ec2-construct-bug-repro && cd cdk-ec2-construct-bug-repro && cdk synth
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.85.0 (build 4e0d726)
Framework Version
No response
Node.js Version
v18.16.1
OS
macOS 13.4.1
Language
Typescript
Language Version
Typescript (5.1.5)
Other information
No response
The text was updated successfully, but these errors were encountered: