Skip to content

Fix nondeterministic simple API package ordering - #1396

Merged
ggainey merged 2 commits into
pulp:mainfrom
gerrod3:cx/deterministic-simple-index
Sep 22, 2026
Merged

ggainey merged 2 commits into
pulp:mainfrom
gerrod3:cx/deterministic-simple-index

Conversation

@gerrod3

@gerrod3 gerrod3 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a stable secondary ordering for project names in the simple API query.
  • Order package releases by normalized name and filename.
  • Prevent nondeterministic output when metadata names canonicalize to the same project name.

This carries over the publish.py change from TenSt/pulp_python commit ccae248a91bfc505b48e302db9829435d2b06d2a only.

Tests

  • source ~/devel/pulp/bin/activate && ruff check pulp_python/app/tasks/publish.py
  • Targeted functional test attempted through oci-env; the test reached the publication assertion path but the generated internal HTTPS content URL refused the connection (ConnectionRefusedError).

Summary by CodeRabbit

  • Improvements
    • Project names now appear in a stable, predictable order when normalized names overlap.
    • Package releases are sorted consistently by name and filename.
    • S3 storage configuration now uses the RustFS-compatible endpoint for supported deployments.
    • Build and validation workflows have been updated for more consistent package verification and current Python versions.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7c89b80c-ce97-4134-8e43-958bc93ba96c

📥 Commits

Reviewing files that changed from the base of the PR and between b2754bf and bf452bd.

📒 Files selected for processing (19)
  • .ci/ansible/inventory.yaml
  • .ci/ansible/start_container.yaml
  • .ci/assets/ci_constraints.txt
  • .ci/scripts/calc_constraints.py
  • .ci/scripts/pr_labels.py
  • .ci/scripts/skip_tests.py
  • .ci/scripts/validate_commit_message.py
  • .github/workflows/build.yml
  • .github/workflows/ci.yml
  • .github/workflows/pr_checks.yml
  • .github/workflows/sanity.yml
  • .github/workflows/scripts/before_install.sh
  • .github/workflows/scripts/build_python_client.sh
  • .github/workflows/scripts/check_commit.sh
  • .github/workflows/scripts/script.sh
  • .github/workflows/scripts/update_backport_labels.py
  • .github/workflows/test.yml
  • .github/workflows/update-labels.yml
  • template_config.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The publish task now uses deterministic secondary sort keys. CI scripts use inline metadata and uv execution. Package builds, Python versions, constraints, and S3 test infrastructure were updated. MinIO references were replaced with rustfs.

Changes

Publish and CI workflow updates

Layer / File(s) Summary
Stable publish ordering
pulp_python/app/tasks/publish.py
Project names sort by normalized name and raw name. Releases sort by normalized name and filename.
CI script execution and runtime metadata
.ci/scripts/*, .github/workflows/ci.yml, .github/workflows/pr_checks.yml, .github/workflows/sanity.yml, .github/workflows/test.yml, .github/workflows/update-labels.yml, .github/workflows/scripts/check_commit.sh, .github/workflows/scripts/update_backport_labels.py
Scripts declare Python and dependency requirements. Workflows use Python 3.12 or 3.14 where specified and run scripts with uv run --script. Unneeded dependency-installation steps were removed.
Package builds and version constraints
.ci/assets/ci_constraints.txt, .ci/scripts/calc_constraints.py, .github/workflows/build.yml, .github/workflows/scripts/build_python_client.sh, .github/workflows/scripts/script.sh
Package builds use uv build and uvx twine check. The Python client documentation artifact is no longer built or uploaded. Pulpcore constraint handling uses updated branches and filtering.
rustfs CI storage configuration
.ci/ansible/*, .github/workflows/scripts/before_install.sh, template_config.yml
CI storage configuration uses rustfs credentials, service names, images, and endpoints instead of MinIO. Component-version lookup reads pyproject.toml directly.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Suggested reviewers: pulpbot

Merge Risk: ⚪ Minimal · up to bf452

The PR makes package publication deterministic and updates CI tooling and storage configuration without a demonstrated merge-blocking production risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 10 files. (10 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: fixing nondeterministic package ordering in the Simple API.
Description check ✅ Passed The description clearly summarizes the ordering changes and reports both the Ruff validation and the blocked functional test. It omits the repository checklist, but the core change and validation deta…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 10 files. (10 skipped: 10 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

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

Add stable secondary ordering for project names and package filenames when generating the Python simple API.\n\nAssisted-by: AI (Codex)
@gerrod3
gerrod3 force-pushed the cx/deterministic-simple-index branch from b2754bf to bf452bd Compare September 22, 2026 15:56
@github-actions github-actions Bot added the multi-commit Add to bypass single commit lint check label Sep 22, 2026
@ggainey
ggainey merged commit 0dc1ac2 into pulp:main Sep 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-commit Add to bypass single commit lint check no-changelog no-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants