davsclaus opened a new pull request, #28414:
URL: https://github.com/apache/camel/pull/28414
_Claude Code on behalf of davsclaus_
This group adds the catalog body types (CAMEL-24961) for ten ops components:
docker, git, jmx, shell, lpr, zookeeper, zookeeper-master, master, metrics and
opentelemetry-metrics. Each change is an `@BodyTypes` annotation on the
Endpoint, plus the JSON it generates and the catalog copy. No doc page changes.
**What the catalog says now**
| Component | Consumer | Reply of the consumer | Producer input | Producer
output |
|---|---|---|---|---|
| docker | an `Event` (events) or `Statistics` (stats) | | `any`; a stream,
bytes, text or a file for imagecreate; a stream or a file for imagebuild | by
operation (all 35): the docker-java result, a List, the commit id as text, a
stream for containercopyfile, the callback object for the streaming operations,
unchanged for the void commands |
| git | the commit message, or the ref name of a branch or tag, as text | |
`any`: the inputs are options and headers | by operation (all 24): `Status`, a
`RevWalk` iterator for log, Lists, the JGit results, `Properties` for gc,
unchanged for the writes |
| jmx | the notification as XML text; a `javax.management.Notification` with
format=raw | | | |
| shell | each line typed at the prompt, as a String | printed as text; no
body prints nothing | | |
| lpr | | | the document as text, bytes, a stream or a file | unchanged |
| zookeeper | the data of the node as `byte[]`; a List of the child names
with listChildren | | the data, converted to `byte[]` | unchanged for InOnly;
with InOut the bytes written, the path created, or true for DELETE |
| master, zookeeper-master | `unknown`: the body of the delegate consumer,
which runs only on the leader | | | |
| metrics | | | `any`: the values come from the options or the CamelMetrics
headers | unchanged; the CamelMetrics headers are removed |
| opentelemetry-metrics | | | `any`, unless an option such as increment is a
simple expression that reads it | unchanged |
**Checked at runtime.** Throwaway tests, not part of the PR, sent text,
bytes, a stream, a file, a Map, a POJO, a number and no body. The setups:
- **docker:** the local Docker daemon, with read-only calls only (version,
info, ping, the lists, inspects), and a mocked DockerClient for the rest.
- **git:** temporary local repositories.
- **jmx:** the platform MBeanServer.
- **shell:** a scripted terminal.
- **lpr:** a mocked PrintService. No real printer was used.
- **zookeeper:** the ZooKeeper container of test-infra.
- **master:** the file lock cluster service; zookeeper-master ran its
integration test.
- **metrics:** in-process registries.
Not run:
- docker auth, search, pull and push, the operations that write, and both
consumers;
- git clone, init, the branch and tag deletes, and remove.
**Choices**
- shell is not a command runner. It is a consumer-only interactive prompt,
and it is annotated as one.
- master and zookeeper-master are `unknown`, as camel-webhook is: they wrap
another endpoint.
- For docker and git the default output is the union of the operations, as
the operation can come from a header or has no default.
**Bugs found, not fixed here.** The JIRAs, one per component, will follow.
- **docker:**
- imagebuild with a text or bytes body logs "Unable to location source
Image" and succeeds with the body unchanged, as the DockerException is only
logged.
- imagebuild with a stream overwrites the body with the image id of each
item, so a tagged build ends with a null body.
- The streaming operations (containerlog, containerattach, execstart) give
the callback object, and log the output only at TRACE, so the output is lost.
- The default Netty exec factory fails on macOS over the unix socket
(UnsatisfiedLinkError).
- Not verified: the events consumer passes `since` in milliseconds, where
the API wants seconds.
- **git:**
- checkout always creates the branch, so checking out an existing branch
fails with RefAlreadyExistsException.
- The CamelGitCommitId header of the commit consumer is the RevCommit
object, not the sha, so it fails as the input of cherryPick.
- commit and commitAll keep the old body, so the new commit is not
available to the route.
- **zookeeper:**
- A Map, a POJO, a number or no body overwrites the node with null data,
with no error.
- InOnly writes are fire-and-forget: their failures are only logged.
- Without repeat=true, a change of the data gives no message.
- From the code: an InOut DELETE with create=true creates a missing node.
- **lpr:** a Map, a POJO, a number or no body gives a print job with no
data, with no error.
- **opentelemetry-metrics:**
- With `increment=${body}`, a Map, a List, a POJO or no body adds 1, with
no error.
- The CamelMetricsCounterIncrement and CamelMetricsCounterDecrement
headers are documented as Double, but read as Long.
**Local checks**
- The changed modules build, with no change to the generated files after the
build.
- The catalog copies equal their modules.
- camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
- The Endpoint and Component DSLs regenerate with no change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]