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

DXCDT-339: Fix issue with properties not being computed on oidc connections #443

Merged
merged 4 commits into from
Jan 27, 2023

Conversation

sergiught
Copy link
Contributor

🔧 Changes

The following option fields on the connection authorization_endpoint, issuer, jwks_uri, token_endpoint, or user_info_endpoint can be set to default values by the API, thus we need to make them Computed in order to prevent erroneous diffs when planning or applying.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@sergiught sergiught marked this pull request as ready for review January 27, 2023 08:33
@sergiught sergiught requested a review from a team as a code owner January 27, 2023 08:33
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2023

Codecov Report

Base: 87.11% // Head: 87.11% // No change to project coverage 👍

Coverage data is based on head (e2d4cbc) compared to base (ac1ab8e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #443   +/-   ##
=======================================
  Coverage   87.11%   87.11%           
=======================================
  Files          42       42           
  Lines        9192     9192           
=======================================
  Hits         8008     8008           
  Misses        910      910           
  Partials      274      274           
Impacted Files Coverage Δ
internal/provider/resource_auth0_connection.go 72.83% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -23,6 +23,7 @@ var connectionSchema = map[string]*schema.Schema{
"display_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Copy link
Contributor

@Widcket Widcket Jan 27, 2023

Choose a reason for hiding this comment

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

The following option fields on the connection authorization_endpoint, issuer, jwks_uri, token_endpoint, or user_info_endpoint can be set to default values by the API

Just checking, display_name as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Apparently display_name is a computed value for OIDC connection types, defaulting to the name field if not defined. It's a bit of a toss-up of wether its' worth it to mark as computed for all connections to accommodate this single connection type, but the consequences are minimal either way. @sergiught and I just changed our minds on this and decided to remove to minimize the effects for the majority of users.

Copy link
Contributor

@willvedd willvedd left a comment

Choose a reason for hiding this comment

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

Makes complete sense now that OIDC discovery has been implemented on the server-side.

@sergiught sergiught merged commit 1666209 into main Jan 27, 2023
@sergiught sergiught deleted the issue-435/DXCDT-339-conn-diff branch January 27, 2023 16:59
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.

4 participants