Repository navigation
[1.13] ci: run PR code on pull_request only and retire the safe to test label - #35435
Conversation
…st label Backports the trigger change of #35426 to 1.13. pull_request_target always runs the default branch's workflow file, so 1.13 PRs have been running main's copies of these workflows. Once main stops triggering them on pull_request_target, 1.13 PRs only get the checks their own branch defines on pull_request, which reads the workflow from the PR's merge commit. Without this change they would lose java-checkstyle, py-checkstyle, py-tests-status and the rest. The twelve 1.13 workflows that check out or run PR code move to pull_request and drop the "safe to test" label gate. Sonar PR scans, bot comments, the generated-types auto-commit and the Collate dispatch run only for same-repo, non-Dependabot PRs; the Collate dispatch still reports a PR run as pull_request_target, the event Collate keys its PR mode on. Checkstyle failures also go to an error annotation and the job summary so fork PRs see the fix, and a typescript-type-generation dispatch for a fork PR stops instead of checking out its code.
… name 1.13 PRs have so far run main's maven-build-collate.yml, which builds Collate's 1.13 branch through the REST dispatch endpoint and waits up to 95 minutes. The 1.13 copy dispatched Collate main instead, by workflow name through the-actions-org/workflow-dispatch with a 1-hour wait, so once 1.13 PRs run their own copy they would build main-only Collate code against a 1.13 checkout. Bring over main's branch resolution and REST dispatch so 1.13 PRs keep building Collate 1.13, whose openmetadata-dispatch.yml takes the same sha and event inputs. PR runs still report the event as pull_request_target.
|
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Report Java integration checks on pull_request and propagate expected Playwright build and test failures. Guard report writes and secret-backed browser tests on fork and Dependabot PRs. Repair existing Python formatting violations without changing runtime behavior.
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
| for view_name in self.inspector.get_view_names( | ||
| schema_name | ||
| ) # pyright: ignore[reportAttributeAccessIssue] |
There was a problem hiding this comment.
⚠️ Bug: Black reflow moved # pyright: ignore comments off the erroring line
Reformatting these lines with black moved each trailing # pyright: ignore[...] onto a closing ) line. Pyright only suppresses a diagnostic when the ignore comment sits on the same line as the diagnostic. The diagnostics are still reported where they were: self.inspector.get_view_names( / get_materialized_view_names( in common_pg_mappings.py (lines 53/61, comments now on 55/63), self.context.get().table_data.Name in glue/metadata.py (line 422, comment on 423) and self.involved_tables or [] in lineage/parser.py (line 230, comment on 231). reportAttributeAccessIssue is configured as error. Because the reflow also moved these expressions to new columns, entries in .basedpyright/baseline.json (which match on column range) are unlikely to cover them either. So the static-checks nox session in py-tests.yml will probably report new errors on the required py-tests check. Fix: put each ignore on the line that opens the flagged expression, where black leaves trailing comments alone.
Anchor the ignore comment on the line that holds the flagged attribute access (same pattern for glue and parser.py):
for view_name in self.inspector.get_view_names( # pyright: ignore[reportAttributeAccessIssue]
schema_name
)
or []
...
for matview_name in self.inspector.get_materialized_view_names( # pyright: ignore[reportAttributeAccessIssue]
schema_name
)
or []
...
table_name = self.context.get().table_data.Name # pyright: ignore[reportAttributeAccessIssue] # fmt: skip
...
for table in (
self.involved_tables or [] # pyright: ignore[reportGeneralTypeIssues]
):
Was this helpful? React with 👍 / 👎
The Python Checkstyle workflow explicitly defers linting until the branch reaches 10/10, but py_format_check still invoked Pylint and failed at 9.99 after all formatters passed. Keep py_format_check limited to formatters; the existing lint target remains unchanged. Add a regression for both Make command boundaries.
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source



Describe your changes:
Alignment update (2026-11-10): refreshed onto current
1.13and pushed4e7e3e7d55d. Independent self-review of the workflow changes and the separate formatter-target repair found no blocking regressions. Commit and push hooks passed. The 1.13 ruleset now requires its eight existing contexts, and latest-push approval is enabled for the main rollout.No linked issue — CI hardening, labelled
skip-pr-checks. Release-branch backport of #35426; merge this before #35426. Companion backports: #35433 (2.0), #37470 (2.1, replacing closed #36403). Already released patch branches need no separate backport.pull_request_targetalways runs the default branch's workflow file (GitHub behaviour since 2025-12-08), so PRs into1.13currently runmain'spull_request_targetcopies of these workflows;1.13's own copies never run. #35426 movesmain's copies topull_request, which reads the workflow from the PR's merge commit, i.e.1.13's own copies — and those still trigger only onpull_request_target. Without this backport,1.13PRs would stop reportingjava-checkstyle,py-checkstyleandpy-tests-status, all required by1.13.x-protection.This converts
1.13's own copies with the same rules as #35426 (ADR:2026-10-14-pr-code-never-runs-on-pull-request-targetonmain):pull_request_target→pull_request(ui-checkstyle already had apull_requesttrigger; its PRT trigger is dropped);labeleddropped; the "Wait for the labeler" / "Verify PR labels" gates and label clauses removed (ui-checkstyle'sauthorizejob folded into its path conditions).::error::annotation instead.workflow_dispatchof type generation for a fork PR stops before checking out the fork's code.maven-build-collatedispatches Collate the waymain's copy does, which is what1.13PRs get today: REST dispatch ofopenmetadata-dispatch.ymlon the Collate branch matching the base (Collate1.13, which takes the samesha/eventinputs), with a 5,700 s wait.1.13's own copy dispatched Collatemainthrough a name lookup that only reads the first page of Collate's workflows (30 of 71). PR runs keep reporting to Collate aspull_request_target.Files: integration-tests-mysql-elasticsearch, integration-tests-postgres-opensearch, playwright-postgresql-e2e, java-checkstyle, py-checkstyle, ui-checkstyle, validate-jsons-yamls, py-operator-build-test, maven-sonar-build, airflow-apis-tests, yarn-coverage, py-tests, py-tests-postgres, typescript-type-generation, maven-build-collate.
What changes for
1.13PRs: they run1.13's own versions of these workflows instead ofmain's, so the checks match the branch's code and tooling.py-checkstylehas been a skipped no-op on1.13PRs since fix(ci): skip Python checkstyle for 1.13 PRs #32245 (main's copy skipped1.13because its tooling did not fit); it now runs1.13's own checks and may surface existing drift.py-testsruns1.13's full unit and integration matrix for PRs that touch Python or the service.Required-check alignment: both existing Java integration lanes run on
pull_requestwithout label authorization.playwright-summaryreports on PRs, fails when an expected build or test run fails, and accepts only deliberate skips for drafts, unrelated paths, or PRs without cloud-connector secrets. Test-report writes skip fork and Dependabot PRs. The staleintegration-tests-postgres-elasticsearch-redisrequirement was removed from the ruleset because this branch has no such workflow. The remaining legacy target-only workflows are not required checks and remain inert under GitHub's default-branch execution rule.Type of change:
High-level design:
Same as #35426; see the rule list above.
Tests:
Use cases covered
1.13PR: the converted workflows run onpull_request;java-checkstyle,py-checkstyle,ui-checkstyle,checkstyleandpy-tests-statusreport.1.13PR: required checks report; secret-backed browser scenarios and privileged report/comment writes are explicitly skipped.Unit tests
python -m pytest .github/scripts/tests/test_pr_workflow_gates.py -q --tb=short: 15 passed. Trigger and summary-gate cases failed before the repair; report-write guard cases also failed before adding the origin checks. A Make dry-run regression also verifies that formatting and linting remain separate commands. The summary tests execute the actual workflow Bash for success, legitimate skips, build/test failure, cancellation, unexpected skips, and failed/missing change detection.Backend integration tests / Playwright
Full application suites and GitHub CI are pending. The workflow commands are preserved; this change repairs their trigger and required-result reporting.
Python formatting
Reproduced the existing isort failure, then applied the branch's pycln/isort/Black targets. The resulting 47 Python files preserve their syntax trees after normalizing import order; only two have an AST import-order difference. Full
make py_format_checkpasses over 2,323 files. The first new CI run confirmed that all formatters passed, then exposed a legacy Pylint 9.99/10 failure. The workflow explicitly defers linting until 10/10, sopy_format_checknow runs only its formatters; the existing standalonemake linttarget is unchanged. The new Make regression failed before this repair and passes afterward. Full application and GitHub CI remain pending.Manual testing performed
yaml.safe_loadon all 15 changed workflows.actionlintbefore/after on the same files: no new findings (58 → 54);maven-build-collate.ymlhas none.pull_request_targettrigger,labeledtype, label gate orallow-unsafe-pr-checkout; every step using a non-GITHUB_TOKENsecret or writing to the PR is gated for same-repo, non-Dependabot PRs.1.13's converted workflows on itself throughpull_request;main'spull_request_targetcopies also run until ci: run PR code on pull_request only and retire the safe to test label #35426 merges, so some check names appear twice.UI screen recording:
Not applicable — CI configuration only.
Checklist:
Fixes <issue-number>: <short explanation>— no linked issue; CI hardening, labelledskip-pr-checks.Fixes #<issue-number>above — see above.ADR:2026-10-14-pr-code-never-runs-on-pull-request-target(added onmainby ci: run PR code on pull_request only and retire the safe to test label #35426).🤖 Generated with Claude Code