Skip to content

Enforce object ownership for more citus-internal UDFs (Backport #8587 to release-12.1) - #8626

Merged
ihalatci merged 2 commits into
release-12.1from
backport-8587-release-12.1
Jun 30, 2026
Merged

Enforce object ownership for more citus-internal UDFs (Backport #8587 to release-12.1)#8626
ihalatci merged 2 commits into
release-12.1from
backport-8587-release-12.1

Conversation

@ihalatci

Copy link
Copy Markdown
Contributor

Backport of #8587 to release-12.1.

Cherry-picked (-x) the security fix that enforces object ownership for more citus-internal UDFs. Author (Onur Tirtir) preserved.

Adaptations for 12.1

  • Resolved a cherry-pick conflict and adapted the SQL regression test for schema renames present on this branch.
  • Mapped the 13.2 C API EnsureCitusInitiatedOperation() to the 12.1 equivalent EnsureCoordinatorInitiatedOperation().

Verification

  • Native build on PG 16.14 (WSL): GREEN.
  • Affected regressions: 9/9 PASS, no regression.diffs.

Original PR: #8587

DESCRIPTION: Enforces object-ownership for more citus-internal UDFs for
security.

Backported to release-12.1 with the following adaptations:
- Mapped EnsureCitusInitiatedOperation() to the release-12.1 equivalent
  EnsureCoordinatorInitiatedOperation() in citus_internal_add_tenant_schema and
  citus_internal_delete_tenant_schema. The 13.x EnsureCitusInitiatedOperation()
  ("from any node") guard does not exist in 12.1; these UDFs only run their
  metadata work locally on the coordinator, and the coordinator-initiated guard
  emits the identical error in the out-of-distributed-transaction case.
- Adapted the metadata_sync_helpers regression test to the flat
  pg_catalog.citus_internal_<name> UDF naming used in release-12.1 (13.x uses a
  dedicated citus_internal schema) and regenerated its expected output.

(cherry picked from commit 10c3a8b)
(cherry picked from commit 96feb25)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ihalatci ihalatci added this to the 12.1.13 milestone Jun 29, 2026
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.64%. Comparing base (377c1f2) to head (edfba75).
⚠️ Report is 4 commits behind head on release-12.1.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-12.1    #8626      +/-   ##
================================================
- Coverage         89.65%   89.64%   -0.01%     
================================================
  Files               276      276              
  Lines             59790    59851      +61     
  Branches           7471     7480       +9     
================================================
+ Hits              53605    53656      +51     
- Misses             4041     4047       +6     
- Partials           2144     2148       +4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ihalatci added a commit that referenced this pull request Jun 30, 2026
…1) (#8629)

## Problem
The 1ES self-hosted pool (`1es-gha-citusdata-pool`) is no longer
dispatching jobs, so the **required** `check-arbitrary-configs` jobs sit
`QUEUED` indefinitely. This blocks **every** open release-12.1 PR
(#8519, #8328, #8306, #8626, #8627) from merging despite all other
required checks passing.

## Fix
Flip the `test-arbitrary-configs` job's `runs-on` from the dead
self-hosted 1ES pool to `ubuntu-latest` — a one-line backport of the
config already shipping on `main`.

## Why it is safe
- `main` already runs this exact job/suite/container on `ubuntu-latest`.
- Required-check **names** (`PG14 - check-arbitrary-configs-0`, ...)
derive from the job `name:`, not `runs-on`, so branch protection is
unaffected.
- AC was the **only** job still pinned to the self-hosted pool;
everything else already runs github-hosted.

## Rollout
Merge this first, then "Update branch" on the 5 open PRs so they inherit
the fix and their AC checks run on github-hosted runners.

Unblocks the release-12.1 serial-merge queue.

Co-authored-by: Ibrahim Halatci <ihalatci@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ihalatci
ihalatci merged commit cfdd98c into release-12.1 Jun 30, 2026
120 checks passed
@ihalatci
ihalatci deleted the backport-8587-release-12.1 branch June 30, 2026 13:45
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