Skip to content

Commit

Permalink
Fix gcs Anonymous user issue because none token (#38102)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro authored Mar 14, 2024
1 parent 3c5bcaa commit 0e2f2bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions airflow/providers/google/cloud/fs/gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ def get_fs(conn_id: str | None, storage_options: dict[str, str] | None = None) -
return GCSFileSystem()

g = GoogleBaseHook(gcp_conn_id=conn_id)
creds = g.get_credentials()

options = {
"project": g.project_id,
"access": g.extras.get(GCS_ACCESS, "full_control"),
"token": creds.token,
"token": g._get_access_token(),
"consistency": g.extras.get(GCS_CONSISTENCY, "none"),
"cache_timeout": g.extras.get(GCS_CACHE_TIMEOUT),
"requester_pays": g.extras.get(GCS_REQUESTER_PAYS, False),
Expand Down

0 comments on commit 0e2f2bc

Please sign in to comment.
  翻译: