-
Notifications
You must be signed in to change notification settings - Fork 369
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: Improve STORAGE_EMULATOR_HOST usage #2470
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
🤖 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 -- conventional-commit-lint bot |
Fix usage for STORAGE_EMULATOR_HOST together with baseUrl
Thanks @ddelgrosso1 Should we just introduce new env variable, which will work the same as |
@le0pard fair question. Let me check internally with the firebase team as to what the current status is. The problem with adding a new variable is it is one more thing to maintain and deprecating something else becomes a long task. Is there a problem with using apiEndpoint for your use case? |
Thanks @ddelgrosso1
In JS codebase I need create separate env variable like const {
Storage: GoogleStorage
} = require('@google-cloud/storage')
const STORAGE_ENDPOINT = process.env.GCLOUD_API_ENDPOINT ?? undefined
const storage = new GoogleStorage({
apiEndpoint: STORAGE_ENDPOINT
}) And of course I cannot share same |
Problem
STORAGE_EMULATOR_HOST
env,apiEndpoint == baseUrl
. This lead to invalid url to fetch data, because nostorage/v1
inbaseUrl
apiEndpoint
, in this case all worksExpected behaviour
STORAGE_EMULATOR_HOST
env works same way asapiEndpoint
propertyFix
STORAGE_EMULATOR_HOST
as forapiEndpoint
to generatebaseUrl