Repository navigation
CI: Consolidate backend validation under shared entrypoints - #38801
Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
| k8s_operator-unit-tests: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| needs: plan | ||
| if: ${{ needs.plan.outputs.java-operator == 'true' }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ needs.plan.outputs.ref }} | ||
| persist-credentials: false | ||
| - name: Run Kubernetes operator unit tests | ||
| uses: ./.github/actions/java-k8s-operator-tests | ||
|
|
||
| docker-image-smoke-test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| needs: [plan, backend] | ||
| if: ${{ needs.plan.outputs.docker-smoke == 'true' }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ needs.plan.outputs.ref }} | ||
| persist-credentials: false | ||
| - name: Smoke test the server image | ||
| uses: ./.github/actions/java-docker-smoke | ||
|
|
||
| validate-json-yaml: | ||
| needs: plan | ||
| if: ${{ needs.plan.outputs.json-yaml == 'true' || needs.plan.outputs.ci-rules == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: ${{ needs.plan.outputs.ref }} | ||
| persist-credentials: false | ||
| - uses: ./.github/actions/setup-python | ||
| with: | ||
| python-version: '3.12' | ||
| - uses: ./.github/actions/validate-json-yaml | ||
| if: ${{ needs.plan.outputs.json-yaml == 'true' }} | ||
| - uses: ./.github/actions/validate-ci-rules | ||
| if: ${{ needs.plan.outputs.ci-rules == 'true' }} | ||
|
|
||
| validate-docker-compose: | ||
| needs: plan | ||
| if: ${{ needs.plan.outputs.quickstart-compose == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| env: | ||
| OPENMETADATA_DB_IMAGE: docker.getcollate.io/openmetadata/db:latest | ||
| OPENMETADATA_SERVER_IMAGE: docker.getcollate.io/openmetadata/server:latest | ||
| OPENMETADATA_INGESTION_IMAGE: docker.getcollate.io/openmetadata/ingestion:latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
|
|
||
| with: | ||
| persist-credentials: false | ||
| - name: Validate OpenMetadata Docker Compose | ||
| uses: ./.github/actions/validate-omd-docker-compose | ||
| with: | ||
| compose_file: ./docker/docker-compose-quickstart/docker-compose.yml | ||
| health_check_timeout: 300 | ||
|
|
||
| backend-checks-status: | ||
| name: backend-checks-status | ||
| needs: [plan, backend-checks, k8s_operator-unit-tests, docker-image-smoke-test] | ||
| runs-on: ubuntu-slim | ||
| timeout-minutes: 5 | ||
| if: >- | ||
| ${{ always() && github.event_name == 'pull_request' && | ||
| (needs.plan.result != 'success' || | ||
| needs.plan.outputs.checkstyle != 'false' || | ||
| needs.plan.outputs.java-unit != 'false' || | ||
| needs.plan.outputs.java-operator != 'false' || | ||
| needs.plan.outputs.docker-smoke != 'false') }} | ||
| steps: | ||
| - name: Verify backend checks, operator tests, and Docker smoke test | ||
| env: | ||
| CHANGES_RESULT: ${{ needs.plan.result }} | ||
| CHECKSTYLE_CHANGED: ${{ needs.plan.outputs.checkstyle }} | ||
| JAVA_CHANGED: ${{ needs.plan.outputs.java-unit }} | ||
| K8S_CHANGED: ${{ needs.plan.outputs.java-operator }} | ||
| DOCKER_CHANGED: ${{ needs.plan.outputs.docker-smoke }} | ||
| SERVICE_RESULT: ${{ needs.backend-checks.result }} | ||
| K8S_RESULT: ${{ needs.k8s_operator-unit-tests.result }} | ||
| DOCKER_RESULT: ${{ needs.docker-image-smoke-test.result }} | ||
| run: | | ||
| if [[ "$CHANGES_RESULT" != "success" ]]; then | ||
| echo "::error::CI planning did not succeed: ${CHANGES_RESULT}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| fail=0 | ||
| check() { | ||
| local name="$1" changed="$2" result="$3" | ||
| if [[ "$changed" != "true" ]]; then | ||
| echo "${name}: no relevant paths changed, skipped." | ||
| return | ||
| fi | ||
| if [[ "$result" != "success" ]]; then | ||
| echo "::error::${name} did not succeed (result=${result})" | ||
| fail=1 | ||
| else | ||
| echo "${name}: success" | ||
| fi | ||
| } | ||
| backend_changed="false" | ||
| if [[ "$JAVA_CHANGED" == "true" || "$CHECKSTYLE_CHANGED" == "true" ]]; then | ||
| backend_changed="true" | ||
| fi | ||
| check "backend-checks" "$backend_changed" "$SERVICE_RESULT" | ||
| check "k8s_operator-unit-tests" "$K8S_CHANGED" "$K8S_RESULT" | ||
| check "docker-image-smoke-test" "$DOCKER_CHANGED" "$DOCKER_RESULT" | ||
| exit $fail |
There was a problem hiding this comment.
These can be merged into a single job, max 2
There was a problem hiding this comment.
Done: on PRs the backend is now 2 jobs. backend-checks-status runs checkstyle, unit tests, k8s operator tests and the Docker smoke test as steps (only the ones the planner picks), and validate-config runs the JSON/YAML, CI rules and compose checks.
The merge queue keeps its separate jobs because the ITs wait for backend-checks.
# Conflicts: # .github/scripts/nightly_summary.py # .github/scripts/tests/test_ci_speed_nightly.py
| One final nightly job verifies the selected results and writes a workflow summary. On a failure it | ||
| posts the failed and incomplete jobs to Slack with a link to the run. Each alert goes to the team | ||
| that owns the job that failed: Python and ingestion jobs post to the ingestion channel and mention | ||
| `onduty-integrations`; the backend image, the Java integration runtime and tests, and Java Sonar | ||
| post to `#ci-cleanup` and mention `onduty-platform`. A job skipped because an upstream job failed | ||
| is listed in the upstream owner's alert, so a backend failure never mentions the ingestion team. | ||
| Sonar-only failures are reported without a mention. |
There was a problem hiding this comment.
💡 Quality: Decision text still says every nightly failure pages onduty-integrations
The v7 amendment (lines 147-153) says nightly alerts go to the team that owns the failed job, and that a backend-image failure "never mentions the ingestion team". The record's main Decision paragraph (lines 118-120) was not changed and still says "Scheduled and manual nightly failures notify ingestion Slack and mention onduty-integrations". So the same Accepted record now gives two conflicting rules. nightly_summary.py follows the amendment by posting backend and Java failures to the Platform channel, so a reader who relies on the Decision paragraph will look in the wrong place. Reword lines 118-120 to point at the owner-routing rule.
Make the Decision paragraph agree with the v7 routing rule:
Selected jobs must succeed; unexpected failures and skips fail the required status. Scheduled
and manual nightly failures notify the Slack channel and on-duty group of the team that owns the
failed job (see the nightly selection and reporting amendment); successful
or cancelled runs and PR/merge-queue modes stay silent.
Was this helpful? React with 👍 / 👎
# Conflicts: # .github/workflows/validate-jsons-yamls.yml
Code Review 👍 Approved with suggestions 🔴 High risk 2 closed / 3 findingsConsolidating repo-wide PR and merge-queue gates around a shared workload planner could omit checks, allowing unvalidated changes to merge. Consolidates backend CI into
💡 Quality: Decision text still says every nightly failure pages onduty-integrations📄 docs/decisions/2026-11-11-python-ci-selects-workloads-by-event.md:118-120 📄 docs/decisions/2026-11-11-python-ci-selects-workloads-by-event.md:147-153 The v7 amendment (lines 147-153) says nightly alerts go to the team that owns the failed job, and that a backend-image failure "never mentions the ingestion team". The record's main Decision paragraph (lines 118-120) was not changed and still says "Scheduled and manual nightly failures notify ingestion Slack and mention Make the Decision paragraph agree with the v7 routing rule✅ 2 closed✅ Bug: Manual dispatches of different workloads cancel each other
✅ Quality: Required-check producer and routing contract has no decision record
🤖 Prompt for agentsVerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
❌ 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 |
Describe your changes
Consolidate backend CI into
ci-pr,ci-merge-queue, andci-nightly. PRs and merge groups now detect relevant changes once and share the resulting workload selection across Java, Python, and config checks. Pushes tomainno longer run these checks.Type of change
High-level design
ci-status-gateaction, which runs on every non-draft PR and fails when the planner fails or a selected job does not succeed.backend-checks-statusruns checkstyle, the service unit tests, the Kubernetes operator tests and the Docker smoke test as steps of one job, likepy-tests-status. Each step runs only when the planner selects it and fails on its own, and the job ends withci-status-gate. It builds the server image itself, and only when the smoke test is selected.validate-configruns the JSON/YAML, CI rule and quickstart compose checks as steps, including the Yarn plugin test that the deletedvalidate-jsons-yamls.ymlran; it is not required. The merge queue keepsbackend-checks, the operator tests and the smoke test as separate jobs, because the integration tests wait forbackend-checks. Both entrypoints use the same composite actions.mainno longer repeat the backend checks. This relies on the merge queue being enabled.ci-nightly. Because pushes tomainno longer run integration tests, the nightly is the daily run of every Java setup onmain. A manual run can pick one workload, and each workload choice has its own concurrency key.backend-checks-statuscheck.#ci-cleanupand tag Platform on-duty (a Sonar-only failure is not tagged). A job skipped because an upstream job failed is listed in that upstream owner's alert.Local validation on the updated base passed the CI rule checks (208 tests, 2 runner-only skips), the Python CI tests, the Yarn plugin test, actionlint and the decision-record check. The broader CI-script suite had one existing merge-queue metrics failure that also reproduced on clean
main.Checklist
merge-rulesrequiresbackend-checks-status,py-tests-status,ui-tests-status,ui-checkstyle,ui-coverageandplaywright-summary, and no longerbackend-checksor the threeintegration-tests-*checks.Summary by Gitar
java-sonaractiondocker-smokepath filter to image-affecting files.github/ci/paths.ymlshared by PR, merge queue, and nightly planningci-pr,ci-merge-queue, andci-nightlyentrypointsdata-access-request-e2einto the merge queue workflow, with 100-minute timeoutscripts/ci_plan.pyselecting workloads per event and failing the Java and Python gates when planning failsvalidate-ci-rulesaction andvalidate_ci_rules.shrunning CI regression testsnightly_summary.pywriting a job-result table and posting a Slack alert on nightly failuresworkloadinputs to nightly and merge-queue workflows for selecting a subset of checksThis will update automatically on new commits.