Skip to content

Fix ComposerEnvironment storageConfig.bucketRef mapping - #11001

Merged
ldanielmadariaga merged 2 commits into
GoogleCloudPlatform:masterfrom
himanigulati01:fix-composer-bucketref
Jul 15, 2026
Merged

ldanielmadariaga merged 2 commits into
GoogleCloudPlatform:masterfrom
himanigulati01:fix-composer-bucketref

Conversation

@himanigulati01

Copy link
Copy Markdown
Collaborator

Fixes b/528060386

In ComposerEnvironment direct reconciler, override autogenerated StorageConfig_ToProto and StorageConfig_FromProto mappers so that storageConfig.bucketRef maps to just the GCS bucket name without full resource path (projects/../buckets/..). This resolves API error 400 during ComposerEnvironment creation and updates.

Changes

  • Direct Controller Mappers: Override autogenerated StorageConfig mappers in pkg/controller/direct/composer/environment_mappings.go to use StorageBucketIdentity.FromExternal(...).
  • Mock Validation: Update mockgcp/mockcomposer/environment.go to validate and reject storage bucket strings containing slashes (/), matching real Google Cloud Composer frontend validation.
  • Golden Tests: Update golden traffic log for composerenvironmentwithrefs. Verified all 4 composer basic test fixtures pass cleanly via hack/compare-mock.

Comment thread pkg/controller/direct/composer/environment_mappings.go
anhdle-sso
anhdle-sso previously approved these changes Jul 6, 2026

@anhdle-sso anhdle-sso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@google-oss-prow google-oss-prow Bot added the lgtm label Jul 6, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 7, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 7, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 8, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 8, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 8, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 8, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 9, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 9, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@anhdle-sso
anhdle-sso disabled auto-merge July 13, 2026 18:44
@anhdle-sso
anhdle-sso enabled auto-merge July 13, 2026 18:44
In ComposerEnvironment direct reconciler, override autogenerated
StorageConfig_ToProto and StorageConfig_FromProto mappers so that
storageConfig.bucketRef maps to just the GCS bucket name without full
resource path ('projects/../buckets/..'). This resolves API error 400
during ComposerEnvironment creation/update (b/528060386).
auto-merge was automatically disabled July 15, 2026 04:41

Head branch was pushed to by a user without write access

@himanigulati01
himanigulati01 force-pushed the fix-composer-bucketref branch from 773736c to abbae7a Compare July 15, 2026 04:41
@ldanielmadariaga
ldanielmadariaga added this pull request to the merge queue Jul 15, 2026
@google-oss-prow google-oss-prow Bot added the lgtm label Jul 15, 2026
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anhdle-sso, ldanielmadariaga

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Merged via the queue into GoogleCloudPlatform:master with commit d041595 Jul 15, 2026
209 of 398 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants