davsclaus opened a new pull request, #30159:
URL: https://github.com/apache/camel/pull/30159
## Backport of #29844
Backport of #29844 (CAMEL-26923: camel-duckdb - copy loads one local file
unless options allow URLs or globs) onto `camel-4.22.x`.
**Original PR:** #29844 - CAMEL-26923: camel-duckdb - copy loads one local
file unless options allow URLs or globs
**Original author:** Claus Ibsen
**Target branch:** `camel-4.22.x`
By default the `copy` operation of the `duckdb` producer now loads a single
local file. A source that starts with a URL scheme needs
`allowUrlCopySource=true`, a source with glob pattern characters (`*`, `?`, `[`
or `{`) needs `allowGlobCopySource=true`, and the new `copyBaseDirectory`
option keeps a local source inside a directory (after resolving symbolic links).
### Adapted, not a straight cherry-pick
The cherry-pick of the squash commit had conflicts, because `camel-4.22.x`
does not have some later changes to camel-duckdb and camel-util. The
adaptations:
- `DuckDbEndpoint`: only the three new options (`allowUrlCopySource`,
`allowGlobCopySource`, `copyBaseDirectory`) are added; the
`allowDatabasePathFromHeader` option that sits next to them on `main` does not
exist on this line and is not added.
- `DuckDbProducer`: the new source check is the same as on `main`; on this
line the message body of `copy` is a `File` or a `String` only (no `Path` or
bytes), as before.
- `DuckDbProducerCopySourceTest`: the assertion that sends a `Path` body is
dropped, since `copy` on this line does not accept a `Path` body.
- `duckdb-component.adoc`: the new "Copy sources" section is added to the
4.22.x page, without the `Path` body wording; the headers section that `main`
has is not part of this change.
- `SecurityUtils` (camel-util): the generated options map gets the
`allowurlcopysource` entry; this line has no option owners map, so that part of
the change does not apply.
- `allowGlobCopySource` description: the characters are named in words
(asterisk, question mark, square bracket or curly brace) instead of `*, ?, [ or
{`, because the description generator on this line (without CAMEL-26666) drops
`*`, `?` and `[` from option descriptions.
- Generated files (component JSON, endpoint configurer and URI factory,
endpoint DSL builder, catalog JSON and doc copy, `SecurityUtils` map) are
regenerated by the build of this branch, not copied from `main`.
- The upgrade guide note is left out: the notes for every release line are
kept on `main`.
_Claude Code on behalf of davsclaus_
🤖 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]