feat(azure_blob): make storage API version configurable - #25952
Conversation
|
Thank you for your contribution! Before we can merge this PR, please sign our Contributor License Agreement. To sign, copy and post the phrase below as a new comment on this PR.
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d0183f593
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| /// services that do not support the SDK's default version. The configured version must support | ||
| /// every operation and option used by this sink. | ||
| #[configurable(metadata(docs::examples = "2021-08-06"))] | ||
| pub api_version: Option<String>, |
There was a problem hiding this comment.
Regenerate the Azure Blob component reference
Add the generated documentation entry for api_version to website/cue/reference/components/sinks/generated/azure_blob.cue; without it, the public Azure Blob configuration reference omits this new user-facing option and make check-generated-docs will report the generated docs as stale.
AGENTS.md reference: AGENTS.md:L206-L212
Useful? React with 👍 / 👎.
| NaiveDate::parse_from_str(api_version, "%Y-%m-%d").map_err(|_| { | ||
| format!("Invalid Azure Blob Storage API version `{api_version}`; expected YYYY-MM-DD") | ||
| })?; | ||
| options.version = api_version.to_owned(); |
There was a problem hiding this comment.
Enforce the exact API-version wire format
Reject non-canonical inputs such as 2021-8-6: Chrono's numeric date directives accept unpadded components, but the original string is then copied unchanged into x-ms-version. In that case the sink builds successfully and only fails later when Azure rejects the unsupported header during the healthcheck or uploads, despite the validation error promising an exact YYYY-MM-DD format.
Useful? React with 👍 / 👎.
Summary
Vector configuration
How did you test this PR?
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.