Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make remove this abort-instruction a warning instead of an error #1143

Open
pront opened this issue Nov 26, 2024 · 1 comment
Open

Make remove this abort-instruction a warning instead of an error #1143

pront opened this issue Nov 26, 2024 · 1 comment
Labels
type: feature A value-adding code addition that introduce new functionality. vrl: compiler Changes to the compiler

Comments

@pront
Copy link
Member

pront commented Nov 26, 2024

Example:

2024-11-26T07:20:11.641948Z ERROR vector::topology::builder: Configuration error. error=Transform "filter_metrics":
error[E620]: can't abort infallible function
  ┌─ :1:1
  │
1 │ match!(to_string(.name) ?? "default", r'^(cpu.*|kong.*|mem.*)')
  │ ^^^^^- remove this abort-instruction
  │ │
  │ this function can't fail
  │
  = see documentation about error handling at https://errors.vrl.dev/#handling
  = see language documentation at https://vrl.dev
  = try your code in the VRL REPL, learn more at https://vrl.dev/examples

Relaxing the above to be a warning is a backwards compatible change which I believe will make VRL easier to use.

@pront pront added type: feature A value-adding code addition that introduce new functionality. vrl: compiler Changes to the compiler labels Nov 26, 2024
@jszwedko
Copy link
Member

jszwedko commented Dec 2, 2024

Related: vectordotdev/vector#13056

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A value-adding code addition that introduce new functionality. vrl: compiler Changes to the compiler
Projects
None yet
Development

No branches or pull requests

2 participants