Skip to content

list command no longer clean #3007

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

Closed
1 task done
Hoverbear opened this issue Jul 9, 2020 · 6 comments · Fixed by #3046 or #3099
Closed
1 task done

list command no longer clean #3007

Hoverbear opened this issue Jul 9, 2020 · 6 comments · Fixed by #3046 or #3099
Assignees
Labels
domain: cli Anything related to Vector's CLI type: bug A code related bug.

Comments

@Hoverbear
Copy link
Contributor

Hoverbear commented Jul 9, 2020

When starting Vector to use the generate command, users may be surprised to see their stdout is polluted and not valid TOML.

hoverbear@OBSIDIAN:/git/timberio/vector$ cargo run -- generate stdin//console
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
     Running `target/debug/vector generate stdin//console`
Jul 09 16:06:21.268  INFO vector: Log level "info" is enabled.
data_dir = "/var/lib/vector/"

[sources.source0]
max_length = 102400
type = "stdin"

[sinks.sink0]
healthcheck = true
inputs = ["source0"]
type = "console"

[sinks.sink0.buffer]
type = "memory"
max_events = 500
when_full = "block"


hoverbear@OBSIDIAN:/git/timberio/vector$ cargo run -- generate stdin//console > test.toml
    Finished dev [unoptimized + debuginfo] target(s) in 0.26s
     Running `target/debug/vector generate stdin//console`


hoverbear@OBSIDIAN:/git/timberio/vector$ cat test.toml 
Jul 09 16:07:31.098  INFO vector: Log level "info" is enabled.
data_dir = "/var/lib/vector/"

[sources.source0]
max_length = 102400
type = "stdin"

[sinks.sink0]
healthcheck = true
inputs = ["source0"]
type = "console"

[sinks.sink0.buffer]
type = "memory"
max_events = 500
when_full = "block"

This issue requests that vector generate stdin//console > test.toml works again as expected.


Todo:

  • Add test
@Hoverbear Hoverbear added the type: bug A code related bug. label Jul 9, 2020
@Hoverbear
Copy link
Contributor Author

Probably should be part of #2961

@binarylogic binarylogic added the domain: cli Anything related to Vector's CLI label Jul 10, 2020
@fanatid
Copy link
Contributor

fanatid commented Jul 10, 2020

For history, this was changed in https://github.com/timberio/vector/pull/2964/files#diff-639fbc4ef05b315af92b4d836c31b023R73

@binarylogic
Copy link
Contributor

I’m also curious if we could test for this? Assuming it low-effort and easy. I do not think it’s worth an elaborate testing strategy.

@ktff
Copy link
Contributor

ktff commented Jul 12, 2020

The test alone would be straightforward, but an additional check , ex. make test-command, would need to be added. In it, we could add these kind of command level tests.

@binarylogic
Copy link
Contributor

Sounds good to me. If it’s simple I think it’s worth it.

@ktff ktff reopened this Jul 14, 2020
@ktff
Copy link
Contributor

ktff commented Jul 14, 2020

As @fanatid noted, it would be nice for list command too also be clean.

@Hoverbear Hoverbear reopened this Jul 15, 2020
@Hoverbear Hoverbear changed the title Generate command no longer clean listcommand no longer clean Jul 15, 2020
@Hoverbear Hoverbear changed the title listcommand no longer clean list command no longer clean Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: cli Anything related to Vector's CLI type: bug A code related bug.
Projects
None yet
4 participants