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

remote: credentials: raise error when credentials don't exist #26

Closed
boscacci opened this issue Sep 26, 2022 · 0 comments
Closed

remote: credentials: raise error when credentials don't exist #26

boscacci opened this issue Sep 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@boscacci
Copy link

Bug Report

push: fails ambiguously when your credentialpath is incorrectly set

Description

I spent a long time spinning my wheels trying to figure out why I couldn't push to remote storage. The clearest error messaging I could get was like this, from verbose output:

File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

and

ERROR: unexpected error - Connect timeout on endpoint URL: "http://169.254.169.254/latest/api/token"

Ultimately, I figured out that this was happening just because I had the credentialpath incorrectly set in my .dvc/config file. I wish DVC would have told me that the path listed there did not exist!

Reproduce

  1. Configure a DVC repo with remote storage (e.g. S3) credentialed via .dvc/config
  2. Within .dvc/config purposely set credentialpath = {some_filepath_that_does_not_exist}
  3. Try running dvc push. This should result in the same Connect timeout on endpoint URL error I got

Expected

Un-helpful error output:

ERROR: unexpected error - Connect timeout on endpoint URL: "http://169.254.169.254/latest/api/token"

Environment information

DVC version: 2.27.2 (brew)

Platform: Python 3.10.6 on macOS-12.6-arm64-arm-64bit
Subprojects:
dvc_data = 0.10.0
dvc_objects = 0.4.0
dvc_render = 0.0.11
dvc_task = 0.1.2
dvclive = 0.10.0
scmrepo = 0.1.1
Supports:
azure (adlfs = 2022.9.1, knack = 0.10.0, azure-identity = 1.11.0),
gdrive (pydrive2 = 1.14.0),
gs (gcsfs = 2022.8.2),
http (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
https (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
oss (ossfs = 2021.8.0),
s3 (s3fs = 2022.8.2, boto3 = 1.24.59),
ssh (sshfs = 2022.6.0),
webdav (webdav4 = 0.9.7),
webdavs (webdav4 = 0.9.7),
webhdfs (fsspec = 2022.8.2)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git

Additional Information (if any):

@pared pared changed the title Ambiguous error when credentialpath is wrong remote: credentials: raise error when credentials don't exist Sep 26, 2022
@efiop efiop transferred this issue from iterative/dvc Jan 1, 2023
@omesser omesser added the bug Something isn't working label Jan 4, 2023
@shcheklein shcheklein closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants