-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dvc status --json can output non-json #10242
Comments
I think |
I saw that in the documentation but it seemed like that would result in no output at all
|
You are right, @gregstarr, it outputs nothing today. I mean that we should change the behavior to work this way, since there's no reason to do |
Personally, I think just --json should basically imply "-q --json" because I can't think of any use case for using --json but wanting extra output |
Discussed with the team. There are two issues here:
@gregstarr How are you using the command? |
I have been using it like this:
I am using it to check the status of my pipelines and pass the json data to a minimal flask server for viewing. Basically came as a result of this discussion post: https://discuss.dvc.org/t/ignore-files-in-stage-external-dependency-output/1889/2 I have a periodic task which clears out all the DS_Store files from my remote and checks the status of my pipelines. |
@gregstarr @skshetry Do you want to keep it open as a reminder to stream logs to stderr here? |
Thanks for looking into this! |
I was looking at this to contribute the fix. But the fix has already been merged. Request the maintainers to kindly close the issue. |
@anunayasri I think that part is left here |
Bug Report
Description
When there are large files to hash which are not cached,
dvc status --json
will still print out the message, which makes the output not valid json. I believe the use case ofdvc status --json
is to be able to pipe the output to a file and easily read it with another program, so extra messages make this inconvenient.I accidentally erased the output I had but I think this is the message that is printed out: https://github.com/iterative/dvc-data/blob/300a3e072e5baba50f7ac5f91240891c0e30d030/src/dvc_data/hashfile/hash.py#L174
Reproduce
dvc status --json
for the first timeExpected
dvc status --json
only outputs valid jsonEnvironment information
Output of
dvc doctor
:The text was updated successfully, but these errors were encountered: