fix(http_client): fail on VRL compilation errors in query parameters #24223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
VRL compilation errors in
http_clientsource query parameters now cause Vector to fail at startup instead of logging a warning and continuing with invalid expressions. This prevents unexpected behavior where malformed VRL expressions would be sent as literal strings in HTTP requests.Previously, if a VRL expression had a syntax error in a query parameter, Vector would log a warning but continue running, passing the invalid VRL as a literal string. Now, Vector properly fails to start with a clear error message pointing to the compilation issue.
Vector configuration
Invalid configuration (now fails to start):
Valid configuration (works correctly):
How did you test this PR?
now(without closing parenthesis)Query::new(),compile_value(), andcompile_param()returnResulttypesVrlCompilationErrorvariant tosources::BuildErrornow()) - confirmed Vector starts and runs correctlyChange Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References