You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/09/13 13:54:37 UTC
[PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
davsclaus opened a new pull request, #26364:
URL: https://github.com/apache/camel/pull/26364
`camel.main.duration=15s` was rejected as an unknown option, and it is what most people, and every model, write when they mean `durationMaxSeconds`. `DefaultConfigurationProperties` gets `duration` (and `withDuration`) taking a value with a unit, parsed with `TimeUtils`; a plain number is seconds. Regenerated main metadata (camel-main and the catalog copy).
Tests: `MainDurationAliasTest`. 5 files, 2 generated.
Found while benchmarking a local model against the Camel MCP server (CAMEL-24698); the run-by-run history stays on a local bench branch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26364:
URL: https://github.com/apache/camel/pull/26364#issuecomment-5653784517
<!-- regen-patch -->
### :warning: Generated files are out of date
The [CI build](https://github.com/apache/camel/actions/runs/34761145536) regenerated files that are not committed on this PR.
If *Allow edits from maintainers* is enabled, a maintainer bot will automatically
push a "Regen" commit to this branch shortly.
Otherwise, you can apply the patch manually — the missing changes are available
as the `regen-patch` artifact of that run:
```bash
gh pr checkout 26364 --repo apache/camel
gh run download 34761145536 --repo apache/camel -n regen-patch
git apply --index regen.patch && rm regen.patch pr-number
git commit -m "Regen" && git push
```
Alternatively, run `./etc/scripts/regen.sh` locally and commit the resulting changes.
If the patch does not apply cleanly, update the branch from the base branch first —
the patch was generated against the merge with the base branch.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26364:
URL: https://github.com/apache/camel/pull/26364#issuecomment-5653982018
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `catalog/camel-catalog`
- `core/camel-main`
> :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 64 tested, 26 compile-only — current: 63 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **90 affected modules** (current approach: 63).
<details><summary>:warning: Modules only in Scalpel (27)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
**Skip-tests mode would test 64 modules** (2 direct + 62 downstream), **skip tests for 26** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (64)</summary>
- `camel-a2a`
- `camel-as2`
- `camel-catalog`
- `camel-clickup`
- `camel-consul`
- `camel-core-all`
- `camel-csv`
- `camel-fhir`
- `camel-groovy`
- `camel-hazelcast`
- `camel-hl7`
- `camel-ibm-watsonx-ai`
- `camel-iso8583`
- `camel-java-joor-dsl`
- `camel-jbang-mcp`
- `camel-jbang-plugin-mcp`
- `camel-jbang-plugin-route-parser`
- `camel-jbang-plugin-tui`
- `camel-jbang-plugin-validate`
- `camel-jetty`
- `camel-jsonpath`
- `camel-kamelet`
- `camel-kamelet-main-support`
- `camel-knative-http`
- `camel-launcher-container`
- `camel-mail`
- `camel-mail-microsoft-oauth`
- `camel-main`
- `camel-maven-plugin`
- `camel-mcp-server`
- `camel-micrometer-prometheus`
- `camel-microprofile-health`
- `camel-netty`
- `camel-netty-http`
- `camel-oauth`
- `camel-observability-services`
- `camel-once`
- `camel-openapi-validator`
- `camel-platform-http-main`
- `camel-platform-http-vertx`
- `camel-plc4x`
- `camel-pubnub`
- `camel-quickfix`
- `camel-rest-openapi`
- `camel-restdsl-openapi-plugin`
- `camel-salesforce`
- `camel-salesforce-codegen`
- `camel-salesforce-maven-plugin`
- `camel-spring-main`
- `camel-state-store`
- `camel-syslog`
- `camel-telegram`
- `camel-test-main-junit5`
- `camel-test-main-junit6`
- `camel-vertx-websocket`
- `camel-webhook`
- `camel-whatsapp`
- `camel-xml-io-dsl`
- `camel-xml-jaxb-dsl`
- `camel-xml-jaxb-dsl-test-definition`
- `camel-xml-jaxb-dsl-test-spring`
- `camel-yaml-dsl-validator`
- `camel-yaml-dsl-validator-maven-plugin`
- `camel-zookeeper`
</details>
<details><summary>Modules with tests skipped (26)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
<details><summary>Build reactor — dependencies compiled but only changed modules were tested (2 modules, 43.3s total)</summary>
**Total reactor time:** 43.3s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: Main | 28.7s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 14.6s | SUCCESS |
**Top 20 slowest modules:**
- `Camel :: Main` (28.7s)
- `Camel :: Catalog :: Camel Catalog` (14.6s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/34762825644)
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #26364:
URL: https://github.com/apache/camel/pull/26364#discussion_r3999863491
##########
core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java:
##########
@@ -1829,6 +1852,15 @@ public T withProfile(String profile) {
* To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use
* this to run Camel for a short while.
*/
+ /**
+ * For how long to keep running before automatic terminating the JVM, as a duration with a time unit such as 15s, 2m
+ * or 1h (a plain number is seconds). An alias of durationMaxSeconds that accepts a unit.
+ */
+ public T withDuration(String duration) {
+ setDuration(duration);
+ return (T) this;
+ }
+
Review Comment:
⚠️ **Orphaned Javadoc** — `withDuration` was inserted between the existing Javadoc block for `withDurationMaxSeconds` (lines 1852-1854) and the `withDurationMaxSeconds` method itself (line 1864). As a result:
1. `withDuration` has **two** stacked Javadoc blocks — the first one (about seconds) is wrong for it
2. `withDurationMaxSeconds` lost its Javadoc entirely
Move the old Javadoc below `withDuration` to re-attach it to its method:
```suggestion
/**
* For how long to keep running before automatic terminating the JVM, as a duration with a time unit such as 15s, 2m
* or 1h (a plain number is seconds). An alias of durationMaxSeconds that accepts a unit.
*/
public T withDuration(String duration) {
setDuration(duration);
return (T) this;
}
```
(The `withDurationMaxSeconds` Javadoc that was displaced should stay above `withDurationMaxSeconds` — the context lines before this hunk already contain it, so the suggestion just removes the duplicate.)
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26364:
URL: https://github.com/apache/camel/pull/26364#issuecomment-5653708042
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24706: camel-main - camel.main.duration accepts a value with a unit (15s, 2m) as an alias of durationMaxSeconds [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #26364:
URL: https://github.com/apache/camel/pull/26364
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org