Skip to content

ci: add a minimal v1 to v2 transition setup - #335

Open
draedful wants to merge 14 commits into
mainfrom
codex/stage-0-v2-baseline
Open

ci: add a minimal v1 to v2 transition setup#335
draedful wants to merge 14 commits into
mainfrom
codex/stage-0-v2-baseline

Conversation

@draedful

@draedful draedful commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a deliberately small temporary setup for developing v2 while main continues to ship v1.

  • run CI and E2E for both main and v2;
  • keep the existing v1 release and main preview workflows unchanged;
  • add a separate /graph/v2/ preview;
  • add a manual-only v2 prerelease workflow publishing under next;
  • document the short-lived branch, synchronization, release, and cutover rules.

The previous ruleset framework, routing validator, templates, API snapshot, consumer matrix, role system, and SHA ledger have intentionally been removed. Two maintainers will handle the occasional v1-to-v2 synchronization through normal PR review during the expected 1–2 month transition.

The TypeScript declaration packaging issue discovered during this work is intentionally deferred. It should be addressed separately on the v1 maintenance branch or through a more complete types design.

Safety

  • This PR does not create v2 or release/v1.
  • V2 releases are manual and the release job runs only when dispatched from the v2 ref.
  • V2 prereleases use next, never latest.
  • Existing main release and preview behavior is preserved.

Validation

  • npm run typecheck
  • npm run build:publish
  • npm run test: 31 suites, 339 tests passed
  • workflow YAML parsing
  • git diff --check

Related: #310, #312, #313, #314, #315, #316, #317.

Summary by Sourcery

Establish a temporary parallel v1/v2 development and release setup while keeping main stable and preparing v2 for the eventual cutover.

New Features:

  • Add a separate Storybook preview for the v2 branch at /graph/v2/.
  • Add a manually triggered v2 prerelease workflow that publishes 2.x prereleases under the next npm dist-tag.

Enhancements:

  • Run CI and end-to-end tests for both main and v2 branches.
  • Document the temporary v1-to-v2 branching, synchronization, release, and cutover process.

CI:

  • Extend CI and E2E workflows to run on pushes to v2 while preserving existing main behavior.

Deployment:

  • Add v2 preview deployment and guarded prerelease publishing limited to the v2 branch.

Documentation:

  • Document branch responsibilities, release channels, synchronization rules, and eventual v2 cutover steps.

Chores:

  • Keep the transition setup intentionally minimal without automated synchronization, governance rules, or pre-created release branches.

@gravity-ui-bot

Copy link
Copy Markdown
Contributor

Preview is ready.

@draedful draedful changed the title docs(ci): establish the GravityGraph v2 Stage 0 baseline ci: add a minimal v1 to v2 transition setup Aug 21, 2026
@draedful
draedful marked this pull request as ready for review August 21, 2026 13:06
@draedful
draedful requested a review from Antamansid as a code owner August 21, 2026 13:06
@sourcery-ai

sourcery-ai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

Sets up a minimal, temporary infrastructure to develop and validate a v2 line alongside the existing v1 on main by extending CI/E2E coverage to the v2 branch, adding an isolated v2 Storybook preview and manual prerelease workflow, and documenting branch, release, and cutover rules for the v1→v2 transition.

File-Level Changes

Change Details Files
Extend CI and E2E workflows to run for both main and v2 branches without altering existing test behavior.
  • Update CI workflow push trigger to include the v2 branch alongside main.
  • Update E2E workflow to run on push events for both main and v2, in addition to existing pull_request and workflow_dispatch triggers.
  • Normalize whitespace in the E2E workflow while preserving functional behavior.
.github/workflows/ci.yaml
.github/workflows/e2e.yml
Introduce a manual-only v2 prerelease workflow that publishes 2.x prereleases under the next npm dist-tag from the v2 branch.
  • Add a new GitHub Actions workflow that can only run when dispatched from the v2 ref.
  • Generate a GitHub App token using repository secrets for authenticated release operations.
  • Invoke gravity-ui/release-action with v2 as the default branch, node 24 runtime, npm dist-tag set to next, and prerelease mode enabled.
.github/workflows/release-v2.yml
Add a dedicated v2 Storybook preview deployment pipeline targeting the /graph/v2/ path.
  • Create a v2-only preview workflow triggered by pushes to the v2 branch.
  • Build the Storybook bundle using npm ci and npm run build-storybook under Node 20.
  • Upload the built Storybook artifacts to S3 under the /graph/v2/ prefix using the existing preview upload action and S3 credentials.
.github/workflows/v2-preview.yml
Document the temporary v1→v2 branch, release, synchronization, and cutover strategy.
  • Describe the pre-cutover branch model, clarifying that main remains the stable v1 branch while v2 hosts new development.
  • Define release channels and npm dist-tags for main (1.x/latest) and v2 (2.x/next) and how the manual v2 prerelease workflow is used.
  • Explain how to choose PR targets between main and v2, how to perform occasional manual syncs from main to v2, and outline the eventual cutover steps and constraints (e.g., not creating release/v1 early, avoiding v2 under latest).
docs/v1-v2-transition.md
Minor documentation housekeeping in contributing guidelines.
  • Ensure CONTRIBUTING.md ends with a newline and keep the contact information unchanged.
CONTRIBUTING.md

Possibly linked issues

  • #[Stage 0]: The PR introduces CI, preview, v2 prerelease workflow, and transition documentation that directly implement Stage 0’s v1/v2 policy.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • The new sentence added to CONTRIBUTING.md (For branch and release guidance during the v2 work, see the) is incomplete—link it explicitly to the new v1-v2 transition document or finish the sentence so readers can find the guidance.
  • In the new workflows, v2-preview.yml still uses actions/checkout@v3 and actions/setup-node@v3 while other workflows use @v4; consider standardizing on the same major versions for consistency and easier maintenance.
  • The v2 prerelease workflow runs Node 24 while other workflows use Node 20; if there is no strong reason for this difference, consider aligning the Node version or adding a brief comment explaining why the release job requires a newer runtime.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new sentence added to CONTRIBUTING.md (`For branch and release guidance during the v2 work, see the`) is incomplete—link it explicitly to the new v1-v2 transition document or finish the sentence so readers can find the guidance.
- In the new workflows, `v2-preview.yml` still uses `actions/checkout@v3` and `actions/setup-node@v3` while other workflows use `@v4`; consider standardizing on the same major versions for consistency and easier maintenance.
- The v2 prerelease workflow runs Node 24 while other workflows use Node 20; if there is no strong reason for this difference, consider aligning the Node version or adding a brief comment explaining why the release job requires a newer runtime.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@draedful

Copy link
Copy Markdown
Collaborator Author

@sourcery-ai review

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • The workflows currently mix Node 20 (CI/e2e/preview) and Node 24 (v2 prerelease); consider standardizing on a single Node version or explicitly documenting the intentional difference to avoid subtle environment drift between build, test, and release paths.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflows currently mix Node 20 (CI/e2e/preview) and Node 24 (v2 prerelease); consider standardizing on a single Node version or explicitly documenting the intentional difference to avoid subtle environment drift between build, test, and release paths.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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