Skip to content

docs(ci): correct E2E triggers, stale database GC age, environment protection and teardown - #1145

Merged
VLukiantsev merged 1 commit into
mainfrom
docs/e2e-ci-doc-corrections
Oct 7, 2026
Merged

VLukiantsev merged 1 commit into
mainfrom
docs/e2e-ci-doc-corrections

Conversation

@VLukiantsev

Copy link
Copy Markdown
Collaborator

Summary

Corrects four statements about the E2E pipeline in docs/ci_runner_infrastructure.md: when the E2E workflow runs, how old a leftover Spanner database must be before the stale-database cleanup deletes it, what protects the cloud credentials that the job uses, and whether resource teardown is guaranteed. Documentation only, and independent of the E2E reliability stack (fix/e2e-spanner-transient-retry and the PRs built on it).

Motivation & Context

Section 4 of the document disagreed with the workflows and the harness code:

  • Triggers: it said the workflow spins up an environment "on every PR and post-submit run on main" and referred to concurrent "PR test runs". .github/workflows/e2e-tests.yml declares only merge_group, workflow_call, and workflow_dispatch; .github/workflows/postsubmit-main.yml calls it for post-submit runs on main. It never runs on pull_request events.
  • Stale-database cleanup: it said leftover databases older than 2 hours are deleted. SpannerManager._cleanup_stale_databases in test/e2e/lib/spanner.py deletes E2E databases older than 3600 s, that is, 1 hour.
  • Environment protection: it said that external and fork pull requests need maintainer approval before the runner pod is dispatched or cloud tokens are minted. The deployment environment that the job references has no protection rules, so no such approval exists.
  • Teardown: the architecture diagram listed a "Guaranteed Resource Teardown" step. Teardown is best effort: managed_lifecycle in test/e2e/lib/orchestrator.py logs a failed teardown step and continues, and nothing runs when the runner pod is killed abruptly, which is the case that the stale-database cleanup described in the same section covers.

Why the security statement matters most: a reader who trusts the old text could add a pull_request trigger in the belief that an approval gate stops fork code from reaching the credentials. The corrected text names what actually limits exposure today: the workflow never runs on pull_request events, so pull request code, including code from forks, reaches the job only after the pull request enters the merge queue, and manual dispatch requires write access to the repository.

Key Changes

  • docs/ci_runner_infrastructure.md, section 4 ("Headless KinD & Playwright End-to-End (E2E) Pipeline"):
    • The introduction lists the actual triggers (merge queue entries, post-submit runs on main through postsubmit-main.yml, and manual dispatch) and states that pull_request events do not run the workflow.
    • "Multiple concurrent PR test runs" becomes "Multiple concurrent E2E runs".
    • The stale-database cleanup age becomes 1 hour.
    • "GitHub Repository Secrets & Environment Protection" describes the environment as having no approval requirement and explains the trigger-based limits instead.
    • Step 5 of the architecture diagram becomes "Best-Effort Resource Teardown"; the box keeps its width.

Assumptions

None — requirements were fully specified.

Verification & Testing

  • Commands Executed: ./.githooks/pre-commit (at commit time), ./tools/analyze_diff_size.py --base-ref origin/main, and read-only checks of the trigger blocks in .github/workflows/e2e-tests.yml and .github/workflows/postsubmit-main.yml, the age check in test/e2e/lib/spanner.py (current_ts - ts_part > 3600), the teardown error handling in test/e2e/lib/orchestrator.py, and the environment's protection rules through the GitHub REST API (an empty protection_rules list).
  • Coverage & Test Status: documentation only, so no tests are affected. The pre-commit hook passed at commit time, and every line of the edited diagram is still 91 characters wide. Diff size: 0 production, 0 test, and 5 documentation lines, below the split thresholds.

Related Issues / Bugs

Part of bug 462085856

TAG=agy
CONV=40d6ae5a-d349-4c16-8794-c43d00cc0a88

…otection and teardown

docs/ci_runner_infrastructure.md described the E2E pipeline incorrectly:
- Triggers: e2e-tests.yml runs for merge queue entries, for post-submit
  runs on main (called from postsubmit-main.yml), and on manual dispatch.
  It does not run on pull_request events, so "every PR" and "PR test
  runs" are replaced.
- Stale database GC: SpannerManager deletes leftover E2E databases older
  than 1 hour (3600 s), not 2 hours.
- Environment protection: the deployment environment that the job
  references has no approval rule. Credential exposure is limited by the
  triggers: pull request code, including code from forks, reaches the
  job only through the merge queue, and manual dispatch requires write
  access.
- Teardown: the orchestrator's resource teardown is best effort, not
  guaranteed. It does not run when the runner pod is killed abruptly,
  which is the case that the stale database GC covers.

TAG=agy
CONV=40d6ae5a-d349-4c16-8794-c43d00cc0a88

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

Copy link
Copy Markdown

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 updates the CI runner infrastructure documentation to accurately reflect the triggers, resource teardown guarantees, and security model of the E2E test pipeline. Specifically, it clarifies that the pipeline runs on merge queue entries, post-submits, and manual dispatches rather than standard pull requests, updates the database garbage collection threshold from 2 hours to 1 hour, and corrects the resource teardown description to 'best-effort'. There are no review comments, so I have no additional feedback to provide.

@VLukiantsev
VLukiantsev marked this pull request as ready for review October 7, 2026 13:32
@VLukiantsev
VLukiantsev enabled auto-merge October 7, 2026 13:32
@github-actions
github-actions Bot requested a review from janzak-dev October 7, 2026 13:32
@VLukiantsev
VLukiantsev added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit c1714b1 Oct 7, 2026
12 checks passed
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