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

auth0.Connection::options.fieldsMap state is flaky. #653

Open
davidmdm opened this issue Sep 19, 2024 · 2 comments
Open

auth0.Connection::options.fieldsMap state is flaky. #653

davidmdm opened this issue Sep 19, 2024 · 2 comments
Labels
bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec

Comments

@davidmdm
Copy link

Describe what happened

When running pulumi up I create an auth0.Connection with samlp strategy. On this connection object I create the saml connection's options.fieldsMap.

This is a JSON string. However the state of the field does not necessarily the same as the input I provided. I suspect this is an auth0 issue where it parse and serializes the response back, such that the final output state is an equivalent json object string but not the same exact string. This leads to an incessant diff loop for that state.

Currently the only way to correct it, is to change your input options.fieldsMap string to match the output state.

A solution would be to internally save the state as an object and check for equality of the object, not of the string representation.

Sample program

new auth.Connection('example, {
  // ...
  options: {
    fieldsMap: `{"name": "name", "email": "[email protected]"}`
  }
})

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

n/a

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@davidmdm davidmdm added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 19, 2024
@iwahbe iwahbe added bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. and removed needs-triage Needs attention from the triage team labels Sep 20, 2024
@iwahbe
Copy link
Member

iwahbe commented Sep 20, 2024

Hi @davidmdm. I'm sorry you're hitting this bug and I'm glad you found a workaround. Thanks for reporting this to us.

@davidmdm
Copy link
Author

@iwahbe ,no worries! No need to be sorry.

I suspect its more an unfortunate result of the auth0 API returning a serialized version of the object that doesn't match the the string that we provide, and not really an issue on the pulumi side. However, we can probably fix this issue permanently here if we store the state as a JS object instead of a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants