Closed laughingbiscuit closed 3 years ago
I just tried deploying a proxy with an invalid policy, the plugin fails as expected
Request prepared for the server
**************************
POST https://apigee.googleapis.com/v1/organizations/***/apis?action=import&name=Mock-v1
accept: [application/json]
accept-encoding: [gzip]
authorization: [Bearer [Not shown in log]
x-goog-api-format-version: 2
content-type: multipart/form-data; boundary=__END_OF_PART__
[Request body contains data, not shown]
[ERROR] 400 Bad Request
{
"error": {
"code": 400,
"message": "bundle contains errors",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/edge.configstore.bundle.BadBundle",
"violations": [
{
"filename": "apiproxy/policies/AM-Set-Headers.xml",
"description": "unknown XML root element \"AssinMessage\""
},
{
"filename": "apiproxy/proxies/default.xml",
"description": "The Step element references policies that don't exist: \"AM-Set-Headers\"."
}
]
},
{
"@type": "type.googleapis.com/google.rpc.RequestInfo",
"requestId": "9158716448136585439"
}
]
}
}
[ERROR]
* * * * * * * * * * *
This deployment could have failed for a variety of reasons.
* * * * * * * * * * *
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.899 s
[INFO] Finished at: 2021-05-18T10:15:54-07:00
[INFO] ------------------------------------------------------------------------
Looks like its failing only when the error is beyond the validation that runs while importing the bundle
Fixed and released in v2.1.1
Steps to reproduce: 1) Run
mvn install
on a bundle with an invalid OAS specification 2) Note that maven is looping (tested at 3mins+)3) In a separate session, get the deployment status...
Desired behaviour:
mvn
command will fail if"state": "ERROR"
rather than endlessly looping.