MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / validateAppEngineAPIs

Function validateAppEngineAPIs

cmd/python/appengine/lib/lib.go:51–71  ·  view source on GitHub ↗
(ctx *gcp.Context)

Source from the content-addressed store, hash-verified

49}
50
51func validateAppEngineAPIs(ctx *gcp.Context) error {
52 supportsApis, err := appengine.ApisEnabled(ctx)
53 if err != nil {
54 return err
55 }
56
57 usingAppEngine, err := appEngineInDeps(ctx)
58 if err != nil {
59 return err
60 }
61
62 if supportsApis && !usingAppEngine {
63 ctx.Warnf(appengine.UnusedAPIWarning)
64 }
65
66 if !supportsApis && usingAppEngine {
67 ctx.Warnf(appengine.DepWarning)
68 }
69
70 return nil
71}
72
73func entrypoint(ctx *gcp.Context) (*appstart.Entrypoint, error) {
74 // Check installed gunicorn version and warn if version is lower than supported

Callers 1

BuildFnFunction · 0.70

Calls 3

ApisEnabledFunction · 0.92
WarnfMethod · 0.80
appEngineInDepsFunction · 0.70

Tested by

no test coverage detected