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

Bug fix azuredevops_users - Fix user not found #1110

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

xuzhang3
Copy link
Collaborator

All Submissions:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • I ran lint checks locally prior to submission.
  • Have you checked to ensure there aren't other open PRs for the same update/change?

What about the current behavior has changed?

Issue Number: #936
Return error if user not found.

=== RUN   TestAccUsers_DataSource
=== PAUSE TestAccUsers_DataSource
=== RUN   TestAccUsers_DataSource_AllSvc
=== PAUSE TestAccUsers_DataSource_AllSvc
=== RUN   TestAccUsers_DataSource_All_WithFeatures
=== PAUSE TestAccUsers_DataSource_All_WithFeatures
=== CONT  TestAccUsers_DataSource
=== CONT  TestAccUsers_DataSource_All_WithFeatures
=== CONT  TestAccUsers_DataSource_AllSvc
--- PASS: TestAccUsers_DataSource_AllSvc (33.25s)
--- PASS: TestAccUsers_DataSource (42.58s)
--- PASS: TestAccUsers_DataSource_All_WithFeatures (1592.93s)
PASS
ok      github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests        1593.456s

Does this introduce a change to go.mod, go.sum or vendor/?

  • Yes
  • No

Does this introduce a breaking change?

  • Yes
  • No

Any relevant logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Other information

@xuzhang3 xuzhang3 merged commit 90656af into microsoft:main Jul 24, 2024
1 check passed
@drdamour
Copy link
Contributor

@xuzhang3 this broke some behaviour we were depending on...where if a user wasn't known to azdo it didn't fail. we look for all members of groups and add them to teams and now it fails and we have to manually add em. seems like a mistake to force this behaviour

other providers have added an ignore_missing default false to make it work..is that possible here?

@xuzhang3
Copy link
Collaborator Author

@drdamour This resource is empty if specified principal_name or origin_id not found. It should be safe to delete these resources or add the users to ADO

@drdamour
Copy link
Contributor

@xuzhang3 aware...but i AM specifying a name because i want to see if the user exists in azdo and add them to a team if they do.

Adding the user to AzDO isn't something i can do with terraform and requires a manual step so the terraform automation breaks with this "fix"

@xuzhang3
Copy link
Collaborator Author

@drdamour I see, letting the user decide the next step instead of a pop-up error message seems to be a better choice

@xuzhang3
Copy link
Collaborator Author

@drdamour Change has been revert in #1116

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