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

Redeploying OpenAPI spec into App Engine standard environment


When I do some changes in OpenAPI spec, which don't involve any changes in the code, do I need to redeploy the code along with the new specification?

When I deploy OpenAPI spec with gcloud service-management deploy command I get back in it's output new service configuration version, which I should set to the ENDPOINTS_SERVICE_VERSION parameter in the app.yaml file.

I'm not sure but it looks like I have to redeploy the app every time I deploy a new version of my OpenAPI spec, even when the application code doesn't change I still need to point it to the right service configuration version with the new ENDPOINTS_SERVICE_VERSION value, is that right?

If so, then it's different from what is described in the How API Deployment Works document for AE flex environment under the "Redeployment" section, where it says the following:

You can use the gcloud service-management deploy command to update just the API specification without redeploying your backend API server code or the Extensible Service Proxy. This is useful if you are changing a configuration-only detail.

When you change the API specification, the Service Control API backing your running service instances will pick up the change because as it depends on the same service configuration.

Maybe someone could help to clarify how exactly it works in case of AE standard environment?


Solution

  • Are you using the Endpoints Frameworks? If so, then you will have to deploy the app when you make a new service config version, because, as you mentioned, the app.yaml specifies which service config to use.