diff --git a/cmd/provision/proxies/remote-service-gcp/apiproxy/policies/Products-Callout.xml b/cmd/provision/proxies/remote-service-gcp/apiproxy/policies/Products-Callout.xml index 5780d7c..9866dac 100644 --- a/cmd/provision/proxies/remote-service-gcp/apiproxy/policies/Products-Callout.xml +++ b/cmd/provision/proxies/remote-service-gcp/apiproxy/policies/Products-Callout.xml @@ -1,5 +1,5 @@ - + Products Callout apigee-remote-service-targets diff --git a/cmd/provision/proxies/remote-service-gcp/apiproxy/proxies/default.xml b/cmd/provision/proxies/remote-service-gcp/apiproxy/proxies/default.xml index 74acde7..29b2cf8 100644 --- a/cmd/provision/proxies/remote-service-gcp/apiproxy/proxies/default.xml +++ b/cmd/provision/proxies/remote-service-gcp/apiproxy/proxies/default.xml @@ -88,16 +88,12 @@ lookupcache.Lookup-Products.cachehit = false - Get-Runtime-Version + Products-Callout lookupcache.Lookup-Products.cachehit = false Products-Callout-Legacy - (lookupcache.Lookup-Products.cachehit = false) and (runtime_version LesserThan "1.4.0") - - - Products-Callout - (lookupcache.Lookup-Products.cachehit = false) and (runtime_version GreaterThanOrEquals "1.4.0") + javacallout.Products-Callout.failed = true Set-Product-Cache diff --git a/cmd/provision/proxies/remote-service-gcp/apiproxy/resources/py/get-runtime-version.py b/cmd/provision/proxies/remote-service-gcp/apiproxy/resources/py/get-runtime-version.py index c3b6491..7f5094c 100644 --- a/cmd/provision/proxies/remote-service-gcp/apiproxy/resources/py/get-runtime-version.py +++ b/cmd/provision/proxies/remote-service-gcp/apiproxy/resources/py/get-runtime-version.py @@ -17,6 +17,7 @@ version = os.environ.get("APIGEE_DPCOLOR", "") if len(version) > 0: - flow.setVariable("runtime_version", ".".join(version[1:4])) + dig = [c for c in version if c.isdigit()] + flow.setVariable("runtime_version", ".".join(dig[0:3])) else: flow.setVariable("runtime_version", "unknown")