hussain-s opened a new pull request, #13914:
URL: https://github.com/apache/gravitino/pull/13914
### What changes were proposed in this pull request?
Preserve the original `Accept` header values when `VersioningFilter` adds
Gravitino's versioned vendor media type. The filter now prepends the selected
vendor type instead of replacing the header.
### Why are the changes needed?
`POST /api/lineage` produces only `application/json`. Previously,
`VersioningFilter` replaced `Accept: application/json` with
`application/vnd.gravitino.v1+json`, so Jersey could not negotiate a response
media type and returned `406 Not Acceptable`.
Fix: #13191
### Does this PR introduce _any_ user-facing change?
Yes. Clients can submit OpenLineage events to `/api/lineage` with `Accept:
application/json` and receive the expected successful response rather than HTTP
406.
### How was this patch tested?
- Ran:
```shell
./gradlew :server:test \
--tests org.apache.gravitino.server.web.TestVersioningFilter \
-PskipDockerTests=true --no-daemon --console=plain
```
Result: 16 tests passed.
- Ran an isolated freshly built Gravitino server on port 8091 and submitted
a documented OpenLineage event with:
```http
Content-Type: application/json
Accept: application/json
```
Result: `HTTP/1.1 201 Created`. The event was also written to the lineage
sink log.
- Independent principal-level review found no blocking defects.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]