Comments (3)
Environment variables take precedence over DVC and Azure file-based configs (.dvc/config
, .dvc/config.local
~/.azure/config
, etc). So, I think this behavior is correct.
In this case, I would assume the AZURE_STORAGE_ACCOUNT_KEY
doesn't have the key in the proper format (e.g. "hello" is not a correct base64 or something and that's why some error from the Azure lib is thrown). I can't find the reference to this env variable in Azure libraries docs right away, but my guess it is the same as the AZURE_ACCOUNT_KEY
(I have tested this and both variables work the same way for me).
So, in this case, if you want to have that env var you need to get the Account key
If you feel there is still a concern, please reopen and provide a bit more details:
- please add more details on why this is an issue for you (why do you need both SAS and the KEY set)
- run
dvc pull -v
and include the full stack trace - please upgrade DVC - it's quite old and outdated and might be bringing some outdated Azure libraries with it.
from dvc.
For reference, support for the AZURE_STORAGE_ACCOUNT_KEY
env var comes from the underlying library DVC uses for accessing azure blob storage (https://github.com/fsspec/adlfs). As noted by @shcheklein, it's a historical equivalent for the current Microsoft/Azure documented AZURE_ACCOUNT_KEY
The following environmental variables can also be set and picked up for authentication:
- "AZURE_STORAGE_CONNECTION_STRING"
- "AZURE_STORAGE_ACCOUNT_NAME"
- "AZURE_STORAGE_ACCOUNT_KEY"
- "AZURE_STORAGE_SAS_TOKEN"
- "AZURE_STORAGE_TENANT_ID"
- "AZURE_STORAGE_CLIENT_ID"
- "AZURE_STORAGE_CLIENT_SECRET"
from dvc.
Thanks Ivan and Peter for your explanations. This subject in not a bug indeed, and you provided very useful explanation that maybe could be included in the documentation?
For context:
- please add more details on why this is an issue for you (why do you need both SAS and the KEY set)
I need the KEY set for another Azure Storage access, that has nothing to do with DVC. (hence the "hello" value in my example, as useless for DVC as the real value I use).
- please upgrade DVC - it's quite old and outdated and might be bringing some outdated Azure libraries with it.
As said, I used version 3.39 first, and the problem was the same, I downgraded to the version my colleagues use as an attempt to solve my issue. Happy to go back to latest version now :-)
I propose to update the documentation to:
- clarify the precedence order of credentials. For now, the doc states the contrary of the real behavior (i.e. env. var first):
For custom authentication, you can set the following config params with dvc remote modify --local, use environment variables, or an Azure CLI config file (in that order).
- explicitly warn users about environment variables names that should be avoided when working with DVC, including the names
adlfs
uses.
from dvc.
Related Issues (20)
- dvc update should consider "cache: false" setting of output in imported `.dvc` HOT 4
- Ability to track Docker images in Docker Hub or AWS ECR as artifacts HOT 5
- Keep temporary clones of import source repos HOT 4
- Dvc pull Crashes on Windows HOT 1
- `dvc diff` slow when there are many unique additions and deletions
- Unable connect dvc to Google Drive. Access blocked! HOT 8
- `dvc status`: add flag to ignore files excepted from cache. HOT 2
- Add `--allow-missing` for `dvc commit` HOT 13
- dvc pull/fetch: corrupted cache with GDrive HOT 6
- dvc exp run: replacing output folder instead of writing HOT 3
- dvc stage: params section with variable HOT 3
- dvc.yaml - cmd bash variables not working inside curly brackets HOT 1
- Feature Request: `dvc status` should only show "update available" for imported files if the md5 has changed
- DVC do not cache output of pipeline properly HOT 11
- GitLab registry HTTP: Migrating from dvc 2 to dvc 3 and pushing leads to Bad Request HOT 6
- Optional vars files: dynamic DAGs HOT 2
- dvc push not updating Push % HOT 4
- dvc gc --all-commits --cloud: Inconsistency in behavior when using "config.local" file for "gc" and "push" commands.
- "dvc pull -r REMOTE_A --allow-missing" fails out with multiple remotes HOT 3
- queue start: worker doesn't process all experiments automatically
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dvc.