GAE云端点 - Api部署后未更新 [英] GAE cloud endpoints - Api not updating after deploy
问题描述
我开始在GAE项目中使用云端点,但遇到了api未在服务器上更新的问题。
但是当我部署时,没有任何变化。
- myapp.appspot.com:8888/_ah/api/explorer
进一步的调查显示,url结束点更新 但是加载的客户端api仍然不正确。 如果我将来自foo / list的调用更改为foo / list2,则其余url将更新,那么api包就不会。 我会尽力涵盖人们可能遇到的两种情况: 检查您的管理日志( https://appengine.google.com/adminlogs?&app_id=s~YOUR-APP-ID )。成功部署应用程序代码后,您应该看到以下消息: 不久之后,您应该看到: 如果此消息指示API配置更新失败,你应该再次部署。如果所述错误持续存在,则应通知我们一个错误。如果您没有看到关于API配置的任何消息,则应检查路径配置中是否明确指定了路径 检查您的应用程序日志( https:// appengine。 google.com/logs?&app_id=s~YOUR-APP-ID )。部署完成后,Google的API基础架构会在您的应用程序中向 I'm starting to use cloud endpoints in my GAE project but have been running into issues with the api not updating on the server. But when I deploy, nothing changes. Further investigation shows the url end points update
example: https://myapp.appspot.com/_ah/api/myapp/v1/foo/list But the loaded client api is still incorrect.
example: gapi.client.load('myapp', 'v1', callback, url);
gapi.client.myapp.foo.list(); If I changed the call from foo/list to foo/list2, the rest url would update, the api package would not. I'll try to cover the two cases people could run into: The Google APIs Explorer web app aggressively caches, so you'll need to clear your cache or force a refresh when you update your API server side to see the changes in the client. If you're having deployment issues, there are two places to look when debugging: Check your Admin Logs (https://appengine.google.com/adminlogs?&app_id=s~YOUR-APP-ID) after deployment. After a successful deployment of your application code, you should see the message: and shortly after that you should see: If you this message indicates the API configuration update failed, you should deploy again. If said error is persistent, you should notify us of a bug. If you don't see any message about your API configuration, you should check that the path Check your Application Logs (https://appengine.google.com/logs?&app_id=s~YOUR-APP-ID) after deployment. After the deployment finishes, Google's API infrastructure makes a request to If you are consistently getting a 这篇关于GAE云端点 - Api部署后未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
例如:
示例:gapi.client.load('myapp','v1',callback,url);
gapi.client.myapp.foo.list();
客户端:
服务器端(部署的生产App Engine应用程序):
完成的新默认版本更新
成功更新API配置
/ _ ah / spi /.*
( app.yaml
for Python, web.xml
for Java)。
/ _ ah / spi / BackendService.getApiConfigs
发出请求,以便您的API配置(如JSON)可以通过Google可以创建API基础结构和所有与发现相关的配置。如果此请求没有填写200,那么您的API更改将不会显示,因为Google的API基础结构没有任何可注册的内容。 302
重定向请求到 / _ ah / spi / BackendService.getApiConfigs
,这是因为你(或者你的生成的API config)指定了一个bns适配器,它使用 http:
作为API根目录中的协议,但是 web.xml $ c需要$ c>(Java)或
app.yaml
(Python),通过 / _ ah / spi
的路径是安全的。这将使得使用 http:
作为协议的请求被重定向(使用 302
)到 https:
作为协议。在进入Trusted Tester论坛之前,进行了讨论
Client Side:
Server Side (In Deployed Production App Engine App):
Completed update of a new default version
Successfully updated API configuration
/_ah/spi/.*
is explicitly named in your routing config (app.yaml
for Python, web.xml
for Java)./_ah/spi/BackendService.getApiConfigs
in your application so that your API configuration (as JSON) can be registered with Google's API infrastructure and all the discovery-related configs can be created. If this request does not complete with a 200, then your API changes will not show up since Google's API infrastructure will have nothing to register.302
redirect for requests to /_ah/spi/BackendService.getApiConfigs
, it is because you (or your generated API config) have specified a "bns adapter" that uses http:
as the protocol in your API root, but your web.xml
(Java) or app.yaml
(Python) is required that paths through /_ah/spi
are secure. This will make requests using http:
as the protocol be redirected (using 302
) to the same page with https:
as the protocol. This was discussed on the Trusted Tester forum before going to Experimental.