Add speculative build support: auto-detect and source staging - #91
Conversation
14823b1 to
77dfb5b
Compare
77dfb5b to
fd37ed7
Compare
|
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
|
recheck |
fd37ed7 to
7ecf7e8
Compare
aac5d56 to
e833596
Compare
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
|
Build failed (check pipeline). Post ✔️ s2i-openstack-containers-molecule SUCCESS in 1m 56s |
e833596 to
a7983a9
Compare
|
Build failed (check pipeline). Post ✔️ s2i-openstack-containers-molecule SUCCESS in 2m 07s |
a7983a9 to
8a95c4a
Compare
0c0c76a to
6e7f529
Compare
Add a consumer smoke Zuul job that validates the content provider contract on a fresh consumer node: registry access, image pull, image inspection, and deployment key resolution. Add a unit test validating deployment keys in image-mappings.yaml against OpenStackVersion.spec.customContainerImages fields (covers both ContainerTemplate and ContainerDefaults structs). Depends-On: openstack-k8s-operators#91 Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Add a consumer smoke Zuul job that validates the content provider contract on a fresh consumer node: registry access, image pull, image inspection, and deployment key resolution. Add a unit test validating deployment keys in image-mappings.yaml against OpenStackVersion.spec.customContainerImages fields (covers both ContainerTemplate and ContainerDefaults structs). Depends-On: openstack-k8s-operators#91 Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2fa33e5 to
c6ab223
Compare
|
recheck |
c6ab223 to
72119aa
Compare
Move the speculative watcher consumer off the late pre_tests OpenStackVersion patch and onto cifmw_set_containers_images so images are injected before the control plane deploys. Add opendev-watcher-s2i-pipeline for Gerrit openstack/watcher only; the shared edpm template also covers watcherclient and tempest-plugin. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
Move the speculative watcher consumer off the late pre_tests OpenStackVersion patch and onto cifmw_set_containers_images so images are injected before the control plane deploys. Fold the s2i provider and deploy jobs into opendev-watcher-edpm-pipeline so RDO config does not need a second template. Limit those jobs to watcher/ source paths so python-watcherclient and watcher-tempest-plugin keep EDPM-only. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
|
recheck |
Add a consumer smoke Zuul job that validates the content provider contract on a fresh consumer node: registry access, image pull, image inspection, and deployment key resolution. Add a unit test validating deployment keys in image-mappings.yaml against OpenStackVersion.spec.customContainerImages fields (covers both ContainerTemplate and ContainerDefaults structs). Depends-On: openstack-k8s-operators#91 Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
recheck |
Inject s2i-built watcher images through cifmw_set_containers_images during edpm_prepare so they land in OpenStackVersion before the control plane deploys. github-check uses the non-meta operator content provider for operator images and appends the s2i registry as an extra insecure registry so CRC can pull both the operator catalog and watcher service images. Fold the s2i provider and deploy jobs into opendev-watcher-edpm-pipeline and limit them to watcher/ source paths so python-watcherclient and watcher-tempest-plugin keep EDPM-only. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
8d8876f to
fba8457
Compare
Inject s2i-built cinder images through cifmw_set_containers_images during edpm_prepare so they land in OpenStackVersion before the control plane deploys. github-check keeps the operator content provider for the catalog and appends the s2i registry so CRC can pull both. cinder-volume is applied as cinderVolumeImages.volume1 because OpenStackVersion stores volume backends as a map. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the Zuul buildset registry with a plain Docker registry:2 container running on host network. This eliminates SSH tunnels, TLS negotiation, SELinux workarounds, and ownership tracking, matching the plain-registry pattern used by the standard OpenStack content provider. Add speculative build support so CI pipelines can automatically rebuild only the images affected by an upstream OpenStack patch: - `build.sh auto-detect <project> [stream]` scans sources.txt files to find which container images reference a given project. Uses exact URL-path matching to avoid false positives. - `build.sh list-sources <image> [stream]` lists source dependencies as pipe-delimited records for Ansible consumption. - Zuul playbooks resolve `s2i_ci_images: auto` by querying the change queue, then stage patched source checkouts into container build contexts before the build runs. Access the change queue with `zuul['items']` (bracket notation). Jinja `zuul.items` is dict.items() and is not iterable, which crashes Ansible during auto-detect. Zuul canonical names (`opendev.org/openstack/tempest`) do not match `sources.txt` paths (`openstack/tempest`). Pass `project.name` into auto-detect, also accept host/org/repo canonical names as a fallback, and map those short paths onto `zuul.projects` keys when staging speculative sources. Queue items with no image mapping (e.g. ci-framework Depends-On) stay non-fatal; auto-detect still fails if no project maps to an image. Add an abstract Zuul job (s2i-speculative-deploy-test-base) for operator repos to wire deploy+validate pipelines with minimal boilerplate. Consumer jobs rely on ci-framework edpm_prepare to apply s2i_content_provider_os_custom_container_images via set_containers before the control plane is deployed. CRC trusts the s2i registry through content_provider_registry_ip, which merge-patches insecureRegistries and creates the list when it is missing. Add s2i-openstack-deploy-validation, a concrete job that deploys OpenStack with mapped s2i-built images applied to OpenStackVersion during edpm_prepare and runs a Tempest smoke suite. Wired as non-voting in github-check to gate update-sources bumps on real deployment validation without requiring the operator content provider. Expand containers/image-mappings.yaml so nova, neutron, cinder, swift, ovn, and infra images reach OpenStackVersion. Backend maps (cinderVolumeImages, manilaShareImages) and services s2i does not build (nova-compute, placement) stay on operator defaults. Extract build/push logic into includable tasks files so the config repo can delegate build and push operations via include_tasks without exposing quay credentials to untrusted code. Pass REGISTRY_AUTH_FILE through so buildah/podman reuse the trusted wrapper's auth file. Keep GitHub Actions push-on-merge until the Zuul github-post publish job in the config repo is live; workflow_dispatch remains available for manual runs. Fix auto-detect to only return the specific image whose sources.txt matched when the match is at the image level, rather than all images under the project. Fix list-sources to include image-level sources.txt when called at the project level, and deduplicate entries that appear in multiple sources files. Add command documentation to build.sh usage output for resolve, refs, and install-deps. Port auto-detect and list-sources tests from Python to bash, matching existing test patterns. Related-Issue: RHOSRFE-466 Co-Authored-By: Sean Mooney <work@seanmooney.info> Assisted-By: Claude (Anthropic) Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
fba8457 to
70b32dc
Compare
Inject s2i-built cinder images through cifmw_set_containers_images during edpm_prepare so they land in OpenStackVersion before the control plane deploys. github-check keeps the operator content provider for the catalog and appends the s2i registry so CRC can pull both. cinder-volume is applied as cinderVolumeImages.volume1 because OpenStackVersion stores volume backends as a map. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
Add cinder-s2i-content-provider (child of the s2i content provider) and cinder-s2i-tempest (child of cinder-operator-tempest) so github-check builds s2i cinder images and applies them through cifmw_set_containers_images during edpm_prepare. Keep the operator content provider for the catalog and append the s2i registry so CRC can pull both. cinder-volume is applied as cinderVolumeImages.volume1 because OpenStackVersion stores volume backends as a map. Depends-On: openstack-k8s-operators/s2i-openstack-containers#91 Depends-On: openstack-k8s-operators/ci-framework#4131 Co-authored-by: Cursor <cursoragent@cursor.com>
|
/lgtm |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rebtoor 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 |
66f9b45
into
openstack-k8s-operators:main
Summary
Overhaul the s2i content provider: plain Docker registry, speculative
build automation, quay push infrastructure, and OpenStackVersion-based
deployment validation.
1. Plain Docker registry (replaces Zuul buildset registry)
Replace the complex buildset registry setup — which required TLS
certificates, SSH tunnel management, SELinux
:Zvolume workarounds,and ownership tracking — with a plain
registry:2container on hostnetwork. This matches the plain-registry pattern used by the standard
OpenStack content provider.
2. Speculative build support (auto-detect + source staging)
Enable CI pipelines to automatically rebuild only the images affected
by an upstream OpenStack patch:
build.sh auto-detect <project> [stream]— scanssources.txtfiles to determine which images reference a given project. Exact
URL-path matching prevents false positives.
build.sh list-sources <image> [stream]— lists sourcedependencies as pipe-delimited records for Ansible consumption.
resolve-auto-images.yamlresolvess2i_ci_images: autoby inspecting the Zuul change queue;stage-zuul-sources.yamlcopies patched sources into containerbuild contexts.
Auto-detect reads the queue via
zuul['items'](bracket access;Jinja
zuul.itemsis dict.items and is not iterable).3. Consumer job foundation
s2i-speculative-deploy-test-base— abstract Zuul job foroperator repos to wire deploy+validate pipelines. s2i-built images
from the content provider are passed as
cifmw_set_containers_imagesand applied to OpenStackVersion during
edpm_prepare(ci-frameworkset_containers, PR 4131).CRC trusts the s2i registry via
content_provider_registry_ip.containers/image-mappings.yamlmaps s2i targets toOpenStackVersion
customContainerImagesfields, including nova,neutron, cinder, swift, ovn, and infra. Backend maps
(
cinderVolumeImages,manilaShareImages) and services s2i doesnot build (nova-compute, placement) stay on operator defaults.
4. Deployment validation
s2i-openstack-deploy-validation— concrete job that deploysOpenStack with mapped s2i-built images applied during
edpm_prepareand runs a Tempest smoke suite. Wired as non-voting in
github-checkto validate
update-sourcesbumps on real deployments.5. Quay push infrastructure
(
push-to-quay-build-tasks.yaml,push-to-quay-push-tasks.yaml,prepare-host-tasks.yaml) so the config repo can delegate viainclude_taskswithout exposing quay credentials to untrusted code.REGISTRY_AUTH_FILEis passed through tobuild.sh.github-postpublish job in the config repo is live.
workflow_dispatchremainsavailable for manual runs.
6. Bug fixes and improvements
auto-detectover-matching: when an image-levelsources.txtmatches, only that specific image is returned (not all siblings).
list-sourcesto include image-level sources when called at theproject level, and deduplicate entries across multiple sources files.
auto-detectandlist-sourcestests from Python to bash,matching the existing
test_build.sh/test_update_sources.shpatterns.build.shusage output forresolve,refs, andinstall-deps.Other changes
zuul.d/fromansible-lint.Test plan
tox -e linterspassestox -e testpasses (includes auto-detect and list-sources tests)s2i-openstack-deploy-validationdeploys and runs tempest smokes2i-openstack-container-build-pushpushes to quay.io(gated on the config-repo publish job landing)
Depends-On: openstack-k8s-operators/ci-framework#4131