Skip to content
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

feat: parameters property in StackSet construct #447

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pcholakov
Copy link

Before this change, the StackSet construct supported only per-target parameter overrides. This is not sufficient to pass parameters to a stack template; parameters have to be set before they can be overridden per target -- see #115.

@pcholakov pcholakov changed the title Expose StackSet parameters property feat; Expose a parameters property in StackSet construct May 12, 2024
@pcholakov pcholakov changed the title feat; Expose a parameters property in StackSet construct feat: Expose a parameters property in StackSet construct May 12, 2024
@pcholakov pcholakov marked this pull request as ready for review June 5, 2024 16:20
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pcholakov! Thanks for the PR and I am very sorry about the extremely delayed review. If you're still interested in contributing this, please take a look at my comments. Nothing seems too controversial.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd prefer you create a new test rather than modify an existing one. parameterOverrides is still a valid thing to do so we still need to test for it.

Comment on lines +40 to +42
parameters: {
Param1: 'Value1',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in your new test, can you add multiple parameters please

Comment on lines +671 to +676
parameters: props.parameters ? Object.entries(props.parameters).map((entry) => {
return {
parameterKey: entry[0],
parameterValue: entry[1],
};
}) : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will add parameters: undefined to everyone's stackset, which isn't the end of the world, but people don't like snapshot diffs. instead we can do the following pattern:

...(props.parameters ? { parameters: {} } : {})

this way no parameters means no parameter property at all and no one's diff gets needlessly updated.

@@ -346,7 +347,8 @@ interface DeploymentTypeConfig {
readonly callAs?: CallAs;
}

interface DeploymentTypeOptions {}
interface DeploymentTypeOptions {
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change back these stylistic choices.

@kaizencc kaizencc changed the title feat: Expose a parameters property in StackSet construct feat: parameters property in StackSet construct Dec 24, 2024
@pcholakov
Copy link
Author

Hey @kaizencc, absolutely no worries - still interested in contributing this and will update with your comments addressed :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants