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

Make getProjectId() supports GAE #1726

Merged
merged 11 commits into from
Mar 13, 2017
Merged

Make getProjectId() supports GAE #1726

merged 11 commits into from
Mar 13, 2017

Conversation

shinfan
Copy link
Contributor

@shinfan shinfan commented Mar 9, 2017

Fixes #1500

  • Testing:
    • Local sample app on GAE
    • Local gcloud logging sample app on gRPC (throws CallNotFoundException)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2017
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.50</version>
</dependency>

This comment was marked as spam.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 10, 2017

@garrettjonesgoogle I have reverted the change and improve the error message. PTAL

} catch (Exception exception) {
if (System.getProperty("com.google.appengine.runtime.version") != null) {
// Could not resolve appengine classes under GAE environment.
throw new RuntimeException("Unable to resolve appengine classes. Missing dependency.");

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6438385 on shinfan:master into ** on GoogleCloudPlatform:master**.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 11, 2017

PTAL

APPENGINE.md Outdated
----------
This file provides extra instructions to setup Google Cloud Java client with GoogleAppEngine.
See [Quickstart](./README.md#quickstart) for Google Cloud Java common instructions.
See [Quickstart](https://cloud.google.com/appengine/docs/standard/java/quickstart) for extra GAE instructions.

This comment was marked as spam.

This comment was marked as spam.

README.md Outdated
@@ -57,6 +57,8 @@ If you are using SBT, add this to your dependencies
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.4-alpha"
```

For GoogleAppEngine use case, see [more instructions here](./APPENGINE.md).

This comment was marked as spam.

APPENGINE.md Outdated
@@ -0,0 +1,31 @@
Use Google Cloud Java Client with GoogleAppEngine

This comment was marked as spam.

This comment was marked as spam.

APPENGINE.md Outdated
Quickstart
----------
This file provides extra instructions to setup Google Cloud Java client with GoogleAppEngine.
See [Quickstart](./README.md#quickstart) for Google Cloud Java common instructions.

This comment was marked as spam.

This comment was marked as spam.

APPENGINE.md Outdated

Quickstart
----------
This file provides extra instructions to setup Google Cloud Java client with GoogleAppEngine.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 37fe816 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 37fe816 on shinfan:master into ** on GoogleCloudPlatform:master**.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 13, 2017

PTAL

APPENGINE.md Outdated
----------
This file provides extra instructions to set up Google Cloud Java Client with Google App Engine.
See [Quickstart](./README.md#quickstart) for general instructions on using Google Cloud Java.
See [Instructions](https://cloud.google.com/appengine/docs/standard/java/quickstart) for extra Google App Engine instructions.

This comment was marked as spam.

This comment was marked as spam.

} catch (Exception exception) {
if (System.getProperty("com.google.appengine.runtime.version") != null) {
// Could not resolve appengine classes under GAE environment.
throw new UnsupportedOperationException("Unable to resolve appengine-sdk classes. "

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 977ec60 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 977ec60 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 977ec60 on shinfan:master into ** on GoogleCloudPlatform:master**.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 13, 2017

PTAL

if (System.getProperty("com.google.appengine.runtime.version") != null) {
// Could not resolve appengine classes under GAE environment.
throw new RuntimeException("Unable to resolve appengine-sdk classes. "
+ "For more details see "

This comment was marked as spam.

This comment was marked as spam.

@shinfan
Copy link
Contributor Author

shinfan commented Mar 13, 2017

@garrettjonesgoogle PTAL

@garrettjonesgoogle
Copy link
Member

LGTM

@shinfan shinfan merged commit 7a310c4 into googleapis:master Mar 13, 2017
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 7a65a30 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 7a65a30 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5881706 on shinfan:master into ** on GoogleCloudPlatform:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5881706 on shinfan:master into ** on GoogleCloudPlatform:master**.

@ludoch
Copy link
Contributor

ludoch commented Mar 13, 2017 via email

@shinfan
Copy link
Contributor Author

shinfan commented Mar 13, 2017

@ludoch I have tested this end-to-end on my local machine. I am happy to test it in prod if you gave me the access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement. running on app engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants