Search code examples
google-app-enginegoogle-cloud-endpointsgoogle-cloud-endpoints-v2

can't deploy Google Cloud Endpoints 2.0 on existing service


I have had a Python-based Google App Engine app working great using Cloud Endpoints 1.0 for several years without incident. I have had nothing but trouble migrating to Cloud Endpoints 2.0.

Currently I'm in the following state after already clearing many previous hurdles described in other similar questions:

  • I have one version of my service called gce1 which uses Endpoints 1.0 and is set as the default service receiving 100% of my traffic. I can point API clients and the APIs Explorer to both gce1-dot-myservice.appspot.com and the default myservice.appspot.com and everything works fine. I can verify in the logs that anything that goes through here is using GCE 1.0.
  • I have a second version of my service called gce2 which is not receiving any traffic by default, but if I point an API client or the APIs Explorer to gce2-dot-myservice.appspot.com it works just fine, and I can verify in the logs that anything that goes through here is using GCE 2.0.

Great, right? So it would seem that all I need to do is migrate all my traffic to gce2 and I'm done.

But... when I do that everything breaks! The default myservice.appspot.com serves up 405 POST Method Not Allowed responses to my existing clients, and if I look at the APIs Explorer, suddenly it now shows a bunch of obsolete methods that I think are from years ago and are no longer used in my current API. I can't tell where those are coming from (they are nowhere in my code, and haven't been for years), and I can't get the default service to serve the GCE 2.0 API no matter what I do.

The biggest problem is that I have thousands of users in the wild that all point to the default API URL, so it isn't so easy to just have them start pointing to gce2-dot-myservice, and besides, it doesn't make sense that I can't make the new default the new default. I've been working on this migration to GCE 2.0 for months, the deadline for getting off GCE 1.0 is getting closer by the day, and Google Support has not responded since late last year on this topic.

I should also mention I have tried:

  • Pushing a new service with the GCE2.0 code directly to default
  • Pushing a new service with no API at all (to maybe clear a cache or something)
  • Pushing services with all different sorts of version names

None of these have worked, although I haven't done any of them allowing a long delay since I'm working on a live service with real users.


Solution

  • This issue is now resolved, so for most people it should no longer occur. However, in my specific case, I had a legacy API that was getting in the way and had to be deleted, which did require specific attention from a Google engineer.

    If you have similar issues, visit issuetracker.google.com/issues/76031966 and comment there.

    Thanks to @saiyr for help tracking this down.