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

storage: No additional query parameters apply-able --> library feels very limiting #163

Closed
ryanseys opened this issue Sep 1, 2014 · 6 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@ryanseys
Copy link
Contributor

ryanseys commented Sep 1, 2014

Trying to upload a file with a predefinedAcl of 'publicRead' i.e. apply acl of allUsers = READABLE and owner has full access. This applies a simple query parameter to the request which we have no access to apply with the current library. I'm guessing this is by design but I can see a scenario in the future where a single developer is happily using this library and then wants to do something slightly outside the "norm" (where we decide what the norm is?) and therefore they can't use this library anymore to get the job done, so they abandon using this library. 😦

I mean, perhaps we could "open" this small functionality as:

bucket.write('filename.png', {
  data: data,
  metadata: {},
  public: true // will apply ?predefinedAcl=publicRead to URL
}, callback);

But the bigger question still remains:

How do we choose what to include and exclude from this library? Who decides what features exposed by the API make the cut in our library? Why would I ever choose to use gcloud in the first place if it's explicitly designed to leave out features that I don't know if I need to use yet?

@stephenplusplus
Copy link
Contributor

I'm guessing this is by design

My guess would be we forgot 😊 Another guess, but I believe the goal is to provide 100% functionality, where we provide the easiest API possible to do the most common things, then allowing more verbose configuration objects where possible to handle not as common things.

@stephenplusplus
Copy link
Contributor

As an example of more verbose configuration objects, here's what the write call could look like:

bucket.write('filename.png', {
  data: data,
  metadata: {},

  query: {
    predefinedAcl: 'publicRead'
  },

  request: {
    acl: [],
    cacheControl: []
  }
}, callback);

(Maybe query makes more sense renamed to request and request makes more sense named as body?)

Making a shortcut for public: true is nicer, however there are a lot of query options available when doing an insert. Favoring some by adding a shortcut could make our API confusing, but if it's common enough, I won't fight it.

Also, on this topic, our storage API needs an update method.

@ryanseys
Copy link
Contributor Author

ryanseys commented Sep 1, 2014

So if we exposed this functionality, we effectively have the same thing as google-api-nodejs-client with storage.bucket.insert(). Only datastore, not storage, uses protobuf as well so we aren't even gaining a smaller request footprint.

Seems datastore is where we are gaining the most help for developers with automatic transaction handling and protobuf support. Not sure how we gain much in this library for cloud storage compared to google-api-nodejs-client without sacrificing functionality.

We should be designing a specification of what methods we want this library to expose to the developer and what the equivalent method(s) would be if they used a generated tool such as google-api-nodejs-client.

@stephenplusplus
Copy link
Contributor

I'll step aside to let others answer how we are meant to "compete" with the api client.

What I would consider a good goal for this client would be providing convenience methods, allowing access to underlying operations, while developing the app using maintainable, best practices, which will give us a platform to continue to grow, and add more features and optimizations going forward. This opens the doors for more contributions from users with use cases we haven't considered, and puts us in a better, focused OSS lifecycle.

We're really just providing a facade for API calls, and I think we're doing a pretty good job of making it more usable than alternatives. Again, the areas we need to improve will likely become more clear once we release 1.0 and get user feedback.

@rakyll rakyll added this to the M2: bigquery & pubsub milestone Sep 2, 2014
@ryanseys ryanseys modified the milestones: M2: bigquery & pubsub, 1.0.0 Sep 18, 2014
@jgeewax jgeewax changed the title No additional query parameters apply-able --> library feels very limiting storage: No additional query parameters apply-able --> library feels very limiting Oct 5, 2014
@ryanseys
Copy link
Contributor Author

ryanseys commented Nov 2, 2014

Predefined ACL support I believe is now working thanks to bucket#setMetadata but bucket ACL I don't believe is working yet (as defined by this resource and method) https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert

@ryanseys
Copy link
Contributor Author

This issue was pretty generic (my bad) but I'm going to close this now that ACL support has been merged into master in #304.

@jgeewax jgeewax added the api: storage Issues related to the Cloud Storage API. label Feb 2, 2015
@jgeewax jgeewax modified the milestones: 1.0.0, Storage Stable Feb 2, 2015
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
chingor13 pushed a commit that referenced this issue Aug 22, 2022
* fix(docs): reference docs should link to section of googleapis.dev with API reference

