Open nvjrepo opened 5 months ago
@nvjrepo I think that you have not set the GOOGLE_APPLICATION_CREDENTIALS
environment variable, which is what the google-cloud-storage library is looking for to authenticate with GCS
@JasperHG90 Thank you for replying, i did assign an SA path for var GOOGLE_APPLICATION_CREDENTIALS, but it still return the same error.
Things work well with BigQueryPandasIOManager
, just fail with GCS
Ugh, my bad. That error has nothing to do with your credentials.
Just an update, looking at the source i noticed the gcs= parameter, and i added the gcs resource in there gcs=GCSResource(project=EnvVar(DAGSTER_GCP_PROJECT_ID_KEY)), - this worked. this does not match the documentation: https://docs.dagster.io/_apidocs/libraries/dagster-gcp#gcs-i-o-manager
(I assume since it's supposed to automatically depend on the gcs resource?)
@jamiedemaria could you take a look at this and see if perhaps the resource dependency is not working as expected?
I think the docs might just be wrong here. For the newer resources, you need to pass resource dependencies as parameters to the top level resource. So like this:
defs = Definitions(
assets=[asset1, asset2],
resources={
"io_manager": GCSPickleIOManager(
gcs_bucket="pacc-dagster-prod",
gcs_prefix="test",
gcs=GCSResource(project="abc")
),
}
)
I can fix the docs
Edit - PR to do so https://github.com/dagster-io/dagster/pull/22470
Dagster version
1.7.7
What's the issue?
python verion: 3.11.4 I got below error when setting up GCS as I/O manager:
Below is my script:
Please help if you know where is the issue. Thank you
What did you expect to happen?
No response
How to reproduce?
No response
Deployment type
None
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.