Add a Zuul image content provider - #85
Conversation
|
Build failed (check pipeline). Post ❌ s2i-openstack-containers-molecule FAILURE in 1m 46s |
fe199c2 to
dcf1db1
Compare
dcf1db1 to
d744294
Compare
Enable the s2i content provider to automatically determine which images to build based on the triggering Zuul project, and to stage patched source checkouts from the Zuul workspace into container build contexts. This is a lightweight alternative to the OIB Python package from PR openstack-k8s-operators#49, implementing only the two features needed for RHOSRFE-466 (speculative testing of upstream OpenStack changes): 1. `build.sh auto-detect <project> [stream]` — scans sources.txt files to find which container images reference a given upstream project. Uses exact URL-path matching to avoid false positives (e.g., openstack/watcher does not match openstack/watcher-tempest-plugin). 2. Ansible playbooks for Zuul integration: - resolve-auto-images.yaml: resolves `s2i_ci_images: auto` by running auto-detect for each changed project in the Zuul queue. - stage-zuul-sources.yaml: copies Zuul-checked-out source repos into container src/ directories for speculative builds. Depends-On: openstack-k8s-operators#85 Related-Issue: RHOSRFE-466 Co-Authored-By: Sean Mooney <smooney@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
14823b1 to
d744294
Compare
Enable the s2i content provider to automatically determine which images to build based on the triggering Zuul project, and to stage patched source checkouts from the Zuul workspace into container build contexts. This is a lightweight alternative to the OIB Python package from PR openstack-k8s-operators#49, implementing only the two features needed for RHOSRFE-466 (speculative testing of upstream OpenStack changes): 1. `build.sh auto-detect <project> [stream]` — scans sources.txt files to find which container images reference a given upstream project. Uses exact URL-path matching to avoid false positives (e.g., openstack/watcher does not match openstack/watcher-tempest-plugin). 2. Ansible playbooks for Zuul integration: - resolve-auto-images.yaml: resolves `s2i_ci_images: auto` by running auto-detect for each changed project in the Zuul queue. - stage-zuul-sources.yaml: copies Zuul-checked-out source repos into container src/ directories for speculative builds. Depends-On: openstack-k8s-operators#85 Related-Issue: RHOSRFE-466 Co-Authored-By: Sean Mooney <work@seanmooney.info> Assisted-By: Claude (Anthropic) Co-authored-by: Cursor <cursoragent@cursor.com>
Enable the s2i content provider to automatically determine which images to build based on the triggering Zuul project, and to stage patched source checkouts from the Zuul workspace into container build contexts. This is a lightweight alternative to the OIB Python package from PR openstack-k8s-operators#49, implementing only the two features needed for RHOSRFE-466 (speculative testing of upstream OpenStack changes): 1. `build.sh auto-detect <project> [stream]` — scans sources.txt files to find which container images reference a given upstream project. Uses exact URL-path matching to avoid false positives (e.g., openstack/watcher does not match openstack/watcher-tempest-plugin). 2. Ansible playbooks for Zuul integration: - resolve-auto-images.yaml: resolves `s2i_ci_images: auto` by running auto-detect for each changed project in the Zuul queue. - stage-zuul-sources.yaml: copies Zuul-checked-out source repos into container src/ directories for speculative builds. Depends-On: openstack-k8s-operators#85 Related-Issue: RHOSRFE-466 Co-Authored-By: Sean Mooney <work@seanmooney.info> Assisted-By: Claude (Anthropic) Co-authored-by: Cursor <cursoragent@cursor.com>
amoralej
left a comment
There was a problem hiding this comment.
Change in build.sh seems correct to me. See my coments about the new python tests. I'd suggest to port them to the bash based testing script, at least the ones testing build.sh.
WRT the new zuul job. I checked the new job is properly building the containers and exposing in registry and logs gathering is good. The logic seems good for the provider jobs and i think we can refine as follow-up if needed.
After merging, once we check the new job is working fine, i think we may replace the existing build job in gha by this one which is faster.
d744294 to
7d8d9ab
Compare
Rebase and rework the content provider from PR openstack-k8s-operators#66 onto the current main branch. The provider builds and publishes OpenStack service container images to a Zuul buildset registry so that dependent jobs can consume exact image references. Changes from the original PR openstack-k8s-operators#66: - Drop the "Make source updates atomic" commit (keep existing test_update_sources.sh per amoralej's feedback). - Drop the "Standardize lock generation on Python 3.12" commit (already merged as part of PR openstack-k8s-operators#80). - Remove auto-base insertion from resolve_targets() as requested by amoralej; the caller is now responsible for including base. - Drop openssl-libs from watcher (transitive, already in UBI). - Remove hardcoded watcher entrypoint validation from the shared run playbook (SeanMooney ack'd). Review feedback addressed: - Compute buildset registry container name as a fact once instead of repeating the expression 4 times (rebtoor). - Add SELinux workaround comment explaining the container remove/recreate sequence (rebtoor). - Record socat tunnel PID in the ownership marker and kill by PID in post-run instead of using fragile pgrep patterns (rebtoor). - Document the "null" string sentinel in content-provider-return explaining why it cannot be actual null (rebtoor). - Increase test_provider_shell.py parallel output deadline from 5s to 30s to avoid CI flakiness (rebtoor). Co-Authored-By: Sean Mooney <work@seanmooney.info> Assisted-By: Claude (Anthropic) Co-authored-by: Cursor <cursoragent@cursor.com>
7d8d9ab to
a454ce7
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amoralej The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b78ba60
into
openstack-k8s-operators:main
Summary
Rebase and rework the content provider from #66 onto the current
mainbranch, addressing all review feedback.
images to a Zuul buildset registry, pauses, and returns exact image
references via
zuul_returnfor dependent jobs to consume.REGISTRY_AUTH_FILE/REGISTRY_CERT_DIR),refs/resolveCLI commands, comma-separated target union with dedup,improved parallel build logging (live
tee+sedprefix, PID-trackedwait -n -p).provider-contractscenario exercising registry andcleanup contracts.
test_provider_architecture.py(contract validation) andtest_provider_shell.py(build.sh behavior).Changes from the original #66
resolve_targets()openssl-libsin watcherReview feedback addressed
"null"string sentinel documented in content-provider-return (rebtoor)test_provider_shell.pyparallel output deadline increased to 30s (rebtoor)Test plan
tox -e moleculepasses the provider-contract scenariopython -m pytest tests/test_provider_architecture.py tests/test_provider_shell.pypassesgithub-checkpipeline runs molecule + content-provider jobsMade with Cursor