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

fix: make CreateBucketRequest extend from BucketMetadata to allow all… #2489

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

ddelgrosso1
Copy link
Contributor

… fields to be set

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2454 🦕

@ddelgrosso1 ddelgrosso1 requested review from a team as code owners June 14, 2024 20:09
@ddelgrosso1
Copy link
Contributor Author

Making CreateBucketReqest extend BucketMetadata so that the missing fields that are accepted by https://cloud.google.com/storage/docs/json_api/v1/buckets/insert get carried over. I've left the custom fields alone as that would be a breaking change.

@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 14, 2024
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Jun 15, 2024
@ddelgrosso1 ddelgrosso1 added owlbot:run Add this label to trigger the Owlbot post processor. and removed owlbot:run Add this label to trigger the Owlbot post processor. labels Jun 17, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 17, 2024
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 18, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 18, 2024
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 18, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 18, 2024
Copy link

@danielduhh danielduhh left a comment

Choose a reason for hiding this comment

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

tests?

regional?: boolean;
requesterPays?: boolean;
retentionPolicy?: object;

Choose a reason for hiding this comment

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

will removing this cause any issues?

Copy link
Contributor Author

@ddelgrosso1 ddelgrosso1 Jun 26, 2024

Choose a reason for hiding this comment

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

It isn't removed. This interface now extends BucketMetadata

retentionPolicy?: {
effectiveTime?: string;
isLocked?: boolean;
retentionPeriod?: string | number;
} | null;

@ddelgrosso1
Copy link
Contributor Author

@danielduhh all tests are existing. Didn't make much sense to add unit tests to test each individual field is settable.

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Jun 26, 2024
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 26, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 26, 2024
@ddelgrosso1 ddelgrosso1 merged commit 013a5a4 into googleapis:main Jul 8, 2024
16 checks passed
@ddelgrosso1 ddelgrosso1 deleted the fix-create-bucket-request branch July 8, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CreateBucketRequest type is misaligned with JSON API
2 participants