Skip to content

feat(internal/librarian/golang): restructure Go configuration in librarian.yaml#6015

Merged
suztomo merged 19 commits into
googleapis:mainfrom
suztomo:feat-restructure-go-config-only
May 14, 2026
Merged

feat(internal/librarian/golang): restructure Go configuration in librarian.yaml#6015
suztomo merged 19 commits into
googleapis:mainfrom
suztomo:feat-restructure-go-config-only

Conversation

@suztomo

@suztomo suztomo commented May 14, 2026

Copy link
Copy Markdown
Member

This PR re-applies the Go configuration restructuring from PR #5975, nesting Go configuration under API entries. This PR will be merged right before the companion configuration migration in google-cloud-go: googleapis/google-cloud-go#14587 is merged.

This temporarily skips the integration test using google-cloud-go.

Here is how GitHub Actions handles the subsequent create-issue-on-failure job:

  create-issue-on-failure:
    needs: [integration]
    if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
  1. Dependency State: Because integration has if: false, GitHub Actions marks its final status as skipped.
  2. Evaluation: By default, a job is skipped if its needs dependency is skipped. However, because create-issue-on-failure uses always(), GitHub evaluates its if: condition.
  3. Result: The expression needs.*.result evaluates to ['skipped']. Since this array does not contain 'failure', the contains(...) check evaluates to false.

As a result, the create-issue-on-failure job will be cleanly skipped without creating any false alarm issues or causing workflow errors.

Fixes #5471

suztomo added 17 commits May 14, 2026 19:43
This removes support for top-level Go defaults (Issue googleapis#5246) to focus this branch solely on nesting Go configuration under API entries (Issue googleapis#5471).
With Go configuration now nested directly under API entries (Issue googleapis#5471), the API path is always known from the containing API structure. Removing GoAPI.Path eliminates redundancy and prevents potential state drift.
@suztomo suztomo requested a review from a team as a code owner May 14, 2026 19:43
@suztomo suztomo changed the title feat(internal/librarian/golang): restructure Go configuration in librarian.yaml (#5471) feat(internal/librarian/golang): restructure Go configuration in librarian.yaml May 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the configuration schema by moving Go-specific API configurations from a central list in GoModule directly into the API struct. This change simplifies the relationship between general API definitions and language-specific overrides. The refactor includes updates to the core configuration types, the generation logic, and extensive updates to the test suites. I have no feedback to provide as there were no review comments to assess.

@suztomo suztomo marked this pull request as draft May 14, 2026 20:11
This avoids integration test failures on main when Librarian merges before google-cloud-go.
@suztomo suztomo marked this pull request as ready for review May 14, 2026 20:50
@suztomo suztomo merged commit a22d6b5 into googleapis:main May 14, 2026
24 checks passed
suztomo added a commit to googleapis/google-cloud-go that referenced this pull request May 14, 2026
This PR migrates Go configuration in `librarian.yaml` to support nesting
Go configuration under API entries. It also sets a temporary
pseudo-version for Librarian HEAD so that Librarian's integration test
passes immediately after merging the companion Librarian PR
googleapis/librarian#6015.
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.

golang: remove redundant path duplication between apis and go.go_apis

2 participants