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

Update go-github to v29. #342

Merged
merged 3 commits into from
Feb 27, 2020
Merged

Conversation

jakebiesinger-onduo
Copy link
Contributor

@jakebiesinger-onduo jakebiesinger-onduo commented Feb 1, 2020

Updates to go-github v29. To do this, I ran go mod vendor after updating vendor/modules.txt.

There were two small interface changes I had to make manually:

  1. client.Teams.EditTeam now takes a third option, removeParent which I've set to false
  2. client.Repositories.AddCollaborator now returns a data object representing the invitation. This didn't seem to be used in the surrounding code so I am just ignoring it.

I also ran acceptance tests locally. There are a few failures, but as a new contributor, I'm not sure how to proceed fixing them:

  1. a different etag than is expected (does this mean an API call that was atomic no longer is?)
--- FAIL: TestAccGithubTeam_hierarchical (71.24s)                                                                                                   
    testing.go:569: Step 1 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.        
                                                                                                                                                    
        (map[string]string) (len=1) {                                     
         (string) (len=4) "etag": (string) (len=36) "W/\"195adb63bbfd36cd6e36f9baeb47351c\""                                                        
        }                                                                                                                                           
                                                                                                                                                    
                                                                                                                                                    
        (map[string]string) (len=1) {                                     
         (string) (len=4) "etag": (string) (len=36) "W/\"4ba9252760600a41994f7061c0357bdd\""                                                        
        }                                                                 
  1. some team changes don't seem to be retained in protections as expected:
--- FAIL: TestAccGithubBranchProtection_teams (113.12s)
    testing.go:569: Step 0 error: Check failed: Check 3/15 error: diff "restrictions.teams": (-got +want)
         [
        + "team-1-n6fmt",
        + "team-2-n6fmt",
         ]
--- FAIL: TestAccGithubBranchProtection_teams (154.32s)                                                                                             
    testing.go:569: Step 0 error: Check failed: Check 3/15 error: diff "restrictions.teams": (-got +want)                                           
         [                                                                                                                                          
        + "team-1-m3wpi",                                                                                                                           
        + "team-2-m3wpi",                                                                                                                           
         ]                                                                                                                                          
  1. None of the acceptance tests related to a local server are able to run on my machine.
        Error: Post https://localhost:58299/orgs/github-test-jakebiesinger/repos: dial tcp 127.0.0.1:58299: connect: connection refused             

Copy link
Contributor

@springerigor springerigor left a comment

Choose a reason for hiding this comment

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

Looks OK, only one concern about go.mod file.

In regard to the acceptance tests, did you read https://github.com/terraform-providers/terraform-provider-github#acceptance-test-prerequisites?

go.mod Outdated
@@ -1,9 +1,13 @@
module github.com/terraform-providers/terraform-provider-github

