-
Notifications
You must be signed in to change notification settings - Fork 762
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
Updated to go-github v29.0.3 #369
Updated to go-github v29.0.3 #369
Conversation
@benj-fletch nice work, do you want me to run acceptance test on your branch? |
I would appreciate that a lot thanks @martinssipenko ! I need to look into why they are failing. I will also do a EDIT: Hmm, looks like an actual failure in the tests for some terraform reference is now failing. Will investigate |
It appears that the update of TF from I believe this is introduced due to this change to the |
Fixes #368 |
@benj-fletch I've done a bunch of updates in #372 which should hopefully resolve go version discrepancy. |
Thanks for letting me know! I think it would be worth closing your new PR off and rebasing onto master once that has been done. That will bring us all in line in terms of versions etc. |
I'm not sure I understand, what do you mean by "I think it would be worth closing your new PR off and rebasing onto master once that has been done." ? |
Sorry, I mean that we should complete the work under your PR #372, merge it into master and then rebase this PR onto that. My phrasing was not good! |
roger |
@benj-fletch can you please rebase, after which I will run acceptance tests. |
Thanks @martinssipenko, I think I have managed to rebase properly, though there were a lot of conflicts! Are we able to use the new actions to run the acc tests? |
@benj-fletch can you run index 2f0fad1c..516b35fd 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,6 @@ require (
github.com/google/go-github/v29 v29.0.3
github.com/hashicorp/terraform-plugin-sdk v1.7.0
github.com/kylelemons/godebug v1.1.0
- github.com/terraform-providers/terraform-provider-tls v1.2.0 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
)
diff --git a/go.sum b/go.sum
index 9ee96b63..9a793532 100644
--- a/go.sum
+++ b/go.sum
@@ -174,7 +174,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/terraform-providers/terraform-provider-tls v1.2.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU=
github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= |
@martinssipenko yep - should be gone now! |
I ran tests few times and they still are acting flaky, random test cases fail on each run. |
Are you seeing degradation in reliability compared to master? I don't think anything here will have improved the test suite but hopefully it shouldn't have got worse! |
After changing all parallel tests to not be parallel (I think it's why tests fail randomly) I got these results: $ make testacc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -timeout 120m
? github.com/terraform-providers/terraform-provider-github [no test files]
=== RUN TestAccGithubCollaboratorsDataSource_basic
--- PASS: TestAccGithubCollaboratorsDataSource_basic (11.07s)
=== RUN TestAccGithubIpRangesDataSource_existing
--- PASS: TestAccGithubIpRangesDataSource_existing (3.89s)
=== RUN TestAccGithubReleaseDataSource_fetchByLatestNoReleaseReturnsError
--- PASS: TestAccGithubReleaseDataSource_fetchByLatestNoReleaseReturnsError (0.61s)
=== RUN TestAccGithubReleaseDataSource_latestExisting
--- PASS: TestAccGithubReleaseDataSource_latestExisting (3.99s)
=== RUN TestAccGithubReleaseDataSource_fetchByIdWithNoIdReturnsError
--- PASS: TestAccGithubReleaseDataSource_fetchByIdWithNoIdReturnsError (0.31s)
=== RUN TestAccGithubReleaseDataSource_fetchByIdExisting
--- PASS: TestAccGithubReleaseDataSource_fetchByIdExisting (3.89s)
=== RUN TestAccGithubReleaseDataSource_fetchByTagNoTagReturnsError
--- PASS: TestAccGithubReleaseDataSource_fetchByTagNoTagReturnsError (0.26s)
=== RUN TestAccGithubReleaseDataSource_fetchByTagExisting
--- PASS: TestAccGithubReleaseDataSource_fetchByTagExisting (4.04s)
=== RUN TestAccGithubReleaseDataSource_invalidRetrieveMethodReturnsError
--- PASS: TestAccGithubReleaseDataSource_invalidRetrieveMethodReturnsError (0.01s)
=== RUN TestAccGithubRepositoriesDataSource_basic
--- PASS: TestAccGithubRepositoriesDataSource_basic (4.80s)
=== RUN TestAccGithubRepositoriesDataSource_Sort
--- PASS: TestAccGithubRepositoriesDataSource_Sort (25.29s)
=== RUN TestAccGithubRepositoriesDataSource_noMatch
--- PASS: TestAccGithubRepositoriesDataSource_noMatch (5.22s)
=== RUN TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError
--- PASS: TestAccGithubRepositoryDataSource_fullName_noMatchReturnsError (0.68s)
=== RUN TestAccGithubRepositoryDataSource_name_noMatchReturnsError
--- PASS: TestAccGithubRepositoryDataSource_name_noMatchReturnsError (0.75s)
=== RUN TestAccGithubRepositoryDataSource_fullName_existing
--- PASS: TestAccGithubRepositoryDataSource_fullName_existing (5.94s)
=== RUN TestAccGithubRepositoryDataSource_name_existing
--- PASS: TestAccGithubRepositoryDataSource_name_existing (5.41s)
=== RUN TestAccGithubTeamDataSource_noMatchReturnsError
--- PASS: TestAccGithubTeamDataSource_noMatchReturnsError (0.52s)
=== RUN TestAccGithubUserDataSource_noMatchReturnsError
--- PASS: TestAccGithubUserDataSource_noMatchReturnsError (0.72s)
=== RUN TestAccGithubUserDataSource_existing
--- PASS: TestAccGithubUserDataSource_existing (6.51s)
=== RUN TestMigrateGithubWebhookStateV0toV1
--- PASS: TestMigrateGithubWebhookStateV0toV1 (0.00s)
=== RUN TestProvider
--- PASS: TestProvider (0.00s)
=== RUN TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN TestProvider_individual
--- PASS: TestProvider_individual (1.41s)
=== RUN TestProvider_anonymous
--- PASS: TestProvider_anonymous (2.56s)
=== RUN TestProvider_insecure
--- FAIL: TestProvider_insecure (0.04s)
testing.go:654: Step 1 error: errors during refresh:
Error: GET https://localhost:63889/orgs/msipenko-test: 404 []
on /var/folders/md/52wjnhf54x50bjskcyvbpjkm0000gn/T/tf-test730265853/main.tf line 1:
(source code not available)
=== RUN TestAccGithubBranchProtection_basic
--- PASS: TestAccGithubBranchProtection_basic (35.55s)
=== RUN TestAccGithubBranchProtection_users
--- PASS: TestAccGithubBranchProtection_users (26.73s)
=== RUN TestAccGithubBranchProtection_teams
--- PASS: TestAccGithubBranchProtection_teams (91.29s)
=== RUN TestAccGithubBranchProtection_emptyItems
--- PASS: TestAccGithubBranchProtection_emptyItems (23.19s)
=== RUN TestAccGithubIssueLabel_basic
--- PASS: TestAccGithubIssueLabel_basic (25.60s)
=== RUN TestAccGithubIssueLabel_existingLabel
--- PASS: TestAccGithubIssueLabel_existingLabel (19.45s)
=== RUN TestAccGithubIssueLabel_description
--- PASS: TestAccGithubIssueLabel_description (38.46s)
=== RUN TestAccGithubMembership_basic
--- PASS: TestAccGithubMembership_basic (8.97s)
=== RUN TestAccGithubMembership_caseInsensitive
--- PASS: TestAccGithubMembership_caseInsensitive (11.63s)
=== RUN TestAccGithubOrganizationProject_basic
--- PASS: TestAccGithubOrganizationProject_basic (10.58s)
=== RUN TestAccGithubOrganizationWebhook_basic
--- PASS: TestAccGithubOrganizationWebhook_basic (13.41s)
=== RUN TestAccGithubOrganizationWebhook_secret
--- PASS: TestAccGithubOrganizationWebhook_secret (7.67s)
=== RUN TestAccGithubProjectColumn_basic
--- PASS: TestAccGithubProjectColumn_basic (20.70s)
=== RUN TestAccGithubRepositoryCollaborator_basic
--- PASS: TestAccGithubRepositoryCollaborator_basic (18.73s)
=== RUN TestAccGithubRepositoryCollaborator_caseInsensitive
--- PASS: TestAccGithubRepositoryCollaborator_caseInsensitive (22.73s)
=== RUN TestSuppressDeployKeyDiff
--- PASS: TestSuppressDeployKeyDiff (0.00s)
=== RUN TestAccGithubRepositoryDeployKey_basic
--- PASS: TestAccGithubRepositoryDeployKey_basic (18.64s)
=== RUN TestAccGithubRepositoryFile_basic
--- PASS: TestAccGithubRepositoryFile_basic (33.88s)
=== RUN TestAccGithubRepositoryFile_branch
--- PASS: TestAccGithubRepositoryFile_branch (28.08s)
=== RUN TestAccGithubRepositoryFile_committer
--- PASS: TestAccGithubRepositoryFile_committer (34.41s)
=== RUN TestAccGithubRepositoryProject_basic
--- PASS: TestAccGithubRepositoryProject_basic (19.40s)
=== RUN TestAccGithubRepository_basic
--- PASS: TestAccGithubRepository_basic (20.27s)
=== RUN TestAccGithubRepository_archive
--- PASS: TestAccGithubRepository_archive (14.08s)
=== RUN TestAccGithubRepository_archiveUpdate
--- PASS: TestAccGithubRepository_archiveUpdate (19.04s)
=== RUN TestAccGithubRepository_hasProjects
--- PASS: TestAccGithubRepository_hasProjects (13.00s)
=== RUN TestAccGithubRepository_defaultBranch
--- PASS: TestAccGithubRepository_defaultBranch (23.25s)
=== RUN TestAccGithubRepository_templates
--- PASS: TestAccGithubRepository_templates (13.82s)
=== RUN TestAccGithubRepository_topics
--- PASS: TestAccGithubRepository_topics (37.89s)
=== RUN TestAccGithubRepository_autoInitForceNew
--- PASS: TestAccGithubRepository_autoInitForceNew (34.92s)
=== RUN TestAccGithubRepository_createFromTemplate
--- PASS: TestAccGithubRepository_createFromTemplate (14.03s)
=== RUN TestAccGithubRepositoryWebhook_basic
--- PASS: TestAccGithubRepositoryWebhook_basic (25.80s)
=== RUN TestAccGithubRepositoryWebhook_secret
--- PASS: TestAccGithubRepositoryWebhook_secret (19.35s)
=== RUN TestAccGithubTeamMembership_basic
--- PASS: TestAccGithubTeamMembership_basic (30.31s)
=== RUN TestAccGithubTeamMembership_caseInsensitive
--- PASS: TestAccGithubTeamMembership_caseInsensitive (24.29s)
=== RUN TestAccGithubTeamRepository_basic
--- FAIL: TestAccGithubTeamRepository_basic (23.42s)
testing.go:654: Step 0 error: Check failed: Check 1/2 error: GET https://api.github.com/organizations/0/team/3695302/repos/msipenko-test/tf-acc-test-team-q14zr: 404 Not Found []
=== RUN TestAccCheckGetPermissions
--- PASS: TestAccCheckGetPermissions (0.00s)
=== RUN TestAccGithubTeam_basic
--- FAIL: TestAccGithubTeam_basic (7.78s)
testing.go:654: Step 0 error: Check failed: Check 1/8 error: GET https://api.github.com/organizations/0/team/3695304: 404 Not Found []
=== RUN TestAccGithubTeam_slug
--- FAIL: TestAccGithubTeam_slug (7.60s)
testing.go:654: Step 0 error: Check failed: Check 1/8 error: GET https://api.github.com/organizations/0/team/3695305: 404 Not Found []
=== RUN TestAccGithubTeam_hierarchical
--- FAIL: TestAccGithubTeam_hierarchical (13.28s)
testing.go:654: Step 0 error: Check failed: Check 1/4 error: GET https://api.github.com/organizations/0/team/3695306: 404 Not Found []
=== RUN TestAccGithubUserGpgKey_basic
--- PASS: TestAccGithubUserGpgKey_basic (7.94s)
=== RUN TestAccGithubUserInvitationAccepter_basic
--- SKIP: TestAccGithubUserInvitationAccepter_basic (0.00s)
resource_github_user_invitation_accepter_test.go:21: GITHUB_TEST_COLLABORATOR_TOKEN was not provided, skipping test
=== RUN TestAccGithubUserSshKey_basic
--- PASS: TestAccGithubUserSshKey_basic (8.20s)
=== RUN TestAccOrganizationBlock_basic
--- PASS: TestAccOrganizationBlock_basic (8.33s)
=== RUN TestEtagTransport
--- PASS: TestEtagTransport (0.00s)
=== RUN TestRateLimitTransport_abuseLimit_get
--- PASS: TestRateLimitTransport_abuseLimit_get (0.00s)
=== RUN TestRateLimitTransport_abuseLimit_post
--- PASS: TestRateLimitTransport_abuseLimit_post (0.00s)
=== RUN TestRateLimitTransport_abuseLimit_post_error
--- PASS: TestRateLimitTransport_abuseLimit_post_error (0.00s)
=== RUN TestAccValidateTeamIDFunc
--- PASS: TestAccValidateTeamIDFunc (0.00s)
=== RUN TestAccGithubUtilRole_validation
--- PASS: TestAccGithubUtilRole_validation (0.00s)
=== RUN TestAccGithubUtilTwoPartID
--- PASS: TestAccGithubUtilTwoPartID (0.00s)
FAIL
FAIL github.com/terraform-providers/terraform-provider-github/github 964.108s
FAIL
make: *** [testacc] Error 1 |
Looks like there is some regression on teams. |
I've got this queued for investigation over the next couple of days. I suspect the robots are fighting each other as I've seen GitHub's spam detection delete teams during the span of a test that creates test teams. Looking good so far though! |
I am seeing failures whereby an organization with an ID of Collapsed
I suspect we need to align all occurrences of |
@benj-fletch I've root caused the failing tests. I think this branch will be safe to merge after fixing the documentation conflict that was introduced and applying the following patch:
|
Hi @jcudit - firstly apologies for not getting to look at this, I have been up to my eyeballs in client work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologize. This project is volunteer work and there are a lot of more important things going on in the world 😄 . I always appreciate when someone takes any amount of time to help out.
I'll address the CI failure in a separate PR and proceed with merging this one.
🎉 |
…update-to-go-github-v29-0-3 Updated to go-github v29.0.3
This is a follow-on PR from #342 to update from go-github
v29.0.2
->v29.0.3
. Based on this update the following changes were required:Teams
API deprected calls that were not using organization ID or organization slug in requests. This meant the following changes were needed in this repo:Team
s APIOrganisation.id
computed value on the provider for ease of retrievalI cannot seem to run the tests locally as I believe running a Windows system is hampering the execution of some of the TLS based tests. I will investigate this separately to this PR.
However, I believe the acceptance tests should pass, withstanding the issues already identified in #350
Since working on this, @martinssipenko has raised #368 which discusses some issues with previous state management. I am happy for this PR to serve as a first implementation of this ticket and am happy to take guidance on the issues raised in that issue.