-
Notifications
You must be signed in to change notification settings - Fork 765
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
GitHub Enterprise provider compatibility #404
Comments
I'm happy to look into this - wondering if it makes sense to bring back the |
Yes, I would assist in merging if an implementation appeared after the incremental changes towards GraphQL support are merged. |
Can confirm issues in GHE. Issues also present when building current master. |
getting the same problem any fix available ? When applying changes to github_team.org1_team, provider This is a bug in the provider, which should be reported in the provider's own |
+1 seeing this as well |
Seems like GHE is falling behind in versions to use this provider... v2.4.1 was the last compatible release. Any update on getting compatibility aligned between OSS Github and GHE? |
@mengesb my next step on this front is to expand our acceptance tests to run against a current version of GHES. This will be a workflow improvement to unblock alignment and avoid drift between the two use cases of this project. Hoping to perform a cursory pass on this in the next two weeks and report back with better time estimates. Thank you for keeping this issue active 😄 |
Quick update here: we have a version 2.21 of GitHub Enterprise running and publicly accessible. Next steps are to create a second acceptance testing job that points at our GHES instance. We will then be able to run tests for various configurations of this project ( Again, aiming to post an update here in a couple of weeks after we get v3.0.0 released. |
Another update here. A couple of PRs are up for review that will improve our testing around GHES use cases going forward.
|
@jcudit any more updates on this one now that 3.0.0 has landed? We're managing a GHE instance with 2.4.1 and it would be great to be able to get some of the features that have landed since. Is there a clear plan of what's still to be done? We may have some capacity on our end to help out a bit. It sounds like |
I asked GitHub support about this as well - the API I've seen causing problems is I see you did mention above that you had a 2.21 version of GHE set up for your acceptance tests, is that all up and passing? |
👋 @r-bennett. I've got this one queued up to start working next week and to be released as part of |
Is there an angle that some of us GHES users should be taking with Microsoft/GitHub now? I really don't want to see two terraform providers that maintain the API inconsistencies between an on-prem and cloud solution. I realize that a vast majority of users may likely be |
My goal is to get github.com and enterprise on equal footing with this provider. The upcoming test suite will allow us to write tests spanning both deployment types, which should help us avoid releasing changes introduce incompatibilities.
I will have to do more reading into how other projects handle this situation. Thanks for highlighting this and any suggestions are welcome. |
So I can confirm that with regard to #536 which is related to this, we updated to GHES 2.21.x and now my module tests pass for setting |
The teams API should be ok on 2.21 according to the github docs, would be great to verify that though |
I've just migrated from 2.9.2 (GH 2.21.5) to 3.0.0 and it seems like the user API's are failing again (getting 406 and "This resource can only be used in the context of an organization, "redacted" is a user."). |
@analytically is that something to do with the changes around provider configuration with From your comment, am I right in reading that 2.9.2 works with GHES 2.21.5? |
@r-bennett could be, and yes, 2.9.2 works fine for us with GHES 2.21.5 |
I'm also still using 2.9.2 with GHES 2.21.7. Checking teams today/tomorrow |
I can vouch that both In addition, |
To use the old version you should specify: terraform {
required_providers {
github = {
# see https://github.com/terraform-providers/terraform-provider-github/issues/404
version = "2.4.1"
}
}
} |
Is pinning to v2.4.1 is the best solution for GHE at the moment? |
You can use 3.0.0 now if your GHES version is reasonably up to date (2.21+ I think), but there's a separate issue affecting versions after that #716 |
With the recent provider update to 2.5.0 we experienced an issue with our organization management using this provider.
hashicorp/terraform-provider-github@v2.4.1...v2.5.0
Included in this, which seems more likely, was an update in google/go-github :
google/go-github@v29.0.2...v29.0.3
With the upgrade in go-github it looks like the APIs surrounding teams got chagned. In at least one case, I see a deprecation message in the documentation. The result is that all github_team resources are thought to not exist, so it wants to re-create them (unsure if creation would even succeed at this point). Additionally github_team_repository resources, which rely on the github_team relationship are also affected and these APIs have changed as well.
While I imagine that this isn't so much as a bug as it is a compatibility issue, I think that GitHub Enterprise users need messaging regarding compatibility with this provider. As it stands, it looks like GitHub Enterprise v2.20.3 is compatible only up to v2.4.1 of this provider.
Terraform Version
0.12.24
Affected Resource(s)
Note: When using GitHub Enterprise (tested with v2.20.3)
Terraform Configuration Files
https://www.terraform.io/docs/providers/github/r/team_repository.html
Debug Output
https://gist.github.com/mengesb/811cadacde485dba7d36807ff9ae42b5
Panic Output
N/A
Expected Behavior
Teams and team repositories shouldn't change after provider update, or there should be some documentation about provider compatibility in the case of GitHub Enterprise vs GitHub
Actual Behavior
When a plan is ran with provider 2.4.x, and generates resources, an update to provider version 2.5.x results in it re-generating the same team and team_repository resources. If there are members of the team - those trigger regeneration due to vertex changes
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
with v2.4.1terraform apply
Important Factoids
Github Enterprise v2.20.3
https://developer.github.com/enterprise/2.20/v3/teams/#get-team
vs
https://developer.github.com/v3/teams/#get-team-by-name
https://developer.github.com/v3/teams/#get-team-legacy (deprecated - compat w/2.20.3)
https://developer.github.com/enterprise/2.20/v3/teams/#check-if-a-team-manages-a-repository
vs
https://developer.github.com/v3/teams/#list-team-repos
References
The text was updated successfully, but these errors were encountered: