Skip to content

don't use UrlFetchTransport in App Engine Flex environment #1492

Closed

Description

@eddavisson

The decision of whether to use UrlFetchTransport instead of NetHttpTransport is currently based on the presence of the com.google.appengine.application.id system property. This can result in UrlFetchTranport being used in the App Engine Flex environment (at least in compat mode).

One possible approach is:

if (System.getProperty("com.google.appengine.application.id") != null
    // Rule out App Engine Flex compat mode.
    && System.getenv("GAE_VM") == null
    // Rule out App Engine Flex.
    && System.getenv("GCLOUD_PROJECT" ) == null) {
  // use UrlFetchTransport
}

https://github.com/GoogleCloudPlatform/google-cloud-java/blob/e5f90467fe7490759482e6a8bc62b1246318a7f0/google-cloud-core/src/main/java/com/google/cloud/HttpServiceOptions.java#L61

https://github.com/GoogleCloudPlatform/google-cloud-java/blob/0d9d1b3ce548aa5335e23b8c2ec0464df8002d9f/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java#L318

Activity

  1. eddavisson commented on Dec 21, 2016

    @eddavisson
    Author
  2. added
    api: datastoreIssues related to the Datastore API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Jan 11, 2017
  3. self-assigned this
    on Mar 21, 2017
  4. 1 remaining item

  5. vam-google commented on Apr 11, 2017

    @vam-google
    Contributor

    Should be fixed by #1893 and will be released with next release (the one after 0.12.0). Please reopen if you keep experiencing the issue after the fix.

  6. added a commit that references this issue on Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: coreapi: datastoreIssues related to the Datastore API.running on app enginetype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions