Versioning with endpoint V2 on GAE

后端 未结 2 1147
臣服心动
臣服心动 2021-02-06 19:11

I have the live version of my app deployed with its endpoints (no problem with that). I also want to easily be able to test other versions (e.g. staging).

With e

2条回答
  •  再見小時候
    2021-02-06 20:04

    While not really an answer, I saw this:

    When deploying a legacy type endpoint (V1), everything works fine, https://3-dot-xx.appspot.com/_ah/api/discovery/v1/apis will show the APIs deployed to version 3

    When deploying a new type endpoint (v2), eg 2-dot-, it depends on the last V1 endpoint deployed on the version.

    • if it is a new version with no V1 endpoint deployed before, it works and the new endpoint is shown on 2-dot-
    • if there was a V1 endpoint deployed here before, it will show the old V1 apis and naturally generate a 404 when accessing, as the actually running GAE version is different
    • if the version was never deployed at all (eg asdf-dot-), or using the default (without the -dot- etc), it will show the default version and access it correctly.
    • if there never was a V1 service deployed, but a V2 service, it works fine when deploying a new V2 service

    So, it seems like there is a bug that will prevent you from using stable names for testing / staging environments if you already had a V1 service running on them. It would be very helpful if someone from Google could confirm this bug and suggest an appropriate workaround before I have to do a lot of costly changes to change URLs.

提交回复
热议问题