Skip to content

Make source updates atomic - #63

Open
SeanMooney wants to merge 2 commits into
openstack-k8s-operators:mainfrom
SeanMooney:split/pr14-atomic-source-updates
Open

Make source updates atomic#63
SeanMooney wants to merge 2 commits into
openstack-k8s-operators:mainfrom
SeanMooney:split/pr14-atomic-source-updates

Conversation

@SeanMooney

@SeanMooney SeanMooney commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preflight and freeze all selected source refs before tracked mutation
  • retain exact fetched objects for the complete update operation
  • record source authority in a deterministic frozen-reference manifest
  • update selected source manifests atomically
  • replace the shell harness with stdlib unittest coverage

Validation

  • uvx --python 3.13 tox -e unit (24 passed)
  • commit-time pre-commit checks
  • git diff --check

Dependency

Depends on replacement PR #80. This PR targets main directly and temporarily shows #80's prerequisite commit until #80 merges.

tests/test_reproducibility_architecture.py remains absent, matching the corrected #80 boundary.

Comment thread tox.ini
[testenv:{unit,test,py3}]
description = Run all non-Ansible tests through stdlib unittest
commands =
python -m unittest discover -s {toxinidir}/tests -p 'test_*.py' -v {posargs}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about moving tests to python for the same reasons that having build.sh itself in bash. I think we should move testing framework to python when/if we move build.sh to python.

@amoralej

Copy link
Copy Markdown
Contributor

BTW, Wrong branch too.

@SeanMooney
SeanMooney changed the base branch from split/pr14-python312-locks to main August 14, 2026 14:30
@SeanMooney
SeanMooney force-pushed the split/pr14-atomic-source-updates branch from 0a14e6a to e3ffe11 Compare August 14, 2026 14:30
@SeanMooney
SeanMooney force-pushed the split/pr14-atomic-source-updates branch from e3ffe11 to 5221408 Compare August 14, 2026 14:50
@openshift-ci

openshift-ci Bot commented Aug 14, 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 yazug 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

Dependency markers are evaluated by the Python interpreter running the
resolver. Allowing different Python minor versions and unpinned generator
tools therefore produces host-dependent lock files and noisy generator
metadata.

Require Python 3.12 for source and lock generation, pin the resolver tools,
and normalize annotations, headers, and index configuration from generated
locks. Add a pinned-source reproducibility workflow and architecture checks,
then regenerate the tracked lock files with the canonical environment.

Assisted-By: Pi gpt-5.6-sol
Signed-off-by: Sean Mooney <work@seanmooney.info>
(cherry picked from commit d28af26)
Source maintenance currently resolves and applies repositories one at a time.
A late failure can therefore leave tracked source pins partially updated, and
a moving branch can provide different content during one invocation.

Preflight every selected source record and freeze each effective commit before
tracked mutation. Retain the fetched objects for the complete run, record their
authority in a deterministic manifest, and install source updates atomically.
Replace the shell test harness with the existing stdlib unittest coverage for
failure isolation, stream safety, checkout ownership, and multi-target scope.

Assisted-By: Pi gpt-5.6-sol
Signed-off-by: Sean Mooney <work@seanmooney.info>
(cherry picked from commit 0a14e6a)
@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants