-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use GOOGLE_APPLICATION_CREDENTIALS and GCLOUD_PROJECT vars in RemoteGcsHelper #339
Use GOOGLE_APPLICATION_CREDENTIALS and GCLOUD_PROJECT vars in RemoteGcsHelper #339
Conversation
* variables {@code GCLOUD_TESTS_PROJECT_ID} and {@code GCLOUD_TESTS_KEY} are not set or if | ||
* the file pointed by {@code GCLOUD_TESTS_KEY} does not exist | ||
* variables {@code GCLOUD_PROJECT} and {@code GOOGLE_APPLICATION_CREDENTIALS} are not set or | ||
* if the file pointed by {@code GOOGLE_APPLICATION_CREDENTIALS} does not exist | ||
*/ | ||
public static RemoteGcsHelper create() throws GcsHelperException { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
e90f19a
to
cfdd6d6
Compare
I fixed the comment and now RemoteGcsHelper uses default auth credentials. |
#344 is now merged in, which fixes the default auth credentials NPE |
I realized now that using default authentication credentials causes signUrl method to fail (see here) and consequently also signUrl IT tests fail. We can manually pass a I suggest that we do not use default lookup in |
@@ -45,8 +45,8 @@ | |||
|
|||
private static final Logger log = Logger.getLogger(RemoteGcsHelper.class.getName()); | |||
private static final String BUCKET_NAME_PREFIX = "gcloud-test-bucket-temp-"; | |||
private static final String PROJECT_ID_ENV_VAR = "GCLOUD_TESTS_PROJECT_ID"; | |||
private static final String PRIVATE_KEY_ENV_VAR = "GCLOUD_TESTS_KEY"; | |||
private static final String PROJECT_ID_ENV_VAR = "GCLOUD_PROJECT"; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
We could also support it when |
cfdd6d6
to
9e273b4
Compare
- Add a method to convert ApplicationDefaultCredentials to ServiceAccountAuthCredentials - Add type check and conversion to Storage.signUrl
9e273b4
to
82ebc71
Compare
In 82ebc71 I fixed the comment and:
|
Great! Looks good to me. Any reason you still have the "don't merge" label? |
I just forgot to remove :) |
Use GOOGLE_APPLICATION_CREDENTIALS and GCLOUD_PROJECT vars in RemoteGcsHelper
…manager to v0.118.6-alpha (googleapis#339) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-resourcemanager](https://togithub.com/GoogleCloudPlatform/google-cloud-java) | patch | `0.118.5-alpha` -> `0.118.6-alpha` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **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 [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-resourcemanager).
🤖 I have created a release *beep* *boop* --- ## [2.3.2](googleapis/java-workflow-executions@v2.3.1...v2.3.2) (2022-08-11) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#336](googleapis/java-workflow-executions#336)) ([eab4139](googleapis/java-workflow-executions@eab4139)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…ator_java versions (#339) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472750037 Source-Link: googleapis/googleapis@88f2ea3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
🤖 I have created a release *beep* *boop* --- ## [2.3.9](https://togithub.com/googleapis/java-contact-center-insights/compare/v2.3.8...v2.3.9) (2022-10-04) ### Bug Fixes * update protobuf to v3.21.7 ([4758cf0](https://togithub.com/googleapis/java-contact-center-insights/commit/4758cf035c2092ffc1f1cad1b3984a0344eb67d5)) ### Documentation * Updating comments ([#345](https://togithub.com/googleapis/java-contact-center-insights/issues/345)) ([ebadaa5](https://togithub.com/googleapis/java-contact-center-insights/commit/ebadaa5e44ded908d5517d12f52e193b70be2dda)) ### Dependencies * Update dependency certifi to v2022.9.24 ([#362](https://togithub.com/googleapis/java-contact-center-insights/issues/362)) ([5d1ce8b](https://togithub.com/googleapis/java-contact-center-insights/commit/5d1ce8bf7dd759b4019e4b189d8c2054384e919d)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.14.6 ([#341](https://togithub.com/googleapis/java-contact-center-insights/issues/341)) ([4456bd4](https://togithub.com/googleapis/java-contact-center-insights/commit/4456bd42500b1da5d427702c187f8e71140acd94)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.14.7 ([#346](https://togithub.com/googleapis/java-contact-center-insights/issues/346)) ([5e0de9e](https://togithub.com/googleapis/java-contact-center-insights/commit/5e0de9ec21b8eb55a4622ec2f018cd4bfd79b304)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.15.0 ([#348](https://togithub.com/googleapis/java-contact-center-insights/issues/348)) ([e1c52f6](https://togithub.com/googleapis/java-contact-center-insights/commit/e1c52f6fd766c918756f4045926b2a02c9478cba)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.16.0 ([#353](https://togithub.com/googleapis/java-contact-center-insights/issues/353)) ([4744d87](https://togithub.com/googleapis/java-contact-center-insights/commit/4744d876764bc18f52e2c570f2c72a34b3ef1a53)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.16.1 ([#356](https://togithub.com/googleapis/java-contact-center-insights/issues/356)) ([3c860f8](https://togithub.com/googleapis/java-contact-center-insights/commit/3c860f8a0377fd88e344ad228835cc0ff932c41d)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.12 ([#339](https://togithub.com/googleapis/java-contact-center-insights/issues/339)) ([4e329c4](https://togithub.com/googleapis/java-contact-center-insights/commit/4e329c4ee1d5072fcd2c48958a6d48576813bcdd)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.13 ([#347](https://togithub.com/googleapis/java-contact-center-insights/issues/347)) ([45b3540](https://togithub.com/googleapis/java-contact-center-insights/commit/45b35403b2997ef8421e9573f050537812c61cea)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.14 ([#352](https://togithub.com/googleapis/java-contact-center-insights/issues/352)) ([9fc2624](https://togithub.com/googleapis/java-contact-center-insights/commit/9fc2624a370c0bd81d7d88204830a162a41f0f23)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.16 ([#354](https://togithub.com/googleapis/java-contact-center-insights/issues/354)) ([9b355ad](https://togithub.com/googleapis/java-contact-center-insights/commit/9b355ad24da4561a7e10b7a06dcb6bf57e4aa9a7)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.17 ([#358](https://togithub.com/googleapis/java-contact-center-insights/issues/358)) ([7d2a878](https://togithub.com/googleapis/java-contact-center-insights/commit/7d2a8784bc7f0422831844f823a304f3bfda3192)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.18 ([#359](https://togithub.com/googleapis/java-contact-center-insights/issues/359)) ([4e93e08](https://togithub.com/googleapis/java-contact-center-insights/commit/4e93e08c425b09ca35c977c5ea22f4c7b2538ae3)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#351](https://togithub.com/googleapis/java-contact-center-insights/issues/351)) ([c1e8dfa](https://togithub.com/googleapis/java-contact-center-insights/commit/c1e8dfa39db2d82f89401b0aa14a95dd1d2b00e1)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#355](https://togithub.com/googleapis/java-contact-center-insights/issues/355)) ([8a57045](https://togithub.com/googleapis/java-contact-center-insights/commit/8a57045112d9b905dc3edae8b9b01d25d3f1788d)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#368](https://togithub.com/googleapis/java-contact-center-insights/issues/368)) ([c8e9ca4](https://togithub.com/googleapis/java-contact-center-insights/commit/c8e9ca43bf90feacda4129e1ac2f26592c8ae47e)) * Update dependency gcp-releasetool to v1.8.8 ([#363](https://togithub.com/googleapis/java-contact-center-insights/issues/363)) ([22d1d6b](https://togithub.com/googleapis/java-contact-center-insights/commit/22d1d6bada56d263474b8550bf92b72f6bfc24ad)) * Update dependency google-auth to v2.11.1 ([#364](https://togithub.com/googleapis/java-contact-center-insights/issues/364)) ([04b3da7](https://togithub.com/googleapis/java-contact-center-insights/commit/04b3da765c19bd53b4d7c5dfa814d1dd450a480d)) * Update dependency google-cloud-core to v2.3.2 ([#365](https://togithub.com/googleapis/java-contact-center-insights/issues/365)) ([94a569f](https://togithub.com/googleapis/java-contact-center-insights/commit/94a569f7adb2f3c59a57d1428eb70ca17c52f827)) * Update dependency pyjwt to v2.5.0 ([#366](https://togithub.com/googleapis/java-contact-center-insights/issues/366)) ([96d97a8](https://togithub.com/googleapis/java-contact-center-insights/commit/96d97a8c1dbe616f48474949dc936503842b170e)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This fixes #335