Aurélien Pupier created CAMEL-25776:
---------------------------------------
Summary:
CatalogSamplesTest.callingAServiceIsTheHttpComponentNotEnrich is broken on main
branch
Key: CAMEL-25776
URL: https://issues.apache.org/jira/browse/CAMEL-25776
Project: Camel
Issue Type: Test
Components: camel-jbang
Affects Versions: 4.24.0
Reporter: Aurélien Pupier
{noformat}
Expecting actual:
"- route:
from:
uri: direct:checkStock
steps:
- split:
expression:
simple:
expression: "${body[lines]}"
steps:
- toD:
uri: "http://localhost:8080/stock/${body[sku]}"
parameters:
httpMethod: GET
- log:
message: "Stock answer: ${body}"
"
to contain:
"uri: http"
{noformat}
list of changes on build where it broke
https://ci-builds.apache.org/job/Camel/job/Camel%20Core%20(Build%20and%20test)/job/main/2290/changes
:
{noformat}
CAMEL-25745: camel-http - make it stand out that a message with a body is
sent as a POST unless httpMethod is set (#28041) (details)
CAMEL-25746: camel-bean - the error for a key read from a stream, JSON text
or a List says what to do (#28042) (details)
CAMEL-25744: camel-jbang - the AI validator reports a comparison of
CamelTimerCounter that can never be true, as the counter starts at 1 (#28040)
(details)
CAMEL-25721: camel-xml-io, camel-yaml-io, camel-java-io - route dumps keep
options set to their default value (#28029) (details)
CAMEL-25728: camel-file - keep a done file with a fixed name for the files
a poll left (#28035) (details)
CAMEL-25729: camel-aws-secrets-manager - read every CloudTrail event since
the last check in the refresh task (#28036) (details)
CAMEL-25706, CAMEL-25707, CAMEL-25708: upgrade guide notes for the 4.22.3
and 4.18.6 backports (#28052) (details)
CAMEL-25749: a read on a body that is still the payload, or an iterator,
says what the body is and what to write (#28066) (details)
Commit a8a196b8a78b3e925a4c0907100fb3ddf481ffdf by github
CAMEL-25745: camel-http - make it stand out that a message with a body is sent
as a POST unless httpMethod is set (#28041)
Without the httpMethod option or the CamelHttpMethod header, the http producer
sends a message with a body as a POST.
After unmarshal, split or setBody the message has a body, so a call meant as a
GET is sent as a POST. The behaviour
stays, as changing it would break existing applications; this makes the rule
stand out.
The http page opens its Usage section with "Which HTTP method will be used":
the rule as an IMPORTANT note, the order
in which the method is chosen, and a GET and a POST example in Java, XML and
YAML. camel_catalog_doc returns the start
of a page, so the rule is in every answer about http. When the body cannot be
the request body and neither the option
nor the header set the method, the error now also says that the body made the
call a POST, and how to send a GET.
Signed-off-by: Claus Ibsen <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
The file was modified components/camel-http/src/main/docs/http-component.adoc
(diff)
The file was modified
components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
(diff)
The file was modified
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/http-component.adoc
(diff)
The file was modified
components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerMapBodyTest.java
(diff)
Commit 1239c76ac3c17dbc468e107918c2e4adba7f8509 by github
CAMEL-25746: camel-bean - the error for a key read from a stream, JSON text or
a List says what to do (#28042)
"Key: x not found in bean", which Simple raises for ${body[x]} and
${variable.v[x]}, named the problem but not the
fix. It now adds a hint for a value that has no keys: the message body as a
stream or bytes (unmarshal it first; a
variable keeps the value it had when it was set), JSON text (unmarshal it
first), and a List, an array or another
Collection (pick an element first, such as [0][qty], or split it). Other text
keeps the message as it was.
The hint for a Map or List as the platform-http response body, the first part
of this change, is covered on main by
CAMEL-25751 and CAMEL-25749.
Signed-off-by: Claus Ibsen <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
The file was modified
components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java
(diff)
The file was modified
core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
(diff)
Commit b70ebb98ef4e271c9c249024525c4984b49e3039 by github
CAMEL-25744: camel-jbang - the AI validator reports a comparison of
CamelTimerCounter that can never be true, as the counter starts at 1 (#28040)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The file was modified
dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidatorEndpointTest.java
(diff)
The file was modified
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/HeaderChecks.java
(diff)
Commit 37acd0d360dc560b50469329f3db70390e529779 by github
CAMEL-25721: camel-xml-io, camel-yaml-io, camel-java-io - route dumps keep
options set to their default value (#28029)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The file was modified
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc (diff)
The file was added
dsl/camel-xml-io-dsl/src/test/java/org/apache/camel/dsl/xml/io/XmlDumpExplicitDefaultValuesTest.java
The file was modified
core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java
(diff)
The file was modified
core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java
(diff)
The file was modified
core/camel-java-io/src/test/java/org/apache/camel/java/LwModelToJavaDumperTest.java
(diff)
The file was modified core/camel-java-io/pom.xml (diff)
The file was modified
tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ModelWriterGeneratorMojo.java
(diff)
The file was modified
core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
(diff)
The file was added
core/camel-java-io/src/test/java/org/apache/camel/java/JavaDumpExplicitDefaultValuesTest.java
The file was added
dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/java/org/apache/camel/dsl/yaml/YamlDumpExplicitDefaultValuesTest.java
Commit 0d9b605765ff9f302648c8a07e0cd62afe38e92f by github
CAMEL-25728: camel-file - keep a done file with a fixed name for the files a
poll left (#28035)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The file was modified
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/file-component.adoc
(diff)
The file was modified
components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
(diff)
The file was added
core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDoneFileNameFilesLeftTest.java
The file was modified
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc (diff)
The file was modified
components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
(diff)
The file was added
components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileKeptDoneFiles.java
The file was modified components/camel-file/src/main/docs/file-component.adoc
(diff)
Commit d5f34a8bd8ac7cc43c3333bb251c7511e4e60af6 by github
CAMEL-25729: camel-aws-secrets-manager - read every CloudTrail event since the
last check in the refresh task (#28036)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The file was modified
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc (diff)
The file was added
components/camel-aws/camel-aws-secrets-manager/src/test/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTaskLookupTest.java
The file was modified
components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTask.java
(diff)
Commit 2439203e3a917e65ed3ebd37af7c305baddf08f7 by github
CAMEL-25706, CAMEL-25707, CAMEL-25708: upgrade guide notes for the 4.22.3 and
4.18.6 backports (#28052)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The file was modified
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc (diff)
The file was modified
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc (diff)
Commit 58966e93ab23949f5c72f0aedaa7c0dce4c3a57e by github
CAMEL-25749: a read on a body that is still the payload, or an iterator, says
what the body is and what to write (#28066)
* CAMEL-25749: camel-support - BodyFacts says what the body is, the step that
set it, and what to write; the existing body hints move onto it
BodyFacts.describe(exchange) says what the body is in plain words and,
from the message history, the step that set it ("the body is a Map
(LinkedHashMap), set by unmarshal at orders.yaml:9", or "unchanged since
from: file://orders"). BodyFacts.hint(exchange, need[, target]) says what
to write for what the failing step needed: DATA (it reads fields), BYTES
(it writes or sends the payload) or A_BODY (it needs a body at all), in the
data format the Content-Type, the file name or the text names.
The sentences that existed move onto it, so the wording is one: the http
producer (CAMEL-25309), the platform-http reply and the file write
(CAMEL-25751), Groovy on text (CAMEL-25330), unmarshal on a null body
(CAMEL-25285), jsonpath and jq on a null body (CAMEL-24838), and a missing
key of the body Map (CAMEL-25322). The three copies of the Content-Type to
data format mapping are gone.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
* CAMEL-25749: a read on a body that is still the payload, or an iterator, says
what the body is and what to write
The failures that had no sentence get the BodyFacts one: simple and bean
OGNL on the message body - a method or property ${body.qty}, ${body.size()},
or a key ${body[status]} - and Groovy body.sku on the body itself, when the
body is the payload as text, bytes, a stream or the file as read, or an
iterator. So ${body.qty} on the cached stream of an HTTP request says to
unmarshal it in the data format of its Content-Type, ${body[status]} on the
file consumer's body says the same for the file name, and ${body.size()} on
sql's StreamList says an iterator has no size. A name an object does not
have still reports only the wrong name.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---------
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
The file was modified
components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyExpression.java
(diff)
The file was modified
core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleSyntaxHintsTest.java
(diff)
The file was modified
components/camel-groovy/src/test/java/org/apache/camel/processor/groovy/GroovyMissingPropertyHintTest.java
(diff)
The file was modified
components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java
(diff)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)