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

Re-expose customEndpoint configuration option #1315

Closed
jeantil opened this issue Oct 19, 2020 · 3 comments · Fixed by #1316
Closed

Re-expose customEndpoint configuration option #1315

jeantil opened this issue Oct 19, 2020 · 3 comments · Fixed by #1316
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jeantil
Copy link

jeantil commented Oct 19, 2020

Is your feature request related to a problem? Please describe.

I am trying to write tests for code which uses GCS. these tests are run on a CI platform. Having the tests run against a real bucket means potential erratic failures because of network issues and possibly billing for "useless" operations. I am trying to use a locally deployable emulator (even if it doesn't support all the features) but that proves harder than it should be.

In #18 (comment) @stephenplusplus suggested to use

const Storage = require('@google-cloud/storage')
const gcs = new Storage({ customEndpoint: true })

but this feature no longer works, even though the feature is still available in the @googlecloud/common library

Describe the solution you'd like

I would like the at least that parameter to be restored in StorageOptions and propagated to the GoogleAuth client. I am not sure if StorageOption should add more options from MakeAuthenticatedRequestFactoryConfig

The customEndpoint parameter then needs to propagated when building the config object which is passed to the Service abstract class in the Storage class constructor

Describe alternatives you've considered

My current workaround is to use the apiEndpoint to run against a local store but provide valid credentials to a free firebase project in order to pass through auth. This means our test suite cannot work without access to google's servers and the CI plaform uselessly sends requests to google auth servers.

I am willing to contribute a PR if it can help.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Oct 19, 2020
@stephenplusplus stephenplusplus self-assigned this Oct 19, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 20, 2020
@shaffeeullah shaffeeullah added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Oct 20, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 20, 2020
@shaffeeullah shaffeeullah added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Oct 20, 2020
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Oct 20, 2020
@jeantil
Copy link
Author

jeantil commented Oct 29, 2020

thanks for the quick update !

@rdlowrey
Copy link

Impacted me as well -- thanks for fixing 👍

@stephenplusplus
Copy link
Contributor

Thanks for your help and patience! It's released now under 5.4.0.

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. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants