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 creating a directory the default when asking for a collection with more than 1 element. #843

Closed
rklaehn opened this issue Mar 14, 2023 · 8 comments · Fixed by #1786
Closed
Assignees
Labels
_c-iroh-legacy Formerly big iroh node with all protocols discussion
Milestone

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Mar 14, 2023

If you currently get a directory, you will just get the concatenation of all files.

This is not what you want if you want to replicate a large directory.

Found this confusing when trying out sharing a large data set.

@rklaehn rklaehn changed the title Have a way to get a directory Make creating a directory the default when asking for a collection with more than 1 element. Mar 14, 2023
@ramfox
Copy link
Contributor

ramfox commented Mar 15, 2023

The default on the cli is that if you don't specify an out, the contents of the collection get pushed to stdout, if you specify an out path, the contents get saved in the out directory.

Is this what you are running into?

@rklaehn
Copy link
Contributor Author

rklaehn commented Mar 17, 2023

Yes. Nothing major, but I was playing around with ML datasets, and having a 300GB dataset being dumped on the CLI is definitely not what I was after.

The terminal was so irritated by the amount of data and all the weird chars that I had to close the tab. Not a good user experience.

@dignifiedquire
Copy link
Contributor

I wonder if we should dumping to stdout not a default, but rather something specific with an option like --to-stdout or sth like this.

@github-project-automation github-project-automation bot moved this to 📋 Backlog - unassigned issues in iroh Jul 6, 2023
@dignifiedquire
Copy link
Contributor

I have run into this a couple of times, I don't think the current behaviour is that great.

@rklaehn @Arqu @b5 would love some thoughts on what a good UX should look like here

@dignifiedquire dignifiedquire added _c-iroh-legacy Formerly big iroh node with all protocols discussion labels Jul 6, 2023
@Arqu
Copy link
Collaborator

Arqu commented Jul 6, 2023

My 2c:
Personally I think it should just have a sane default name and do ./default if nothing else is specified. This usually leads to dumping whatever you're pulling into ./some_weird_hash which is far from ideal (maybe named collections later can rectify this). And if you want to explicitly pipe to stdout, then you can flag for it. This will mostly not be a CLI based consumption tool afaik.

@rklaehn
Copy link
Contributor Author

rklaehn commented Aug 3, 2023

Can we just say that you have to provide an out arg when downloading a collection? You can still have the simple curl use case when downloading individual files, which is supported now.

So you can still do workflows involving individual files like the infamous curl | sudo sh stuff.

But I find that wanting all items of a collection concatenated is rare even for smaller data sets.

@dignifiedquire
Copy link
Contributor

I think sth like --stdout or --out <foo> would work well (where you always have to choose one) instead of doing different things depending on the content

@rklaehn
Copy link
Contributor Author

rklaehn commented Aug 10, 2023

So the default behaviour of share when not providing an out dir is to just download it to the local store. Which I think is fine, because it does not try to output a giant amount of data to the console.

Maybe just discourage get in favour of share?

@dignifiedquire dignifiedquire moved this from 📋 Backlog to 🏗 In progress in iroh Nov 9, 2023
@dignifiedquire dignifiedquire self-assigned this Nov 9, 2023
@dignifiedquire dignifiedquire added this to the v0.11.0 milestone Nov 9, 2023
dignifiedquire added a commit that referenced this issue Nov 9, 2023
When using `iroh get` always require `--out` to specify the place to store the output.

```sh
# stdout
> iroh get --ticket <TICKET> --out STDOUT
# directory
> iroh get --ticket <TICKET> --out ./my-dir
```

Closes #843
@dignifiedquire dignifiedquire moved this from 🏗 In progress to 👀 In review in iroh Nov 9, 2023
github-merge-queue bot pushed a commit that referenced this issue Nov 9, 2023
When using `iroh get` always require `--out` to specify the place to
store the output.

```sh
# stdout
> iroh get --ticket <TICKET> --out STDOUT
# directory
> iroh get --ticket <TICKET> --out ./my-dir
```

Closes #843
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in iroh Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_c-iroh-legacy Formerly big iroh node with all protocols discussion
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants