Description
Description
Registry Version: 2.4.11.Final and 2.4.12.Final
Persistence type: Tested in both kafkasql
and mysql
I am trying to take advantage of schema references for my protobuf schemas using the /apis/registry/v2/groups/{groupId}/artifacts?ifExists=RETURN_OR_UPDATE
resource, and am getting back a 409 "unable to find" for the schemas references inside of the docker container. As expected, I am registering the child references first. Oddly, I went to debug this with the jar, using the same build tag and the schemas register fine with the same requests. I have verified the broken container behavior both locally and an integrated environment, to rule out any strange local issues.
Environment
OSX - both dockerized and bare metal
k8s
Interacting with apicurio 2.4.11.Final and 2.4.12.Final directly via the v2 API, with the following settings enabled:
registry.rules.global.compatibility=FULL_TRANSITIVE
registry.rules.global.validity=SYNTAX_ONLY
registry.rest.artifact.deletion.enabled=true
Steps to Reproduce
- Copy the protobuf schemas below into a local directory structure that matches up with their includes
- Submit them in the correct order to the
/apis/registry/v2/groups/{groupId}/artifacts?ifExists=RETURN_OR_UPDATE
API (grandchild, child, parent) with refs (see requests below). - See the 409 error
Requests
Grandchild
Headers
"Content-Type", "application/create.extended+json"
"X-Registry-ArtifactType", "PROTOBUF"
"X-Registry-ArtifactId", "foo.bar.test.external.child.AGrandchildV1"
"X-Registry-Name", "external/child/a_grandchild.proto"
Body
content: "<external/child/a_grandchild.proto content>"
references: []
Child
Headers
"Content-Type", "application/create.extended+json"
"X-Registry-ArtifactType", "PROTOBUF"
"X-Registry-ArtifactId", "foo.bar.test.external.child.AChildV1"
"X-Registry-Name", "external/child/a_child.proto"
Body
content: "<external/child/a_child.proto content>"
references: [{GroupId: "default", ArtifactId: "foo.bar.test.external.child.AGrandchildV1", Name: "external/child/a_grandchild.proto", Version: "1"}]
Parent
Headers
"Content-Type", "application/create.extended+json"
"X-Registry-ArtifactType", "PROTOBUF"
"X-Registry-ArtifactId", "foo.bar.test.external.AParentV1"
"X-Registry-Name", "external/a_parent.proto"
Body
content: "<external/a_parent.proto content>"
references: [{GroupId: "default", ArtifactId: "foo.bar.test.external.child.AChildV1", Name: "external/child/a_child.proto", Version: "1"}]
Expected vs Actual Behaviour
Expected: Schemas are successfully stored to the registry.
Actual: A 409 SchemaException is returned
Logs
"SchemaException: unable to find external/child/a_child.proto\n searching 1 proto paths:\n /\n for file foo/bar/test/external/default.proto\nunable to resolve AChildV1\n for field child (foo/bar/test/external/default.proto:19:3)\n in message foo.bar.test.external.AParentV1 (foo/bar/test/external/default.proto:11:1)"
Strange thing for me is the nested path it's showing on the virtual filesystem vs the actual name given for the artifact (the name submitted for the artifact matches the import path in the proto). Maybe I'm submitting incorrectly?
Activity