Skip to content

ci(workflows): add librarian generation check presubmit - #9039

Open
quirogas wants to merge 8 commits into
googleapis:mainfrom
quirogas:feat/ci-librarian-generation-check
Open

ci(workflows): add librarian generation check presubmit#9039
quirogas wants to merge 8 commits into
googleapis:mainfrom
quirogas:feat/ci-librarian-generation-check

Conversation

@quirogas

@quirogas quirogas commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Modifications to librarian configuration and generator scripts require downstream generated code to be kept in sync with upstream changes.

Adds .github/workflows/generation_check.yaml to run on pull requests that modify librarian.yaml, .readme-partials.yaml, librarian.js, or librarian.ts, as well as on main branch pushes and workflow_dispatch events. The workflow sets up Node.js 22, installs Librarian dependencies, executes librarian generate --all across configured packages, and asserts zero uncommitted git diffs exist.

Closes googleapis/librarian#5352

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@product-auto-label product-auto-label Bot added the api: workflows Issues related to the Workflows API. label Jul 31, 2026
Modifications to librarian configuration and generator scripts require downstream generated code to be kept in sync with upstream changes.

Adds .github/workflows/generation_check.yaml to run on pull requests that modify librarian.yaml, .readme-partials.yaml, librarian.js, or librarian.ts, as well as on main branch pushes and workflow_dispatch events. The workflow sets up Node.js 22, pins googleapis/librarian to an immutable commit SHA (passing zizmor security checks), installs Librarian dependencies, executes librarian generate --all across configured packages, and asserts zero uncommitted git diffs exist.

Fixes googleapis/librarian#5352
@quirogas
quirogas force-pushed the feat/ci-librarian-generation-check branch from 43cb187 to dd2ccf9 Compare July 31, 2026 19:47
quirogas added 5 commits July 31, 2026 12:52
Updates googleapis/librarian action SHA pin to 35997441eafc2b02716804f9baba1e3f04f8a44f corresponding to tag v0.31.1, aligning the action version with the version specified in librarian.yaml.
…workflow model

Adds .github/workflows/librarian_tidy.yml to verify that librarian.yaml is tidy on pull requests. Updates .github/workflows/generation_check.yaml to match the established google-cloud-go workflow pattern, using googleapis/librarian@main and adding automated main branch failure reporting via create-issue-on-failure.
Pins googleapis/librarian and create-issue-on-failure actions to commit SHA a02c28273b3c9ddb33bbe5849a44b6a678d28404 (v0.31.1) across generation_check.yaml and librarian_tidy.yml.

This satisfies Alphabet's mandatory Zizmor security scanning policy requiring immutable commit SHA references for third-party actions, while allowing librarian.yaml to dynamically control CLI binary execution.
…for Zizmor

Suppresses excessive-permissions audit finding on job-level issues:write permission in generation_check.yaml. Updates concurrency grouping expressions across generation_check.yaml and librarian_tidy.yml to use pull_request.number to resolve Exit Code 13 findings.
… checks

Adds inline explanatory comments to contents: read and issues: write permission entries under jobs.regeneration in generation_check.yaml. This resolves Zizmor's undocumented-permissions audit finding.
@quirogas quirogas self-assigned this Jul 31, 2026
quirogas added 2 commits July 31, 2026 18:18
Updates version comments for actions/checkout (v4.2.2) and dorny/paths-filter (v3.0.2) across generation_check.yaml and librarian_tidy.yml to resolve Zizmor ref-confusion findings.
…n comments

Resolves Zizmor ref-version-mismatch and stale-action-refs warnings by aligning actions/checkout to # v6.0.3, dorny/paths-filter to # v4.0.1, and pinning googleapis/librarian to commit 35997441eafc2b02716804f9baba1e3f04f8a44f corresponding to tag v0.31.1.
@quirogas
quirogas marked this pull request as ready for review August 1, 2026 02:13
@quirogas
quirogas requested a review from a team as a code owner August 1, 2026 02:13
@github-actions
github-actions Bot requested a review from shivanee-p August 1, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: workflows Issues related to the Workflows API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node: create a presubmit check to verify librarian generate -all in google-cloud-node

1 participant