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

LocalDatastoreHelper fails to start if used in an environment that cannot access the "gcd" GCS bucket #376

Closed
aristide-n opened this issue Apr 2, 2021 · 2 comments · Fixed by aristide-n/java-datastore#1, #492 or googleapis/java-core#513
Labels
api: datastore Issues related to the googleapis/java-datastore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@aristide-n
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When attempting to use the Downloadable emulator, LocalDatastoreHelper downloads from a hardcoded URL to the file in the "gcd" GCS bucket:

EMULATOR_URL = new URL("http://storage.googleapis.com/gcd/tools/" + FILENAME);

When used in an environment that cannot access the "gcd" GCS bucket, LocalDatastoreHelper fails to start (e.g. when running in a GCE VM protected by a VPC-SC perimeter).

Describe the solution you'd like
If I could provide the emulator file URL in an environment variable, I could copy the file from the "gcd" bucket into another bucket that is accessible from the restricted environment and use that URL.

Describe alternatives you've considered
N/A

@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/java-datastore API. label Apr 2, 2021
aristide-n added a commit to aristide-n/java-datastore that referenced this issue Apr 2, 2021
@aristide-n aristide-n reopened this Apr 2, 2021
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 3, 2021
@dmahugh dmahugh added priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 9, 2021
@kolea2 kolea2 removed their assignment Apr 9, 2021
@kolea2 kolea2 removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 9, 2021
@aristide-n
Copy link
Contributor Author

I'm testing out a fix for this, I'll add a PR soon

aristide-n added a commit to aristide-n/java-datastore that referenced this issue May 9, 2021
aristide-n added a commit to aristide-n/java-datastore that referenced this issue May 9, 2021
aristide-n added a commit to aristide-n/java-datastore that referenced this issue May 9, 2021
aristide-n added a commit to aristide-n/java-core that referenced this issue Aug 8, 2021
aristide-n added a commit to aristide-n/java-core that referenced this issue Aug 8, 2021
aristide-n added a commit to aristide-n/java-core that referenced this issue Aug 9, 2021
aristide-n added a commit to aristide-n/java-datastore that referenced this issue Aug 9, 2021
lesv pushed a commit to googleapis/java-core that referenced this issue Aug 16, 2021
…513)

* feat: support downloading an emulator from an access controlled URL

fixes googleapis/java-datastore#376
used in googleapis/java-datastore#492

* fix format
@lesv lesv reopened this Aug 16, 2021
@lesv
Copy link
Contributor

lesv commented Aug 16, 2021

#492 is required before closing this.

gcf-merge-on-green bot pushed a commit that referenced this issue Sep 1, 2021
suztomo pushed a commit to googleapis/sdk-platform-java that referenced this issue Mar 21, 2023
…513)

* feat: support downloading an emulator from an access controlled URL

fixes googleapis/java-datastore#376
used in googleapis/java-datastore#492

* fix format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/java-datastore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
5 participants