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

Add support to manage Teams in Projects #121

Merged
merged 51 commits into from
Aug 13, 2021
Merged

Conversation

tmeckel
Copy link
Contributor

@tmeckel tmeckel commented Aug 1, 2020

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?

This pull request contains the following new resources:

  • azuredevops_team - for managing a Team
  • azuredevops_team_members - for managing members of a team
  • azuredevops_team_administrators - for managing administrators of a team

This pull request contains the following new data sources:

  • azuredevops_team - to load information about a Team inside a Project in Azure DevOps
  • azuredevops_teams - to load all Teams defined in a a Project in Azure DevOps or all (accessible) Teams of all (accessible) Projects

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?

N/A

Other information

#343

@tmeckel tmeckel force-pushed the r_teams branch 2 times, most recently from cbdd6ad to 8fd6bcf Compare August 17, 2020 08:56
@tmeckel tmeckel force-pushed the r_teams branch 2 times, most recently from ec3560d to f520c55 Compare May 5, 2021 16:10
@tmeckel tmeckel marked this pull request as ready for review May 5, 2021 17:47
@tmeckel
Copy link
Contributor Author

tmeckel commented May 5, 2021

@xuzhang3 finally I found some time to finish up the PR. Ready for review

@tmeckel tmeckel changed the title [WIP] Adding support to manage Teams in Projects Adding support to manage Teams in Projects May 5, 2021
@tmeckel
Copy link
Contributor Author

tmeckel commented May 5, 2021

There is an issue with the tfproviderdocs tool

image

Therefore the pipeline is failing at an early state. I can reproduce the error locally. So I guess the repo is kinda broken. @xuzhang3 shouldn't we not pin the tools which got installed with GNUmakefile to a specific version`?

copy @bflad and @katbyte for reference

@xuzhang3
Copy link
Collaborator

xuzhang3 commented May 7, 2021

Hi @tmeckel Fixed and merged, please update the latest code.

@tmeckel
Copy link
Contributor Author

tmeckel commented May 7, 2021

@xuzhang3 will rebase the PR later today

@xuzhang3
Copy link
Collaborator

xuzhang3 commented May 8, 2021

@tmeckel I have reverted the SDK upgrade. Current master code is based on v0.1.4, the tools install issue has been fixed in PR #376 . Sorry for the inconvenient.

@tmeckel
Copy link
Contributor Author

tmeckel commented May 8, 2021

@xuzhang3 No worries! Thanks for having the issues sorted and fixed! 👍🏼 👍🏼

@tmeckel tmeckel mentioned this pull request May 8, 2021
@tmeckel
Copy link
Contributor Author

tmeckel commented May 21, 2021

@xuzhang3 ping! 😀

@xuzhang3
Copy link
Collaborator

Hi @tmeckel I will review this PR next week!

@xuzhang3
Copy link
Collaborator

@xuzhang3 while debugging the acceptance test I came across the infamous '<' looking for beginning of value error again! I guess we have a real issue here! Really sucks to debug, because it only shows up intermittently!

image

This error not always happen. A potential error is service returned the response as HTML(PAT expires or other errors), the client.UnmarshalCollectionJson cannot marshal the response object and return the parse error.

An error example:

func main() {
	var responseValue []build.DefinitionResourceReference
	err := json.Unmarshal([]byte("<html></html>"), &responseValue)
	fmt.Println(err)
}

Result:
invalid character '<' looking for beginning of value

azuredevops/internal/service/core/resource_team.go Outdated Show resolved Hide resolved
azuredevops/internal/service/core/resource_team.go Outdated Show resolved Hide resolved
azuredevops/internal/acceptancetests/resource_team_test.go Outdated Show resolved Hide resolved
website/docs/d/data_team.html.markdown Outdated Show resolved Hide resolved
website/docs/r/team.html.markdown Outdated Show resolved Hide resolved
website/docs/r/team.html.markdown Outdated Show resolved Hide resolved
website/docs/r/team.html.markdown Outdated Show resolved Hide resolved
website/docs/d/data_teams.html.markdown Outdated Show resolved Hide resolved
@tmeckel
Copy link
Contributor Author

tmeckel commented May 26, 2021

@xuzhang3 I overhauled the code a bit 😀 ready for next review!

@tmeckel tmeckel requested a review from xuzhang3 May 26, 2021 17:26
@tmeckel tmeckel changed the title Adding support to manage Teams in Projects Add support to manage Teams in Projects May 26, 2021
xuzhang3 and others added 2 commits May 31, 2021 17:25
@tmeckel
Copy link
Contributor Author

tmeckel commented Aug 9, 2021

@xuzhang3 ping ❤️

@xuzhang3
Copy link
Collaborator

@tmeckel can you help resolve the conflicting files: azuredevops/provider.go

@xuzhang3
Copy link
Collaborator

LGTM

@xuzhang3 xuzhang3 merged commit 8bd5fb5 into microsoft:master Aug 13, 2021
@tmeckel tmeckel deleted the r_teams branch November 13, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants