Skip to content

AppEngine.applicationId does not parse appid correctly #1

@matthewblain

Description

@matthewblain

The method AppEngine.applicationId parses the App ID using a mechanism which is not correct in all scenarios.

It should either use, or copy the convention used in, the AppIdentityService.

A full appid is partition~domain:id. "s~" is a US based High Replication Datastore. Other common partitions include "e", "o", and "dev". There may be others, or even appid without a partition. Note that the lack of a partition is highly unlikely as the master-slave datastore has been deprecated for many years.

https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/appidentity/AppIdentityService

    AppIdentityService.ParsedAppId parsedId = getAppIdentityService().parseFullAppId(id);
    return parsedId.getId();

https://github.com/presentco/present-engine/blob/master/src/main/java/present/engine/AppEngine.java#L36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions