Skip to content

Opencmw-cpp compatibility - #226

Merged
wirew0rm merged 4 commits into
mainfrom
opencmw-cpp-compat
Dec 10, 2025
Merged

wirew0rm merged 4 commits into
mainfrom
opencmw-cpp-compat

Conversation

@wirew0rm

@wirew0rm wirew0rm commented Dec 8, 2025

Copy link
Copy Markdown
Member

Follows up on a few differences that have emerged between opencmw-cpp and opencmw-java.

See the individual commits for descriptions and reasoning for the individual changes.

This will be followed up by a CI test which will verify against a binary from the opencmw-cpp repository to ensure that changes in individual repositories will stay compatible.

!fixes #223

Changes the serialisation of `MimeType` to use the verbose media type
instead of the short enum name to be in line with opencmw-java's
behaviour. Example `application/octet-stream` instead of `BINARY`.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
The url constructor will encode the individual parts of the url in its
constructor. If the individual components are already percent encoded,
the percent signs of the encdoded characters will themself be encoded.

For example `http:://example.com/path/file.ext?type=foo/bar` would
get the query part encoded to `type=foo%2252Fbar` instead of
`type=foo/bar`. Note that which characters will be escaped in an url
depends on the part, in other components the slash would need to be
escaped. Fortunately this is already implemented in the uri
implementation.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
There were some minor differences compared to the c++ implementation.
This changes the java version to:
 - use a leading slash in the subscription topic
 - terminate mds subscription topics with a `#` to break prefix matching
   which would generate multiple updates

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
@wirew0rm
wirew0rm temporarily deployed to configure coverage December 9, 2025 10:25 — with GitHub Actions Inactive
@wirew0rm
wirew0rm temporarily deployed to configure coverage December 9, 2025 10:25 — with GitHub Actions Inactive
@wirew0rm wirew0rm mentioned this pull request Dec 9, 2025
2 tasks done
Adds normalisation to the zmq subscription topic to account for
differences in url representation.
This makes sure that all unreserved characters are escaped and all query
keyvalue pairs are sorted alphabetically, matching subscription topics
generated by opencmw-cpp.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
@wirew0rm
wirew0rm temporarily deployed to configure coverage December 10, 2025 09:04 — with GitHub Actions Inactive
@wirew0rm
wirew0rm merged commit 4ae31d7 into main Dec 10, 2025
11 of 19 checks passed
@wirew0rm
wirew0rm deleted the opencmw-cpp-compat branch December 10, 2025 09:07

This branch had an error being deployed

1 failed and 1 inactive deployments
deploy — e3a1106b Deployed Dec 10, 2025 by wirew0rm via Deploy to github packages and Sonatype OSSRH #465
configure coverage — e3a1106b Deployed Dec 10, 2025 by wirew0rm via Test JDK 21, ubuntu-latest #465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up opencmw-cpp subscription topic #-termination change

2 participants