ronething commented on code in PR #2546: URL: https://github.com/apache/apisix-ingress-controller/pull/2546#discussion_r2332386878
########## internal/adc/translator/httproute.go: ########## @@ -508,11 +531,22 @@ func (t *Translator) TranslateHTTPRoute(tctx *provider.TranslateContext, httpRou } else if len(upstreams) == 1 { // Single backend - use directly as service upstream service.Upstream = upstreams[0] + // remove the id and name of the service.upstream, adc schema does not need id and name for it + service.Upstream.ID = "" Review Comment: for service.upstream, should not set id field, adc sync will occur error. ``` HTTP 400: {"message":"[ { "code": "unrecognized_keys", "keys": [ "id" ], "path": [ "services", 0, "upstream" ], "message": "Unrecognized key: \"id\"" }, { "expected": "string", "code": "invalid_type", "path": [ "services", 0, "upstreams", 0, "name" ], "message": "Invalid input: expected string, received undefined" } ]","errors":[{"code":"unrecognized_keys","keys":["id"],"path":["services",0,"upstream"],"message":"Unrecognized key: "id""},{"expected":"string","code":"invalid_type","path":["services",0,"upstreams",0,"name"],"message":"Invalid input: expected string, received undefined"}]} ``` And as can be seen from schema.json, upstream does not have an `id` field https://github.com/api7/adc/blob/555ab977322904c619dd1b49ac8694476fb5ec41/schema.json#L473 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org