require (
github.com/google/go-github/v28 v28.1.1
github.com/google/go-github/v28 v28.1.1 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if v28 should still be there after the switch to v29.

Copy link
Contributor Author

@jakebiesinger-onduo jakebiesinger-onduo Feb 4, 2020

Choose a reason for hiding this comment

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

I haven't used go mod vendor before, but I can confirm that the string v28 doesn't appear anywhere in this repository except right in this file. Perhaps there is a transitive dependency on the old version?

Copy link
Contributor

@springerigor springerigor Feb 5, 2020

Choose a reason for hiding this comment

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

It may be true, you can check if go mod tidy will make a difference.

@jakebiesinger-onduo
Copy link
Contributor Author

jakebiesinger-onduo commented Feb 4, 2020

In regard to the acceptance tests, did you read https://github.com/terraform-providers/terraform-provider-github#acceptance-test-prerequisites?

I sure did. And actually those docs seem to be out of date. In addition to the env vars outlined there, you also have to set GITHUB_TEMPLATE_REPOSITORY (see #345):

$ cd terraform-provider-github
$ GITHUB_ORGANIZATION=github-test-jakebiesinger GITHUB_TEST_USER=jakebiesinger GITHUB_TEST_COLLABORATOR=jakebiesinger-onduo GITHUB_TEMPLATE_REPOSITORY=test-repo-template make testacc

The failure seems related to some server that isn't running on localhost as expected. I'm not sure if there's some additional step I need to take to get that running.

@jakebiesinger-onduo
Copy link
Contributor Author

go mod tidy cleaned it up as you mentioned. I'm now re-running the acceptance tests.

@stefansedich
Copy link

@jakebiesinger-onduo @springerigor any idea when this one might land? would love to finally close this one off in our environment 😄

@springerigor
Copy link
Contributor

@paultyng @jcudit Could you take a look at this PR?

@jakebiesinger-onduo
Copy link
Contributor Author

I'm now re-running the acceptance tests.

I saw the same failures I'd seen previously related to something on locahost not being set up properly. Maybe my machine is more locked-down than others? Or maybe there are more instructions missing in the CONTRIBUTING section?

@jcudit
Copy link
Contributor

jcudit commented Feb 11, 2020

👋 I've been having similar difficulties getting acceptance tests to work locally and have been trialling an acceptance test Action ahead of merging it here.

In the meantime, here is the acceptance test run output:

?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubBranchProtection_basic
=== PAUSE TestAccGithubBranchProtection_basic
=== CONT  TestAccGithubBranchProtection_basic
--- PASS: TestAccGithubBranchProtection_basic (16.49s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	16.876s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubBranchProtection_users
--- FAIL: TestAccGithubBranchProtection_users (13.05s)
    testing.go:568: Step 3 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.

        (map[string]string) (len=1) {
         (string) (len=4) "etag": (string) (len=36) "W/\"1249392141f955935b119d7bcc3ed1ee\""
        }


        (map[string]string) (len=3) {
         (string) (len=4) "etag": (string) (len=36) "W/\"59e3a2ee1759dbd9915637049703d51e\"",
         (string) (len=22) "restrictions.0.users.#": (string) (len=1) "1",
         (string) (len=29) "restrictions.0.users.35441184": (string) (len=20) "user_with_underscore"
        }

FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	13.369s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubBranchProtection_teams
=== PAUSE TestAccGithubBranchProtection_teams
=== CONT  TestAccGithubBranchProtection_teams
--- FAIL: TestAccGithubBranchProtection_teams (21.34s)
    testing.go:568: Step 0 error: Check failed: Check 3/15 error: diff "restrictions.teams": (-got +want)
         [
        + "team-1-uvi3c",
        + "team-2-uvi3c",
         ]
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/repos/terraformtesting/tf-acc-test-branch-prot-uvi3c/branches/master/protection: 404 Not Found []

        State: github_branch_protection.master:
          ID = tf-acc-test-branch-prot-uvi3c:master
          provider = provider.github
          branch = master
          enforce_admins = true
          etag = W/"e6fee270fe23e60dc4af9483f51df93a"
          repository = tf-acc-test-branch-prot-uvi3c
          require_signed_commits = false
          required_pull_request_reviews.# = 1
          required_pull_request_reviews.0.dismiss_stale_reviews = true
          required_pull_request_reviews.0.dismissal_teams.# = 2
          required_pull_request_reviews.0.dismissal_teams.1453152486 = team-1-uvi3c
          required_pull_request_reviews.0.dismissal_teams.3625082629 = team-2-uvi3c
          required_pull_request_reviews.0.dismissal_users.# = 0
          required_pull_request_reviews.0.include_admins = false
          required_pull_request_reviews.0.require_code_owner_reviews = false
          required_pull_request_reviews.0.required_approving_review_count = 1
          required_status_checks.# = 1
          required_status_checks.0.contexts.# = 0
          required_status_checks.0.include_admins = false
          required_status_checks.0.strict = false
          restrictions.# = 1
          restrictions.0.teams.# = 2
          restrictions.0.teams.1453152486 = team-1-uvi3c
          restrictions.0.teams.3625082629 = team-2-uvi3c
          restrictions.0.users.# = 0
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	21.610s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubBranchProtection_emptyItems
=== PAUSE TestAccGithubBranchProtection_emptyItems
=== CONT  TestAccGithubBranchProtection_emptyItems
--- PASS: TestAccGithubBranchProtection_emptyItems (12.18s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	12.455s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUserDataSource_noMatchReturnsError
=== PAUSE TestAccGithubUserDataSource_noMatchReturnsError
=== CONT  TestAccGithubUserDataSource_noMatchReturnsError
--- PASS: TestAccGithubUserDataSource_noMatchReturnsError (0.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.632s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUserDataSource_existing
=== PAUSE TestAccGithubUserDataSource_existing
=== CONT  TestAccGithubUserDataSource_existing
--- PASS: TestAccGithubUserDataSource_existing (1.34s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.621s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUserGpgKey_basic
=== PAUSE TestAccGithubUserGpgKey_basic
=== CONT  TestAccGithubUserGpgKey_basic
--- PASS: TestAccGithubUserGpgKey_basic (3.10s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.380s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubIpRangesDataSource_existing
=== PAUSE TestAccGithubIpRangesDataSource_existing
=== CONT  TestAccGithubIpRangesDataSource_existing
--- PASS: TestAccGithubIpRangesDataSource_existing (0.61s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.895s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoriesDataSource_basic
=== PAUSE TestAccGithubRepositoriesDataSource_basic
=== CONT  TestAccGithubRepositoriesDataSource_basic
--- PASS: TestAccGithubRepositoriesDataSource_basic (1.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.639s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoriesDataSource_Sort
=== PAUSE TestAccGithubRepositoriesDataSource_Sort
=== CONT  TestAccGithubRepositoriesDataSource_Sort
--- PASS: TestAccGithubRepositoriesDataSource_Sort (16.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	16.317s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoriesDataSource_noMatch
=== PAUSE TestAccGithubRepositoriesDataSource_noMatch
=== CONT  TestAccGithubRepositoriesDataSource_noMatch
--- PASS: TestAccGithubRepositoriesDataSource_noMatch (0.87s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.139s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeam_basic
=== PAUSE TestAccGithubTeam_basic
=== CONT  TestAccGithubTeam_basic
--- PASS: TestAccGithubTeam_basic (5.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	5.928s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeam_slug
=== PAUSE TestAccGithubTeam_slug
=== CONT  TestAccGithubTeam_slug
--- PASS: TestAccGithubTeam_slug (3.87s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	4.143s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeam_hierarchical
=== PAUSE TestAccGithubTeam_hierarchical
=== CONT  TestAccGithubTeam_hierarchical
--- FAIL: TestAccGithubTeam_hierarchical (6.03s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/teams/3647604: 404 Not Found []

        State: github_team.child:
          ID = 3647604
          provider = provider.github
          description = Terraform acc test child team
          etag = W/"d40391c7f8778231b9d957486f9bac7b"
          ldap_dn =
          name = tf-acc-child-2tpq99elev
          parent_team_id = 3647603
          privacy = closed
          slug = tf-acc-child-2tpq99elev
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	6.308s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubIssueLabel_basic
=== PAUSE TestAccGithubIssueLabel_basic
=== CONT  TestAccGithubIssueLabel_basic
--- PASS: TestAccGithubIssueLabel_basic (12.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	12.648s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubIssueLabel_existingLabel
=== PAUSE TestAccGithubIssueLabel_existingLabel
=== CONT  TestAccGithubIssueLabel_existingLabel
--- PASS: TestAccGithubIssueLabel_existingLabel (9.19s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	9.457s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubIssueLabel_description
=== PAUSE TestAccGithubIssueLabel_description
=== CONT  TestAccGithubIssueLabel_description
--- PASS: TestAccGithubIssueLabel_description (15.52s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	15.789s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUserSshKey_basic
=== PAUSE TestAccGithubUserSshKey_basic
=== CONT  TestAccGithubUserSshKey_basic
--- PASS: TestAccGithubUserSshKey_basic (3.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.490s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccValidateTeamIDFunc
--- PASS: TestAccValidateTeamIDFunc (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.275s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUtilRole_validation
--- PASS: TestAccGithubUtilRole_validation (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.270s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUtilTwoPartID
--- PASS: TestAccGithubUtilTwoPartID (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.273s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccOrganizationBlock_basic
=== PAUSE TestAccOrganizationBlock_basic
=== CONT  TestAccOrganizationBlock_basic
--- PASS: TestAccOrganizationBlock_basic (3.24s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.511s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryDeployKey_basic
=== PAUSE TestAccGithubRepositoryDeployKey_basic
=== CONT  TestAccGithubRepositoryDeployKey_basic
--- PASS: TestAccGithubRepositoryDeployKey_basic (9.48s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	9.745s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError
=== PAUSE TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError
=== CONT  TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError
--- PASS: TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError (0.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.620s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryDataSource_name_noMatchReturnsError
=== PAUSE TestAccGithubRepositoryDataSource_name_noMatchReturnsError
=== CONT  TestAccGithubRepositoryDataSource_name_noMatchReturnsError
--- PASS: TestAccGithubRepositoryDataSource_name_noMatchReturnsError (0.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.590s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryDataSource_fullName_existing
=== PAUSE TestAccGithubRepositoryDataSource_fullName_existing
=== CONT  TestAccGithubRepositoryDataSource_fullName_existing
--- PASS: TestAccGithubRepositoryDataSource_fullName_existing (0.88s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.163s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryDataSource_name_existing
=== PAUSE TestAccGithubRepositoryDataSource_name_existing
=== CONT  TestAccGithubRepositoryDataSource_name_existing
--- PASS: TestAccGithubRepositoryDataSource_name_existing (1.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.636s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubUserInvitationAccepter_basic
=== PAUSE TestAccGithubUserInvitationAccepter_basic
=== CONT  TestAccGithubUserInvitationAccepter_basic
--- FAIL: TestAccGithubUserInvitationAccepter_basic (6.27s)
    testing.go:568: Step 1 error: unknown provider "github"
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: config is invalid: 3 problems:

        - Provider configuration not present: To work with github_repository_collaborator.test its original provider configuration at provider.github.main is required, but it has been removed. This occurs when a provider configuration is removed while objects created by that provider still exist in the state. Re-add the provider configuration to destroy github_repository_collaborator.test, after which you can remove the provider configuration again.
        - Provider configuration not present: To work with github_user_invitation_accepter.test its original provider configuration at provider.github.invitee is required, but it has been removed. This occurs when a provider configuration is removed while objects created by that provider still exist in the state. Re-add the provider configuration to destroy github_user_invitation_accepter.test, after which you can remove the provider configuration again.
        - Provider configuration not present: To work with github_repository.test its original provider configuration at provider.github.main is required, but it has been removed. This occurs when a provider configuration is removed while objects created by that provider still exist in the state. Re-add the provider configuration to destroy github_repository.test, after which you can remove the provider configuration again.

        State: github_repository.test:
          ID = tf-acc-test-collab-mq9fl
          provider = provider.github.main
          allow_merge_commit = true
          allow_rebase_merge = true
          allow_squash_merge = true
          archived = false
          default_branch = master
          description =
          etag = W/"11d2fa84600ab66576b778910469fc22"
          full_name = terraformtesting/tf-acc-test-collab-mq9fl
          git_clone_url = git://github.com/terraformtesting/tf-acc-test-collab-mq9fl.git
          has_downloads = false
          has_issues = false
          has_projects = false
          has_wiki = false
          homepage_url =
          html_url = https://github.com/terraformtesting/tf-acc-test-collab-mq9fl
          http_clone_url = https://github.com/terraformtesting/tf-acc-test-collab-mq9fl.git
          name = tf-acc-test-collab-mq9fl
          private = false
          ssh_clone_url = [email protected]:terraformtesting/tf-acc-test-collab-mq9fl.git
          svn_url = https://github.com/terraformtesting/tf-acc-test-collab-mq9fl
          template.# = 0
        github_repository_collaborator.test:
          ID = tf-acc-test-collab-mq9fl:github-terraform-test-collaborator
          provider = provider.github.main
          invitation_id = 23377366
          permission = push
          repository = tf-acc-test-collab-mq9fl
          username = github-terraform-test-collaborator
        github_user_invitation_accepter.test:
          ID = 23377366
          provider = provider.github.invitee
          invitation_id = 23377366
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	6.542s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubOrganizationWebhook_basic
=== PAUSE TestAccGithubOrganizationWebhook_basic
=== CONT  TestAccGithubOrganizationWebhook_basic
--- PASS: TestAccGithubOrganizationWebhook_basic (4.71s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	5.000s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubOrganizationWebhook_secret
=== PAUSE TestAccGithubOrganizationWebhook_secret
=== CONT  TestAccGithubOrganizationWebhook_secret
--- PASS: TestAccGithubOrganizationWebhook_secret (2.99s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.262s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubCollaboratorsDataSource_basic
=== PAUSE TestAccGithubCollaboratorsDataSource_basic
=== CONT  TestAccGithubCollaboratorsDataSource_basic
--- PASS: TestAccGithubCollaboratorsDataSource_basic (6.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	6.522s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_basic
=== PAUSE TestAccGithubRepository_basic
=== CONT  TestAccGithubRepository_basic
--- PASS: TestAccGithubRepository_basic (8.97s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	9.239s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_archive
=== PAUSE TestAccGithubRepository_archive
=== RUN   TestAccGithubRepository_archiveUpdate
=== PAUSE TestAccGithubRepository_archiveUpdate
=== CONT  TestAccGithubRepository_archive
=== CONT  TestAccGithubRepository_archiveUpdate
--- PASS: TestAccGithubRepository_archive (11.51s)
--- PASS: TestAccGithubRepository_archiveUpdate (13.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	13.965s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_archiveUpdate
=== PAUSE TestAccGithubRepository_archiveUpdate
=== CONT  TestAccGithubRepository_archiveUpdate
--- PASS: TestAccGithubRepository_archiveUpdate (8.65s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	8.921s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_hasProjects
=== PAUSE TestAccGithubRepository_hasProjects
=== CONT  TestAccGithubRepository_hasProjects
--- PASS: TestAccGithubRepository_hasProjects (6.57s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	6.854s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_defaultBranch
=== PAUSE TestAccGithubRepository_defaultBranch
=== CONT  TestAccGithubRepository_defaultBranch
--- PASS: TestAccGithubRepository_defaultBranch (10.65s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	10.926s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_templates
=== PAUSE TestAccGithubRepository_templates
=== CONT  TestAccGithubRepository_templates
--- PASS: TestAccGithubRepository_templates (6.80s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	7.068s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_topics
=== PAUSE TestAccGithubRepository_topics
=== CONT  TestAccGithubRepository_topics
--- PASS: TestAccGithubRepository_topics (17.94s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	18.213s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_autoInitForceNew
=== PAUSE TestAccGithubRepository_autoInitForceNew
=== CONT  TestAccGithubRepository_autoInitForceNew
--- PASS: TestAccGithubRepository_autoInitForceNew (17.64s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	17.913s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepository_createFromTemplate
=== PAUSE TestAccGithubRepository_createFromTemplate
=== CONT  TestAccGithubRepository_createFromTemplate
--- PASS: TestAccGithubRepository_createFromTemplate (7.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	7.284s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubProjectColumn_basic
=== PAUSE TestAccGithubProjectColumn_basic
=== CONT  TestAccGithubProjectColumn_basic
--- FAIL: TestAccGithubProjectColumn_basic (7.59s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/projects/columns/7962901: 404 Not Found []

        State: github_project_column.column:
          ID = 7962901
          provider = provider.github
          name = updated column name
          project_id = 3938225
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	7.882s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeamMembership_basic
=== PAUSE TestAccGithubTeamMembership_basic
=== CONT  TestAccGithubTeamMembership_basic
--- PASS: TestAccGithubTeamMembership_basic (11.89s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	12.170s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeamMembership_caseInsensitive
--- FAIL: TestAccGithubTeamMembership_caseInsensitive (9.00s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/teams/3647611/memberships/github-terraform-test-collaborator: 404 Not Found []

        State: github_team_membership.test_team_membership:
          ID = 3647611:github-terraform-test-collaborator
          provider = provider.github
          etag = W/"23b09e9592b4e7193f26c3bf7fa23897"
          role = member
          team_id = 3647611
          username = github-terraform-test-collaborator
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	9.260s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubOrganizationProject_basic
=== PAUSE TestAccGithubOrganizationProject_basic
=== CONT  TestAccGithubOrganizationProject_basic
--- PASS: TestAccGithubOrganizationProject_basic (3.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.935s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryCollaborator_basic
=== PAUSE TestAccGithubRepositoryCollaborator_basic
=== CONT  TestAccGithubRepositoryCollaborator_basic
--- FAIL: TestAccGithubRepositoryCollaborator_basic (8.45s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/repos/terraformtesting/tf-acc-test-collab-sdj9c/invitations/23377413: 404 Not Found []

        State: github_repository_collaborator.test_repo_collaborator:
          ID = tf-acc-test-collab-sdj9c:github-terraform-test-collaborator
          provider = provider.github
          invitation_id = 23377413
          permission = admin
          repository = tf-acc-test-collab-sdj9c
          username = github-terraform-test-collaborator
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	8.734s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryCollaborator_caseInsensitive
=== PAUSE TestAccGithubRepositoryCollaborator_caseInsensitive
=== CONT  TestAccGithubRepositoryCollaborator_caseInsensitive
--- FAIL: TestAccGithubRepositoryCollaborator_caseInsensitive (9.85s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/repos/terraformtesting/tf-acc-test-collab-bgzvw/invitations/23377419: 404 Not Found []

        State: github_repository_collaborator.test_repo_collaborator:
          ID = tf-acc-test-collab-bgzvw:github-terraform-test-collaborator
          provider = provider.github
          invitation_id = 23377419
          permission = admin
          repository = tf-acc-test-collab-bgzvw
          username = github-terraform-test-collaborator
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	10.125s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubMembership_basic
=== PAUSE TestAccGithubMembership_basic
=== CONT  TestAccGithubMembership_basic
--- PASS: TestAccGithubMembership_basic (3.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	3.994s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubMembership_caseInsensitive
--- PASS: TestAccGithubMembership_caseInsensitive (3.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	4.099s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryProject_basic
=== PAUSE TestAccGithubRepositoryProject_basic
=== CONT  TestAccGithubRepositoryProject_basic
--- PASS: TestAccGithubRepositoryProject_basic (9.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	9.959s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeamDataSource_noMatchReturnsError
=== PAUSE TestAccGithubTeamDataSource_noMatchReturnsError
=== CONT  TestAccGithubTeamDataSource_noMatchReturnsError
--- PASS: TestAccGithubTeamDataSource_noMatchReturnsError (0.84s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	1.126s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubTeamRepository_basic
=== PAUSE TestAccGithubTeamRepository_basic
=== CONT  TestAccGithubTeamRepository_basic
--- FAIL: TestAccGithubTeamRepository_basic (14.23s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: DELETE https://api.github.com/teams/3647613/repos/terraformtesting/tf-acc-test-team-upgbz: 404 Not Found []

        State: github_team_repository.test_team_test_repo:
          ID = 3647613:tf-acc-test-team-upgbz
          provider = provider.github
          etag = W/"dc0a1bbd4af7160ab87948c488a6240a"
          permission = push
          repository = tf-acc-test-team-upgbz
          team_id = 3647613
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	14.492s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccCheckGetPermissions
--- PASS: TestAccCheckGetPermissions (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	0.271s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryWebhook_basic
=== PAUSE TestAccGithubRepositoryWebhook_basic
=== CONT  TestAccGithubRepositoryWebhook_basic
--- PASS: TestAccGithubRepositoryWebhook_basic (14.94s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	15.201s
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubRepositoryWebhook_secret
=== PAUSE TestAccGithubRepositoryWebhook_secret
=== CONT  TestAccGithubRepositoryWebhook_secret
--- PASS: TestAccGithubRepositoryWebhook_secret (10.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	10.285s

I have seen master fail TestAccGithubUserInvitationAccepter_basic, TestAccGithubBranchProtection_teams and TestAccGithubBranchProtection_users regularly.

@martinssipenko
Copy link
Contributor

@jakebiesinger-onduo could you do another update to v29.0.3 to allow implementation of #271 ? Latest version includes google/go-github#1402 that is required to implement #271 and I think it's not worth starting without upgrading to v29 first.

@benj-fletch
Copy link
Contributor

Hi, I have just raised #362 to implement GH-271 which requires this to be merged with the application of @martinssipenko's comment for upversioning to v29.0.3.
If this PR is not going to be updated would it be possible to merge this PR and I can do the work for the next update to v29.0.3 ?
cc @jakebiesinger-onduo @jcudit @springerigor

@TomTucka
Copy link

I have #265 waiting for this to be merged, If this is at a standstill it would be great to get this merged as @benj-fletch suggested 🙌

@jcudit
Copy link
Contributor

jcudit commented Feb 24, 2020

I would like to spend a couple of days reviewing the acceptance test failures that this has introduced. It is my goal to 🚢 this one by end of week. Thanks for the sustained patience here!

@jcudit
Copy link
Contributor

jcudit commented Feb 25, 2020

I've done a round of testing and have the following results:

  • Removing the go 1.13 upgrade causes most newly failing tests to pass
  • TestAccGithubRepositoryCollaborator* tests continue to fail and need further investigation

The go 1.13 upgrade has come up a few times now and I want to make this change once acceptance tests are more reliable and and usable by the community. There was also exploration work in progress on the Hashicorp side a few months back that we could benefit from if we wait.

I have made a local commit that removes the go upgrade and prepares this branch for a rebase to master. The patch is attached below.

This is still on track to 🚢 by end of week. I'd like another day to dig into the remaining regressions and am seeking a 👍 on deferring the go upgrade.


From 39af1bd8d9f9d09f26d64a2407970f7b7f0aa355 Mon Sep 17 00:00:00 2001
From: Jeremy Udit <[email protected]>
Date: Tue, 25 Feb 2020 11:49:01 -0500
Subject: [PATCH] Fixes to get passing acceptance test

- Removes newly addes uses of `v28`
- Removes `go 1.13` upgrade
---
 github/data_source_github_release.go           | 2 +-
 github/resource_github_repository_file.go      | 2 +-
 github/resource_github_repository_file_test.go | 2 +-
 go.mod                                         | 2 --
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/github/data_source_github_release.go b/github/data_source_github_release.go
index fab9cbdb..63da0ee1 100644
--- a/github/data_source_github_release.go
+++ b/github/data_source_github_release.go
@@ -8,7 +8,7 @@ import (
 	"strconv"
 	"strings"

-	"github.com/google/go-github/v28/github"
+	"github.com/google/go-github/v29/github"
 	"github.com/hashicorp/terraform/helper/schema"
 )

diff --git a/github/resource_github_repository_file.go b/github/resource_github_repository_file.go
index 4d6c4a38..5f0d43ca 100644
--- a/github/resource_github_repository_file.go
+++ b/github/resource_github_repository_file.go
@@ -8,7 +8,7 @@ import (

 	"fmt"

-	"github.com/google/go-github/v28/github"
+	"github.com/google/go-github/v29/github"
 	"github.com/hashicorp/terraform/helper/schema"
 )

diff --git a/github/resource_github_repository_file_test.go b/github/resource_github_repository_file_test.go
index afab0922..6adffc98 100644
--- a/github/resource_github_repository_file_test.go
+++ b/github/resource_github_repository_file_test.go
@@ -10,7 +10,7 @@ import (
 	"fmt"
 	"testing"

-	"github.com/google/go-github/v28/github"
+	"github.com/google/go-github/v29/github"
 	"github.com/hashicorp/terraform/helper/acctest"
 	"github.com/hashicorp/terraform/helper/resource"
 	"github.com/hashicorp/terraform/terraform"
diff --git a/go.mod b/go.mod
index bbc9a0fb..35106e4f 100644
--- a/go.mod
+++ b/go.mod
@@ -1,7 +1,5 @@
 module github.com/terraform-providers/terraform-provider-github

-go 1.13
-
 require (
 	github.com/google/go-github/v29 v29.0.2
 	github.com/hashicorp/terraform v0.12.20
--
2.15.1

@benj-fletch
Copy link
Contributor

That patch looks good to me.
I think it is important that we add the go 1.13 directive into the go.mod file as it allows contributors to know which version of go is supported and expected to be compiled against. Having said that, stability is probably more important, so your assertion of getting the acceptance tests working and subsequently looking at the upgrade seems better to me.
I am happy to help out where I can on this - mention me if you are after anything :)

@jakebiesinger-onduo
Copy link
Contributor Author

@jcudit I'm happy to update versions of either go or the github API, or to have someone else take this PR and run with it. I don't want to interrupt your investigation, so let me know how you'd like me to proceed.

@jcudit
Copy link
Contributor

jcudit commented Feb 26, 2020

@jakebiesinger-onduo please rebase this branch onto master and apply the patch. 🙇


@benj-fletch I am having trouble with root causing these remaining new failing cases.

A fix to get the tests passing or any guidance on initial steps I could take would be appreciated!

- Removes newly addes uses of `v28`
- Removes `go 1.13` upgrade
@jakebiesinger-onduo
Copy link
Contributor Author

@jcudit I've rebased to latest master and applied your patch. PTAL.

@jcudit
Copy link
Contributor

jcudit commented Feb 27, 2020

I've read through the changes we are pulling in here and do not see anything that would manifest in the test failures we're experiencing. While investigating these failing test cases locally I witnessed them pass occasionally. It seems like a race condition where a repository is deleted and then an invitation to collaborate on the repository is subsequently failed because the repository no longer exists.

This gives me confidence in the changes this PR is introducing and would like to move forward with merging.

@jcudit jcudit merged commit 8c9a8c3 into integrations:master Feb 27, 2020
@arri-cc
Copy link

arri-cc commented Feb 27, 2020

I was in the process of working on #305 when I realized we need to upgrade to v29. Looking forward to this!

kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants