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

test(all): remove all references to CleanBucket #4000

Merged
merged 12 commits into from May 23, 2024

Conversation

BrennaEpp
Copy link
Contributor

@BrennaEpp BrennaEpp commented Apr 19, 2024

Description

Fixes #3565

Bumps the version of golang-samples to pick up changes to testutil. Replaces references to CleanBucket with methods that include bucket cleanup and error checking.

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./.. (see Testing)
  • Code formatted: gofmt (see Formatting)
  • Vetting pass: go vet (see Formatting)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Copy link

conventional-commit-lint-gcf bot commented Apr 19, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 19, 2024
@BrennaEpp BrennaEpp marked this pull request as ready for review May 17, 2024 22:16
@BrennaEpp BrennaEpp requested review from a team as code owners May 17, 2024 22:16
@BrennaEpp BrennaEpp changed the title draft: remove all references to CleanBucket test(all): remove all references to CleanBucket May 17, 2024
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

One comment regarding prefixes; otherwise seems good.


// UniqueBucketName returns a unique name with the test prefix.
// UniqueBucketName returns a unique name with the test prefix
// Any bucket created with this prefix may be deleted by DeleteExpiredBuckets.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this actually true?

If so we should be sure to leave bucket prefixes alone for existing tests so we don't accidentally try to delete any buckets that people want to save.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, so it's true in that it "may" be lol. That is, if you call DeleteExpiredBuckets with the same prefix, which we do in storage tests I believe, those buckets will be deleted. But it's confusing, so I'll delete this comment. We definitely aren't storing prefixes and then deleting buckets based on that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you double check that you haven't changed prefixes for anything that does use DeleteExpiredBuckets? Otherwise we are good I'd say.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check done - nothing to note.

@tritone tritone self-assigned this May 17, 2024
@BrennaEpp BrennaEpp enabled auto-merge (squash) May 22, 2024 20:12
@BrennaEpp BrennaEpp added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels May 22, 2024
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels May 22, 2024
@BrennaEpp BrennaEpp merged commit bdc04b4 into GoogleCloudPlatform:main May 23, 2024
9 checks passed
@BrennaEpp BrennaEpp deleted the randombuckets branch May 23, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage/objects: TestObjects failed
3 participants