MINOR - Fix CI on fork#30255
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔴 Playwright Results — 4 pipeline/setup failure(s)✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped Pipeline and setup failures
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedUpdates CI checkout configuration to enable GitHub merge groups and adds support for unsafe PR checkouts. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
There was a problem hiding this comment.
A workflow_dispatch event has no pull_request.head.sha, so this checkout receives an empty ref instead of the dispatched revision. The run can fail at checkout or test the default branch rather than the requested code. The changed PostgreSQL E2E, SSO, and Python test workflows use the same expression on their manual-run paths.
There was a problem hiding this comment.
Pull request overview
This PR updates several GitHub Actions workflows to better support GitHub Merge Queue (merge_group) and to keep the SOURCE_SHA/checkout ref consistent across CI jobs.
Changes:
- Added
merge_grouptriggers to selected workflows. - Updated
actions/checkoutref:logic across multiple workflows. - Updated
SOURCE_SHAin Playwright/integration workflows to match the intended tested SHA.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/py-tests.yml | Updates checkout ref selection for Python CI jobs. |
| .github/workflows/py-tests-postgres.yml | Updates checkout ref selection for Python Postgres CI. |
| .github/workflows/playwright-sso-tests.yml | Adds merge_group trigger and updates checkout/SOURCE_SHA. |
| .github/workflows/playwright-postgresql-e2e.yml | Updates checkout/SOURCE_SHA used by Playwright Postgres E2E flow. |
| .github/workflows/playwright-mysql-e2e.yml | Adds merge_group trigger and updates checkout ref. |
| .github/workflows/playwright-integration-tests-postgres.yml | Adds merge_group trigger and updates checkout ref. |
| .github/workflows/playwright-integration-tests-mysql.yml | Adds merge_group trigger and updates checkout ref. |
| .github/workflows/integration-tests-postgres-opensearch.yml | Updates checkout/SOURCE_SHA used by Java integration tests (PG+OS). |
| .github/workflows/integration-tests-postgres-elasticsearch-redis.yml | Updates checkout/SOURCE_SHA used by Java integration tests (PG+ES+Redis). |
| .github/workflows/integration-tests-mysql-elasticsearch.yml | Updates checkout/SOURCE_SHA used by Java integration tests (MySQL+ES). |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| SOURCE_SHA: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| SOURCE_SHA: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| SOURCE_SHA: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.sha }} | ||
| SOURCE_SHA: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} |
|
check https://github.com/open-metadata/OpenMetadata/pull/30255/changes#r3618187856 regarding copilot comments |
Describe your changes:
remove
merge_commit_shato allow fork PR to run checks. Instead rely on merge queue to test the changes against the latest from main. This prevents triggering the checkout guardsType of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
actions/checkoutref logic across multiple workflow files to support GitHub merge groups.SOURCE_SHAenvironment variable to ensure consistency with the checkout ref in build steps.This will update automatically on new commits.
Greptile Summary
This PR updates CI revision selection and expands merge-queue coverage. The main changes are:
Confidence Score: 4/5
Existing push and manual CI paths can receive empty revision values and need fixes before merging.
The changed integration, Playwright, and Python workflows that use the two-branch SHA expression.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: reverted checkout + enabled merge g..." | Re-trigger Greptile
Context used (3)