Skip to content

[ci] Relock staged sources without advancing pins - #153

Open
rebtoor wants to merge 1 commit into
openstack-k8s-operators:mainfrom
rebtoor:sync-locks-speculative
Open

[ci] Relock staged sources without advancing pins#153
rebtoor wants to merge 1 commit into
openstack-k8s-operators:mainfrom
rebtoor:sync-locks-speculative

Conversation

@rebtoor

@rebtoor rebtoor commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Speculative content-provider builds stage Zuul-patched src/ trees, then still compile against the committed requirements.lock.<stream>. That mismatch is what fails jobs like heat openstack-check when a staged change raises a lower bound past the lock (for example oslo.versionedobjects>=3.12.0 vs lock 3.11.0).

Reusing update-sources would refresh constraints, but it also clones unstaged sibling repos at branch tip and rewrites sources.txt. This change adds build.sh sync-locks:

  • Refresh upper-constraints.txt.<stream> from the stream branch tip, or from a Zuul openstack/requirements checkout (REQUIREMENTS_SRC) when one is in the buildset.
  • Leave staged src/ in place; clone missing siblings at the committed pin.
  • Regenerate requirements.lock.<stream> and buildrequirements.lock.<stream> from current src/*/requirements.txt.
  • Do not rewrite sources.txt or rpms.in.yaml.

The content provider runs tox -e sync-locks only when sources were actually staged, using ensure-tox from zuul-jobs.

Test plan

  • tests/test_update_sources.sh sync-locks cases (pins preserved, UC from tip / REQUIREMENTS_SRC, clone-at-pin, staged tree kept, no rpms.in.yaml, default-stream symlinks)
  • Zuul content-provider job with a staged service that needs a newer constraint than the committed lock
  • Confirm a no-stage content-provider run skips sync-locks

Speculative builds stage Zuul-patched src/ then still compile against
committed requirements.lock.<stream>. Reusing update-sources would
refresh constraints but also clone unstaged siblings at branch tip and
rewrite sources.txt. Add sync-locks to refresh upper-constraints, clone
missing sources at the committed pin, and regenerate lockfiles from the
current src trees.

Assisted-By: Cursor
@openshift-ci

openshift-ci Bot commented Aug 31, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign stuggi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rebtoor
rebtoor requested review from amoralej, elfiesmelfie and fmount and removed request for amoralej August 31, 2026 09:39
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.

1 participant