Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

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

Merged
ddelgrosso1 merged 3 commits into
googleapis:mainfrom
ddelgrosso1:fix-create-bucket-request
Jul 8, 2024
Merged

fix: make CreateBucketRequest extend from BucketMetadata to allow all…#2489
ddelgrosso1 merged 3 commits into
googleapis:mainfrom
ddelgrosso1:fix-create-bucket-request

Conversation

@ddelgrosso1

Copy link
Copy Markdown
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 June 14, 2024 20:09
@ddelgrosso1

Copy link
Copy Markdown
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

@danielduhh danielduhh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tests?

Comment thread src/storage.ts
projection?: 'full' | 'noAcl';
regional?: boolean;
requesterPays?: boolean;
retentionPolicy?: object;

Copy link
Copy Markdown
Contributor

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?

@ddelgrosso1 ddelgrosso1 Jun 26, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor Author

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

@ddelgrosso1 ddelgrosso1 force-pushed the fix-create-bucket-request branch from 64fc8d7 to 23d536c Compare June 26, 2024 13:25
@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
@ddelgrosso1 ddelgrosso1 deleted the fix-create-bucket-request branch July 8, 2024 23:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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