* fix(docs): make anchors work in jsdoc
sofisl pushed a commit that referenced this issue Nov 11, 2022
* remove docs/ & update src/

* update test & synth.py

* run synthtool

* synthtool

* try remove protos in jsdoc

* test adding outputSourceFiles: false
sofisl added a commit that referenced this issue Nov 11, 2022
Co-authored-by: Jeffrey Rennie <rennie@google.com>
sofisl pushed a commit that referenced this issue Nov 11, 2022
sofisl pushed a commit that referenced this issue Nov 11, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468790263

Source-Link: googleapis/googleapis@873ab45

Source-Link: googleapis/googleapis-gen@cb6f37a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
sofisl pushed a commit that referenced this issue Nov 11, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jsdoc/jsdoc</summary>

### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#&#8203;400-November-2022)

[Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28)

-   JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes
    backwards-incompatible changes in the future, the major version will be incremented.
-   JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or
    plugin uses the `taffydb` package, see the
    [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template).
-   JSDoc now supports Node.js 12.0.0 and later.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataproc-metastore).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTcuMSJ9-->
sofisl pushed a commit that referenced this issue Nov 11, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sinonjs/sinon</summary>

### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#&#8203;1201)

[Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1)

-   [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3)
    Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng)
    > 'npm unlink' would implicitly unlink the current dir
    > until version 7, which requires an argument
-   [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b)
    Fix bundling of cjs module ([#&#8203;2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat)
    > -   Fix bundling of cjs module
    >
    > -   Run prettier

*Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.*

#### 12.0.0

### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)

[Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)

</details>

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-analytics-admin).
sofisl pushed a commit that referenced this issue Nov 11, 2022
* chore(main): release 1.1.1

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Nov 11, 2022
sofisl pushed a commit that referenced this issue Nov 16, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jsdoc/jsdoc</summary>

### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#&#8203;400-November-2022)

[Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28)

-   JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes
    backwards-incompatible changes in the future, the major version will be incremented.
-   JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or
    plugin uses the `taffydb` package, see the
    [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template).
-   JSDoc now supports Node.js 12.0.0 and later.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-network-connectivity).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTcuMSJ9-->
sofisl pushed a commit that referenced this issue Nov 30, 2022
sofisl pushed a commit that referenced this issue Nov 30, 2022
🤖 I have created a release \*beep\* \*boop\* 
---
## [2.1.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.0.0...v2.1.0) (2020-06-16)


### Features

* add order field to TagField and TagTemplateField ([#157](https://www.github.com/googleapis/nodejs-datacatalog/issues/157)) ([70c23c2](https://www.github.com/googleapis/nodejs-datacatalog/commit/70c23c2b609bd24901dc902090e23fbf92b55895))
* move ts target to es2018 from es2016 ([#172](https://www.github.com/googleapis/nodejs-datacatalog/issues/172)) ([e354dde](https://www.github.com/googleapis/nodejs-datacatalog/commit/e354ddeeeedd3e106c50ed579075f23c9d9c5bb5))
* promote library to GA ([#177](https://www.github.com/googleapis/nodejs-datacatalog/issues/177)) ([ac11090](https://www.github.com/googleapis/nodejs-datacatalog/commit/ac110906b723f362024318295e3de6743c905b7e))


### Bug Fixes

* proper fallback option handling ([51df672](https://www.github.com/googleapis/nodejs-datacatalog/commit/51df6721306ab6d2d9bf6919b0f3f432ca85b4ab))
* regenerate unit tests ([#163](https://www.github.com/googleapis/nodejs-datacatalog/issues/163)) ([4593117](https://www.github.com/googleapis/nodejs-datacatalog/commit/45931176d266d364e0508039cf6a4e284ad2923d))
* synth.py clean up for multiple version ([#167](https://www.github.com/googleapis/nodejs-datacatalog/issues/167)) ([c799604](https://www.github.com/googleapis/nodejs-datacatalog/commit/c799604b2d29269006ff39748afb78302ce46ca2))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
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 Cloud Storage API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants