• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OSGeo / gdal / 20192861895

13 Dec 2025 01:39PM UTC coverage: 71.406% (-0.003%) from 71.409%
20192861895

push

github

web-flow
/vsigs/: Add Google Cloud Run environment detection for GCE authentication (#13544)

When running GDAL in Google Cloud Run, the /vsigs/ virtual file system fails to automatically detect that it's running in a Google Cloud environment. This causes GDAL to skip the GCE metadata service for service account authentication, resulting in authentication failures when accessing Google Cloud Storage.

The issue occurs because Cloud Run containers don't have the DMI files (/sys/class/dmi/id/product_name) that GDAL checks to detect GCE instances on Linux. Users are forced to manually set CPL_MACHINE_IS_GCE=YES as a workaround in their Cloud Run deployments (e.g., Titiler).
Solution

Add detection for Google Cloud Run environments by checking for Cloud Run-specific environment variables:

    CLOUD_RUN_TIMEOUT_SECONDS (Cloud Run services)
    CLOUD_RUN_JOB (Cloud Run jobs)
    CLOUD_RUN_WORKER_POOL (Cloud Run worker pools)

8 of 8 new or added lines in 1 file covered. (100.0%)

105 existing lines in 38 files now uncovered.

593653 of 831377 relevant lines covered (71.41%)

295314.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.88
/gcore/overview.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc