-
Notifications
You must be signed in to change notification settings - Fork 763
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
Upgrade to go-github version 29.0.3 #368
Comments
Hi @martinssipenko I was looking at this independently of you based on our discussion on #362. I have implemented a method of retrieving the |
@benj-fletch yes, i think they do. |
@martinssipenko You beat me to it, I was looking into this last night to try to solve #305. |
I think this issue can now be closed following the merge of #369 ? |
I wanted to create a pull request to upgrade go-github to version 29.0.3, however, I've stumbled across issues that I'd like to discuss prior moving forward with implementation.
The issue is that GitHub has deprecated some of the Team API endpoints (marked as Legacy here). After this change go-github has made a braking change in version 29.0.3, where they removed some methods by replacing them with others methods.
This terraform provider currently uses the deleted methods in
resource_github_team.go
(GetTeam
,EditTeam
,DeleteTeam
) andresource_github_team_repository.go
(AddTeamRepo
,IsTeamRepo
,RemoveTeamRepo
).This makes the upgrade hard because the provider code needs to be updated to use new methods of go-github, but the new methods require extra arguments. For example
AddTeamRepo
is now replaced byAddTeamRepoByID
andAddTeamRepoBySlug
.AddTeamRepoByID
requiresteamId (int)
which we do have andorgID (int)
which we don't have in state. The other methodAddTeamRepoByID
requiresorgName (string)
which we do have in provider config andslug (string)
which we do have in state, but not as part of ID.The situation is even trickier with
resource_github_team_repository.go
, for exampleAddTeamRepo
func is now replaced by eitherAddTeamRepoByID
orAddTeamRepoBySlug
. TheAddTeamRepoByID
requiresorgID (int)
which we don't have in state andteamID (int)
which is passed as argument into resource. TheAddTeamRepoBySlug
requiresorgName (string)
, which we do have in provider config, and taemslug (string)
which we don't have available.I'm looking for a guidence to how to solve this issue. Should we increment the schema version and use
StateUpgraders
to get the missing data into state? Or should we rethink the interface for affected resources?The text was updated successfully, but these errors were encountered: