-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Tags not working after version 0.34.0 #2822
Tags not working after version 0.34.0 #2822
Comments
Confirming I was able to reproduce the issue locally. Will be working on a fix. |
Hi @AlexRex , I might be wrong but I think that it seems that there has been an issue with a refactoring of the code: I think this: does not produce the same as: So I think is related to #2731 Might be worth checking with @eladb about the refactoring from #2731. I am really happy to help, and will probably spend a bit of time tomorrow morning trying to understand the cruds of the refactoring done, but my knowledge of cdk code/core is limited to a month trying to get that cdk deploy tags working ;) Thanks and apologies again @AlexRex |
Modifying this line: from this: does the job. All 3 then work mostly as expected. It does look like it doesn't detect that much the change on the stacks when removing the tags. I believe it was doing that before but it might be also related to us not sending anymore an empty array around when there are no tags. |
Thanks for the research @IsmaelMartinez . I'll have a PR with the change ready. Before that though, can clarify some of your comments for me?
What 3, exactly?
I don't understand this point. I think we still send an empty array, no? |
Regarding all 3, I mean via constructor, applyAspect and parameter (cdk deploy --tags) For the second part, yeah, I thought it will send an empty array, but they might be other changes that is affecting this (or it might have been not working before. I will confirm that tomorrow). Basically, if you got tags and then you remove all of them (via constructor or aspect), the cdk don't detect the changes. |
Hi @skinny85 , using the flatmap does the job (as it returns and empty array), so your pr works. I was been more "brute" on my code change. I notice another "issue" with the constructor part.
That will not synth the tags. It will apply them, with your change, but not synth them. If you do applyAspect, it does synth fine. This might be either a think that I didn't pick up in my tests, or something todo with the division of the synth and deploy steps. |
Describe the bug
After adding this PR (#2185) into the library we cannot deploy Tags anymore. We get a validation error
To Reproduce
With version:
Create new sample App:
Add tags:
Run deploy:
Result:
Expected behavior
It should deploy the app without validation errors.
Version:
I've been debugging a bit and it looks like in the class
param_validator
the Tags object is an array of arrays[ [ { Key: 'hack', Value: 'nope!' } ] ]
. Manually changing this file to flatten theTags
object solves the problem:The unique way I found the feature working is when passing the parameters in the CLI.
The text was updated successfully, but these errors were encountered: