Skip to content

Conversation

@Makeshift
Copy link

@Makeshift Makeshift commented Feb 7, 2025

Proposed changes

Someone went through the effort of creating a stringify function and forgot to use it 😁

@github-actions
Copy link

github-actions bot commented Feb 7, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@github-actions
Copy link

github-actions bot commented Feb 8, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@github-actions
Copy link

github-actions bot commented Feb 8, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

Copy link
Contributor

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR and helping clean up our codebase! Overall the PR looks like a great addition. I'll test this change on the side and merge when possible.

extends Omit<aws.eks.AddonArgs, "resolveConflicts" | "clusterName" | "configurationValues"> {
cluster: Cluster;
configurationValues?: object;
configurationValues?: pulumi.Input<object>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This should be a safe change as the API is currently modeled as an Input already (ref) so this isn't a breaking change.

Copy link
Author

Choose a reason for hiding this comment

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

Indeed! The types were telling me that an Input should be fine but then it put Calling [toJSON] on an [Output<T>] is not supported in my JSON blob

...args,
clusterName: cluster.core.cluster.name,
configurationValues: JSON.stringify(args.configurationValues),
configurationValues: stringifyAddonConfiguration(args.configurationValues),
Copy link
Contributor

Choose a reason for hiding this comment

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

We might need to be more careful here. stringifyAddonConfiguration changes the ordering, and may cause replacements for existing users. We'll need to test this out.

Copy link
Author

@Makeshift Makeshift Feb 10, 2025

Choose a reason for hiding this comment

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

In order to avoid changing the order for users who are already utilising this, would it be safer to just use pulumi.jsonStringify(args.configurationValues) ?

I think it would be safe to assume that if the user required a deterministic order, they would have ran into this issue already and either worked around the wrapper component or implemented their own ordering solution, so it's a bit too late to add now.

@Makeshift
Copy link
Author

I was just doing some refactoring of my component that handles EKS addons and ran into this issue again. I don't think it's been fixed elsewhere. @rquitales could we have a look at this again?

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