Skip to content

docs: Std. SSH URLs and rel. notes about SFTP#1649

Merged
jorgeorpinel merged 18 commits into
masterfrom
remote/abspath
Aug 20, 2020
Merged

docs: Std. SSH URLs and rel. notes about SFTP#1649
jorgeorpinel merged 18 commits into
masterfrom
remote/abspath

Conversation

@jorgeorpinel
Copy link
Copy Markdown
Contributor

per treeverse/dvc#4167 (comment)

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.

🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.

Please choose to allow us to edit your branch when creating the PR.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@shcheklein shcheklein temporarily deployed to dvc-landing-remote-absp-0hep2s August 1, 2020 16:48 Inactive
@jorgeorpinel jorgeorpinel requested a review from efiop August 1, 2020 16:48
Comment thread content/docs/command-reference/remote/modify.md Outdated
Comment thread content/docs/user-guide/external-dependencies.md Outdated
Comment thread content/docs/user-guide/managing-external-data.md Outdated
Comment thread content/docs/user-guide/external-dependencies.md Outdated
Comment thread content/docs/user-guide/managing-external-data.md Outdated
@jorgeorpinel jorgeorpinel temporarily deployed to dvc-landing-remote-absp-0hep2s August 1, 2020 18:20 Inactive
@jorgeorpinel jorgeorpinel changed the title docs: recommend absolute paths for SSH and HDFS remote connections docs: absolute paths for SSH and HDFS remote connections Aug 11, 2020
Comment thread content/docs/user-guide/external-dependencies.md Outdated
@jorgeorpinel

This comment has been minimized.

@jorgeorpinel jorgeorpinel changed the title docs: absolute paths for SSH and HDFS remote connections docs: absolute paths for SSH and HDFS remote URLs Aug 11, 2020
@jorgeorpinel
Copy link
Copy Markdown
Contributor Author

jorgeorpinel commented Aug 11, 2020

Just one discussion pending here @shcheklein but we should probably try to merge #1649 first? Please check it when you have a change — I think it's ready.

Comment thread content/docs/command-reference/remote/add.md Outdated
Comment thread content/docs/user-guide/external-dependencies.md Outdated
Comment thread content/docs/user-guide/managing-external-data.md Outdated
Comment thread content/docs/command-reference/get-url.md Outdated
Comment thread content/docs/user-guide/external-dependencies.md Outdated
@jorgeorpinel jorgeorpinel changed the title docs: absolute paths for SSH and HDFS remote URLs docs: absolute paths for SSH URLs Aug 15, 2020
@jorgeorpinel jorgeorpinel changed the title docs: absolute paths for SSH URLs docs: SSH URLs relative to SFTP root Aug 15, 2020
Comment thread content/docs/command-reference/import-url.md Outdated
Comment thread content/docs/command-reference/remote/add.md Outdated
$ dvc run -n download_file
-d ssh://user@example.com/path/from/sftp/root/to/data \
-o data \
scp user@example.com:/path/from/sftp/root/to/data data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure that scp is using sftp and it's the same convention ... how often sftp root is not /?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about scp not being SFTP! Missed that 🤦 I'm going to remove these stfp mentions from the paths... ⌛

how often sftp root is not /?

Not sure but it's a note we already have in remote add so it has been deemed important before. Plus per this treeverse/dvc#4167 (comment) I thought we definitely wanted to mention this clearly in all the docs where it may cause issues.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so... I'm removing all the /from/sftp/... paths again. Having the note underneath should be enough I think.

In fact, should we just remove these SFTP notes completely? And or consider renaming ssh:// to sftp:// if that's the actual protocol we're using... Then users could be expected to know what kinds of URLs and paths are supported. Cc @efiop

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, should we just remove these SFTP notes completely?

Could just create 1 note in remote modify/add help. The rest could be removed, yes.

nd or consider renaming ssh:// to sftp:// if that's the actual protocol we're using...

Not really worth renaming. Plus, we do use ssh too, but only for external data management, so it is not a direct swap. Would just keep as is for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the notes everywhere just in case. It's a shorter note version now, anyway.

Agreed about not renaming. Thanks @efiop

@jorgeorpinel jorgeorpinel changed the title docs: SSH URLs relative to SFTP root docs: Std. SSH URLs and rel. notes about SFTP Aug 18, 2020
Comment on lines -315 to -319
> (On Linux, see the `ChrootDirectory` setting in `/etc/ssh/sshd_config`.) In
> these cases, the path component in the SSH URL (e.g. `/path/to/dir` above)
> should be specified relative to the SFTP root instead. For example, on some
> Sinology NAS drives, the SFTP root might be in directory `/volume1`, in which
> case you should use path `/path/to/dir` instead of `/volume1/path/to/dir`.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to remove these details. They seem more like tips unrelated to DVC. Users can research SFTP details on other sites easily, I think. Left a quick note: "Note that the server's SFTP root might differ from its physical root (/)." that should be enough of a tip for the few users running into that issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ounds good! and we can elaborate when we have a separate page per remote I guess

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're planning to do separate pages per remote? I don't recall that decision. It sounds like a good plan except that the remote types are already burried in docs->cmd ref->remote->add/modify->expandable sections so not sure adding yet another level to that tree is a good idea.

Maybe the remote types should all be in the remote ref. index? And the remote concept explanation in Basic Concepts.

Comment thread content/docs/user-guide/external-dependencies.md
Comment thread content/docs/user-guide/external-dependencies.md
| `s3` | Amazon S3 | `s3://mybucket/data` |
| `gs` | Google Storage | `gs://mybucket/data` |
| `ssh` | SSH server | `ssh://user@example.com:/path/to/data` |
| `ssh` | SSH server | `ssh://user@example.com/path/to/data` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the trailing space?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's all formatted by Prettier this way.

| `azure` | Microsoft Azure Blob Storage | `azure://my-container-name/path/to/data` |
| `gs` | Google Cloud Storage | `gs://mybucket/data` |
| `ssh` | SSH server | `ssh://user@example.com:/path/to/data` |
| `ssh` | SSH server | `ssh://user@example.com/path/to/data` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-formatted. To align columns I guess. Looks "prettier" tehehe

@shcheklein
Copy link
Copy Markdown
Contributor

approved! just a few minor comments ...

@jorgeorpinel jorgeorpinel merged commit 229826e into master Aug 20, 2020
@jorgeorpinel jorgeorpinel deleted the remote/abspath branch August 20, 2020 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants