Skip to content

Comments

refactor: run atoms e2e when e2e label added#23281

Merged
keithwillcode merged 2 commits intomainfrom
lauris/cal-6305-chore-run-atoms-e2e-only-when-ready-for-e2e-label-added
Aug 22, 2025
Merged

refactor: run atoms e2e when e2e label added#23281
keithwillcode merged 2 commits intomainfrom
lauris/cal-6305-chore-run-atoms-e2e-only-when-ready-for-e2e-label-added

Conversation

@supalarry
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Aug 22, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Walkthrough

Adds a new reusable workflow e2e-atoms by converting .github/workflows/e2e-atoms.yml from pull_request to workflow_call, updating permissions, renaming the job to e2e-atoms, and renaming artifacts. Integrates this workflow into CI by adding an e2e-atoms job to .github/workflows/all-checks.yml and .github/workflows/pr.yml, specifying its needs and using the reusable workflow with inherited secrets. Updates gating: includes e2e-atoms in final required needs in all-checks.yml, and in merge-reports.needs and required.needs in pr.yml.

Possibly related PRs

  • feat: atoms e2e tests #22926: Renames and integrates the Atoms E2E workflow (atoms-e2e → e2e-atoms) and updates CI gating, overlapping directly with these workflow changes.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lauris/cal-6305-chore-run-atoms-e2e-only-when-ready-for-e2e-label-added

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app graphite-app bot requested a review from a team August 22, 2025 14:02
@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Aug 22, 2025
@graphite-app graphite-app bot requested a review from a team August 22, 2025 14:03
@graphite-app
Copy link

graphite-app bot commented Aug 22, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (08/22/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add platform team as reviewer" took an action on this PR • (08/22/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (08/22/25)

1 label was added to this PR based on Keith Williams's automation.

@dosubot dosubot bot added automated-tests area: unit tests, e2e tests, playwright ci area: CI, DX, pipeline, github actions labels Aug 22, 2025
@github-actions github-actions bot marked this pull request as draft August 22, 2025 14:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.github/workflows/atoms-e2e.yml (1)

4-4: Converted to reusable workflow correctly; verify artifact paths relative to working directory.

Switch to workflow_call looks good and matches how you’re invoking it from other workflows.

  • Heads-up: the test step runs in packages/platform/examples/base, but both artifact uploads don’t set that working directory and use relative paths (test-results, playwright-report). Unless those folders are created at repo root, uploads will silently find nothing.

Outside-changes diff to make artifact paths explicit:

-      - name: Upload Test Results
+      - name: Upload Test Results
         uses: actions/upload-artifact@v4
         if: always()
         with:
           name: atoms-e2e-test-results
-          path: test-results
+          path: packages/platform/examples/base/test-results
           retention-days: 7
-      - name: Upload Playwright Report
+      - name: Upload Playwright Report
         uses: actions/upload-artifact@v4
         if: always()
         with:
           name: atoms-e2e-playwright-report
-          path: playwright-report
+          path: packages/platform/examples/base/playwright-report
           retention-days: 7
.github/workflows/all-checks.yml (1)

77-82: New atoms-e2e job wiring looks consistent with existing patterns.

  • uses: ./.github/workflows/atoms-e2e.yml + secrets: inherit is correct for a reusable workflow.
  • needs: [lint, build, build-atoms, build-api-v2] is sensible to ensure Atoms and API v2 are built before running Atoms E2E.

Consider aligning the runner size and timeout-minutes here if you anticipate heavier Atoms tests in merge queue (you can override via inputs in the reusable workflow later if needed).

.github/workflows/pr.yml (2)

198-204: PR gating for atoms-e2e is wired correctly behind the label.

  • needs: [changes, check-label, build, build-atoms, build-api-v2] mirrors the other E2E jobs and ensures prerequisites.
  • if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} matches your “run only when ready-for-e2e” intent.

If Atoms tests ever need API v1, consider adding build-api-v1 to needs now to avoid future flakiness.


214-214: Make sure merge-reports knows about the new artifact names.

You’ve added atoms-e2e to merge-reports.needs, good. The Atoms workflow uploads artifacts named:

  • atoms-e2e-test-results
  • atoms-e2e-playwright-report

If merge-reports.yml expects a fixed set of artifact names (e.g., from existing E2E jobs), it may not pick these up. Please verify and extend it to include the new names or to discover artifacts dynamically.

I can open a follow-up to update merge-reports.yml once you confirm its current artifact selection logic.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a082cf7 and be6c4e2.

📒 Files selected for processing (3)
  • .github/workflows/all-checks.yml (1 hunks)
  • .github/workflows/atoms-e2e.yml (1 hunks)
  • .github/workflows/pr.yml (3 hunks)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (2)
.github/workflows/all-checks.yml (1)

84-84: Adding atoms-e2e to final gate is intentional and will enforce it on merge queue.

Including atoms-e2e in required.needs means the merge-group workflow will fail if Atoms E2E fails. That matches the PR goal to gate on Atoms E2E when used in this workflow.

Please confirm the merge-queue capacity/time impact: Atoms E2E runs on buildjet-4vcpu-ubuntu-2204 in the reusable workflow. If your merge-queue runner labels differ, you may want to override or document it.

.github/workflows/pr.yml (1)

259-259: Adding atoms-e2e to “required” keeps PRs blocked until Atoms E2E passes when it should run.

This mirrors the existing pattern where conditional jobs (guarded by run-e2e) still appear in required.needs, and the final step fails on skipped/failed jobs. That enforces adding the label before merge.

To avoid confusion for contributors, consider updating contributor docs to mention that PRs changing code will require the ready-for-e2e label to satisfy the required checks.

@vercel
Copy link

vercel bot commented Aug 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Aug 22, 2025 2:09pm
cal-eu Ignored Ignored Aug 22, 2025 2:09pm

@supalarry supalarry marked this pull request as ready for review August 22, 2025 14:09
@keithwillcode keithwillcode enabled auto-merge (squash) August 22, 2025 14:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/e2e-atoms.yml (1)

36-43: Artifact path likely wrong relative to working-directory; results may not upload.

yarn test:e2e runs in packages/platform/examples/base, so test-results will be created under that directory. actions/upload-artifact resolves path relative to the workspace root, not the step’s working-directory. Update the path to avoid empty/missing artifacts.

       - name: Upload Test Results
         uses: actions/upload-artifact@v4
         if: always()
         with:
-          name: e2e-atoms-test-results
-          path: test-results
+          name: e2e-atoms-test-results
+          path: packages/platform/examples/base/test-results
           retention-days: 7
🧹 Nitpick comments (4)
.github/workflows/e2e-atoms.yml (4)

4-4: Good move to a reusable workflow; add a fast-fail guard for required secrets.

Switching to workflow_call is aligned with the PR goal. Because callers are using secrets: inherit, GitHub won’t enforce a required-secrets schema here. Add a short validation step early in the job to fail fast when any expected secret/env is missing.

Apply this diff to insert a guard step after checkout (adjust position as you see fit):

       - uses: actions/checkout@v4
       - uses: ./.github/actions/dangerous-git-checkout
+      - name: Validate required env
+        run: |
+          missing=()
+          for var in ATOMS_E2E_OAUTH_CLIENT_ID ATOMS_E2E_OAUTH_CLIENT_SECRET ATOMS_E2E_API_URL ATOMS_E2E_ORG_ID ATOMS_E2E_OAUTH_CLIENT_ID_BOOKER_EMBED DATABASE_URL DATABASE_DIRECT_URL; do
+            if [ -z "${!var}" ]; then missing+=("$var"); fi
+          done
+          if [ ${#missing[@]} -ne 0 ]; then
+            echo "Missing required env: ${missing[*]}" >&2
+            exit 1
+          fi
       - uses: ./.github/actions/yarn-install

20-23: Consider concurrency to cancel superseded runs.

Atoms E2E can be slow/expensive. Add a concurrency group so pushes/label flips on the same ref don’t run multiple copies.

   e2e-atoms:
+    concurrency:
+      group: e2e-atoms-${{ github.workflow }}-${{ github.ref }}
+      cancel-in-progress: true
     timeout-minutes: 15
     name: Atoms E2E Tests

5-7: Scope permissions at the job level (principle of least privilege).

You only need actions: write and contents: read for this job. Scoping them to the job keeps the workflow safer if additional jobs get added later.

-permissions:
-  actions: write
-  contents: read
+  # (optional) remove top-level permissions in favor of job-scoped permissions

And under the e2e-atoms job:

   e2e-atoms:
+    permissions:
+      actions: write
+      contents: read

10-10: Possible typo: 8096 MB vs 8192 MB for Node heap.

If the intent was ~8 GiB, the common value is 8192. If 8096 is intentional, ignore.

-  NODE_OPTIONS: --max-old-space-size=8096
+  NODE_OPTIONS: --max-old-space-size=8192
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between be6c4e2 and dc466d7.

📒 Files selected for processing (3)
  • .github/workflows/all-checks.yml (1 hunks)
  • .github/workflows/e2e-atoms.yml (3 hunks)
  • .github/workflows/pr.yml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/pr.yml
  • .github/workflows/all-checks.yml
🔇 Additional comments (1)
.github/workflows/e2e-atoms.yml (1)

40-40: No stale references to old atoms-e2e identifiers detected
Ran the provided ripgrep checks against the entire repository and found no occurrences of the old atoms-e2e(-test-results|-playwright-report)? or the new e2e-atoms(-test-results|-playwright-report)? identifiers outside of the updated workflow file.

Please manually verify any external consumers—such as merge-reporting scripts, dashboards, or downstream workflows in other repositories—to ensure they reference the new e2e-atoms-* names and job ID.

  • Dashboards or reporting tools pulling artifact names
  • CI/CD orchestration or follow-up workflows in other repos
  • Documentation or README snippets that mention the old job/artifact IDs

@keithwillcode keithwillcode merged commit 7ae0d6b into main Aug 22, 2025
59 of 62 checks passed
@keithwillcode keithwillcode deleted the lauris/cal-6305-chore-run-atoms-e2e-only-when-ready-for-e2e-label-added branch August 22, 2025 14:32
@github-actions
Copy link
Contributor

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-tests area: unit tests, e2e tests, playwright ci area: CI, DX, pipeline, github actions core area: core, team members only platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants