cloudendpoints / endpoints-management-python

A Python library for managing API services using Google's Service Control APIs
Apache License 2.0
19 stars 22 forks source link

Use most recent ENDPOINTS_SERVICE_VERSION if not provided #68

Closed jamielennox closed 6 years ago

jamielennox commented 6 years ago

Hi,

I'm trying to automate an endpoints + AppEngine deployment. Firstly I push to endpoints, then i have to capture the version that was created and insert that into the env_variables in the app.yaml file before deploying my application. This is a fairly clunky flow.

There are two things I've found here that potentially improve this:

1) Have AppEngine always use the latest API version: https://cloudplatform.googleblog.com/2018/04/Cloud-Endpoints-introducing-a-new-way-to-manage-API-configuration-rollout.html

2) Have the library fetch and use the latest version automatically: https://github.com/cloudendpoints/endpoints-management-java/blob/master/endpoints-service-config/src/main/java/com/google/api/config/ServiceConfigSupplier.java#L122-L147 https://cloud.google.com/service-management/reference/rest/v1/services.configs/list

I'm uncertain of how option 1 plays into this, whether it's a requirement for option 2, but it appears that if you don't provide a version to the java library it will simply list the available configurations and use the most recent. This would be extremely useful in automatic deployments.

Is this something we can add to the python library?