Skip to content

Conversation

@nitaibezerra
Copy link
Contributor

Summary

  • Remove hardcoded DAGS_BUCKET environment variable from the deploy workflow
  • Add new step to query the DAGs bucket dynamically using gcloud composer environments describe
  • Update all bucket references to use the step output

Why

When Cloud Composer is recreated (for any reason), GCP generates a new bucket with a different hash (e.g., gs://us-central1-destaquesgovbr--30208ee3-bucketgs://us-central1-destaquesgovbr--a02910d4-bucket). This previously broke the deploy workflow until the hardcoded value was manually updated.

Benefits

  1. Resilience - Deploy works even after Composer recreation
  2. Infrastructure immutability - Infrastructure can be recreated without code changes
  3. Multi-environment ready - Facilitates deploy to dev/staging/prod
  4. Single source of truth - Configuration comes directly from GCP

Test plan

  • Run the workflow manually (workflow_dispatch)
  • Verify in logs that the bucket was discovered correctly
  • Confirm DAGs were deployed to the correct bucket

🤖 Generated with Claude Code

Remove hardcoded DAGS_BUCKET environment variable and instead query the
bucket name at runtime using gcloud composer environments describe.

This makes the deploy workflow resilient to Composer environment
recreation, which generates a new bucket with a different hash.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nitaibezerra nitaibezerra merged commit 64031cb into main Feb 2, 2026
1 check failed
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.

2 participants