Skip to content

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

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

Merged
merged 18 commits into from
Aug 20, 2020
Merged

Conversation

jorgeorpinel
Copy link
Contributor

per iterative/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
@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
@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
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.

@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
$ dvc run -n download_file
-d ssh://[email protected]/path/from/sftp/root/to/data \
-o data \
scp [email protected]:/path/from/sftp/root/to/data data
Copy link
Member

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
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 iterative/dvc#4167 (comment) I thought we definitely wanted to mention this clearly in all the docs where it may cause issues.

Copy link
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
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
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
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
Member

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
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.

@@ -39,7 +39,7 @@ DVC supports several types of (local or) remote locations (protocols):
| `local` | Local path | `/path/to/local/data` |
| `s3` | Amazon S3 | `s3://mybucket/data` |
| `gs` | Google Storage | `gs://mybucket/data` |
| `ssh` | SSH server | `ssh://[email protected]:/path/to/data` |
| `ssh` | SSH server | `ssh://[email protected]/path/to/data` |
Copy link
Member

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
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.

@@ -62,7 +62,7 @@ DVC supports several types of (local or) remote locations (protocols):
| `s3` | Amazon S3 | `s3://mybucket/data` |
| `azure` | Microsoft Azure Blob Storage | `azure://my-container-name/path/to/data` |
| `gs` | Google Cloud Storage | `gs://mybucket/data` |
| `ssh` | SSH server | `ssh://[email protected]:/path/to/data` |
| `ssh` | SSH server | `ssh://[email protected]/path/to/data` |
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
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
Member

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