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

404 when accessing debug logs posted onto PRs #16124

Closed
SarahFrench opened this issue Oct 5, 2023 · 3 comments
Closed

404 when accessing debug logs posted onto PRs #16124

SarahFrench opened this issue Oct 5, 2023 · 3 comments

Comments

@SarahFrench
Copy link
Member

Background

Screenshot 2023-10-05 at 11 01 55

The link to the debug logs for the passing test in the screenshot above/this PR comment has a 404 error.

What kind of contribution is this issue about?

general contributions

Related PR(s), if any:

Details

The TestAccCloudIdentityGroup test loops through multiple tests and is structured differently to typical acceptance tests, so this might mean the URL of the log file is formed differently than normal?

// Intended to fix https://github.com/hashicorp/terraform-provider-google/issues/10001
// These are all of the tests that use a cloud_identity_group, except for
// testAccAccessContextManagerGcpUserAccessBinding_basicTest. The theory is that they sometimes
// fail with a 409 because of concurrent roster mutations, so running them serially should prevent
// the error.
func TestAccCloudIdentityGroup(t *testing.T) {
testCases := map[string]func(t *testing.T){
"basic": testAccCloudIdentityGroup_cloudIdentityGroupsBasicExampleTest,
"update": testAccCloudIdentityGroup_updateTest,
"membership_basic": testAccCloudIdentityGroupMembership_cloudIdentityGroupMembershipExampleTest,
"membership_update": testAccCloudIdentityGroupMembership_updateTest,
"membership_import": testAccCloudIdentityGroupMembership_importTest,
"membership_dne": testAccCloudIdentityGroupMembership_membershipDoesNotExistTest,
"membership_user": testAccCloudIdentityGroupMembership_cloudIdentityGroupMembershipUserExampleTest,
"data_source_basic": testAccDataSourceCloudIdentityGroups_basicTest,
"data_source_membership_basic": testAccDataSourceCloudIdentityGroupMemberships_basicTest,
}
for name, tc := range testCases {
// shadow the tc variable into scope so that when
// the loop continues, if t.Run hasn't executed tc(t)
// yet, we don't have a race condition
// see https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
tc := tc
t.Run(name, func(t *testing.T) {
tc(t)
})
}
}

@rileykarson
Copy link
Collaborator

rileykarson commented Oct 5, 2023

You can access those logs directly through the GCS bucket from the bottom link! You've got it, the logs are split out by subtest and we're just reporting on the main test. TC has a similar output, actually- the only test in its eyes is the top-level one and the artifacts are subtest-specific.

Given that most of these are whole packages that need to run in serial, I wonder if we could stop using subtests by just omitting t.Parallel since I think that applies at the package level. We'd likely want a way to catch inadvertent additions of parallel tests to those packages, though, since reviewers of smaller PRs would easily miss deviations.

@SarahFrench
Copy link
Member Author

I'll close this issue and open an issue about refactoring the test, thanks!

Copy link

github-actions bot commented Nov 9, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants