Skip to content

Fix GCS IO manager auth + carry stranded GeoPackage fixes to main#77

Merged
jirhiker merged 3 commits into
mainfrom
fix/gcs-io-manager-auth
Jun 25, 2026
Merged

Fix GCS IO manager auth + carry stranded GeoPackage fixes to main#77
jirhiker merged 3 commits into
mainfrom
fix/gcs-io-manager-auth

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Three fixes, all needed on main.

1. GCS IO manager auth (the current failure)

google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found.
  at dagster_gcp/gcs/io_manager.py ... gcs.get_client()

The GCSPickleIOManager (PR #76) used dagster_gcp's GCSResource, whose get_client() uses Application Default Credentials. Dagster+ serverless has no ADC. Added AuthedGCSResource — a dagster_gcp GCSResource subclass whose get_client() builds the client from GCP_SERVICE_ACCOUNT_KEY, the same secret the product-upload GCSResource already uses. Factored the client builder into a shared _storage_client().

2 + 3. GeoPackage fixes that never reached main

PR #75 merged only its first commit; these two follow-ups were left on the post-merge branch:

  • Publish featuretype explicitlyconfigure=all created the gpkg datastore but no layer. Now configure=none + explicit POST .../featuretypes.
  • Flatten to 2D — 3D points (sites with elevation) made GeoServer throw MismatchedDimensionException: "WGS 84" has 3 dimensions. force_2d() before writing the gpkg.

Verified: definitions load (38 assets), io_manager.gcs is AuthedGCSResource, flake8 clean.

🤖 Generated with Claude Code

jirhiker and others added 3 commits June 25, 2026 13:23
For GeoPackage, PUT file.gpkg?configure=all created the datastore but did
not publish a layer, leaving a store with no associated layer. Switch to
configure=none and POST the featuretype explicitly (name/nativeName =
gpkg table name, srs EPSG:4326), folding title/abstract into that call.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sites with an elevation produce 3D point geometry ([lon, lat, elev]).
GeoServer's GeoPackage reader then fails computing bounds:
  MismatchedDimensionException: Argument "WGS 84" has 3 dimensions, while 2 was expected.

Call force_2d() on the GeoDataFrame before to_file(GPKG). Elevation is
still carried as an attribute; only the geometry dimensionality changes.
The GeoJSON product on GCS is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The GCSPickleIOManager used dagster_gcp's GCSResource, whose get_client()
goes through Application Default Credentials. Dagster+ serverless has no
ADC, so asset I/O failed:
  google.auth.exceptions.DefaultCredentialsError: Your default credentials
  were not found.

Add AuthedGCSResource (dagster_gcp GCSResource subclass) that builds the
client from GCP_SERVICE_ACCOUNT_KEY, the same secret the product-upload
GCSResource already uses, and wire it into the IO manager. Factored the
client builder into _storage_client() shared by both.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Jun 25, 2026 at 07:29 PM (UTC)

@jirhiker jirhiker merged commit 98822f6 into main Jun 25, 2026
2 checks passed
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.

1 participant