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

parse_etld function has incorrect check for quantity of options #21868

Closed
johnhtodd opened this issue Nov 22, 2024 · 2 comments
Closed

parse_etld function has incorrect check for quantity of options #21868

johnhtodd opened this issue Nov 22, 2024 · 2 comments
Labels
meta: awaiting author Pull requests that are awaiting their author. type: bug A code related bug.

Comments

@johnhtodd
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

The parse_etld function indicates that it can only have two arguments, but there are more combinations possible than that. See example of the use of "plus_parts" and "psl" at the same time, and also the object being looked up.

Configuration

No response

Version

vector 0.42.0

Debug Output

No response

Example Data


x Transform "etld1_preparse":
error[E106]: wrong number of function arguments
   ┌─ :12:48
   │
12 │   .responseData.question[0].etld = parse_etld!(.responseData.question[0].domainName, plus_parts: 1, psl: "/etc/vector/public_suffix_list.dat")
   │                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   │                                                │
   │                                                too many function arguments
   │                                                this function takes a maximum of 2 arguments
   │
   = see documentation about function arguments at https://vrl.dev/expressions/#arguments
   = learn more about error code 106 at https://errors.vrl.dev/106
   = see language documentation at https://vrl.dev
   = try your code in the VRL REPL, learn more at https://vrl.dev/examples

Additional Context

No response

References

No response

@johnhtodd johnhtodd added the type: bug A code related bug. label Nov 22, 2024
@jszwedko
Copy link
Member

jszwedko commented Nov 22, 2024

I'm having trouble reproducing this @johnhtodd . Are you sure you are using Vector v0.42.0? The error makes me think you are using a version before psl was added.

@jszwedko jszwedko added the meta: awaiting author Pull requests that are awaiting their author. label Nov 22, 2024
@johnhtodd
Copy link
Author

@jszwedko Well-spotted; thanks, you are correct. I picked the one system to try "vector tap" on with that hadn't been upgraded and was still running an older version. This works correctly; ticket can be closed out. Sorry for the false alarm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: awaiting author Pull requests that are awaiting their author. type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants