Skip to content

Use sourceRegistry from deps.yaml for sorbet/drctl in ctst Dockerfile#2353

Merged
bert-e merged 1 commit intodevelopment/2.14from
improvement/ZENKO-5220/fix-ctst-sourceregistry
Mar 19, 2026
Merged

Use sourceRegistry from deps.yaml for sorbet/drctl in ctst Dockerfile#2353
bert-e merged 1 commit intodevelopment/2.14from
improvement/ZENKO-5220/fix-ctst-sourceregistry

Conversation

@delthas
Copy link
Contributor

@delthas delthas commented Mar 16, 2026

Summary

  • The ctst Dockerfile hardcoded ghcr.io/scality as the registry for sorbet and drctl images, ignoring the sourceRegistry field in deps.yaml
  • Extract the full image path (sourceRegistry + image) from deps.yaml using yq in the workflow, pass it as Docker build args
  • The Dockerfile now uses SORBET_IMAGE and DRCTL_IMAGE ARGs with backward-compatible defaults

Why inline yq rather than a shared helper

The sourceRegistry + "/" + image extraction pattern is already duplicated across 13 call sites in 7 files, each with slightly different needs (with/without tag, with/without docker.io fallback, iterating all images vs. a single named image). Here is the full picture:

Existing sourceRegistry extraction patterns

File Function yq pattern docker.io fallback Includes tag Call stack
solution/kafka_build_vars.sh:10 get_image_from_deps() .$dep_name | .sourceRegistry + "/" + .image Yes No end2end.yaml:320 (build-kafka job)
solution/build.sh:87 flatten_source_images() .* | select(.image) | .sourceRegistry + "/" + .image + ":" + .tag Yes Yes end2end.yaml:280 (build-iso job)
solution/build.sh:98 dependencies_versions_env() .[] | select(.image) | .envsubst + "=" + .image No registry at all No end2end.yaml:280 (build-iso job)
solution/build.sh:226 get_component_dashboards() .* | select(.dashboard) | .sourceRegistry + "/" + .dashboard + ":" + .tag No Yes build-iso job
solution/build.sh:243 copy_iam_policies() .* | select(.policy) | .sourceRegistry + "/" + .policy + ":" + .tag No Yes build-iso job
solution/build.sh:255 copy_config() .* | select(.config) | .sourceRegistry + "/" + .config + ":" + .tag No Yes build-iso job
solution/build.sh:356 download_tools() .[] | .sourceRegistry + "/" + .image + ":" + .tag No Yes build-iso job
solution-base/build.sh:67 flatten_source_images() .* | .sourceRegistry + "/" + .image + ":" + .tag Yes Yes install-kind-dependencies.sh:211
install-kind-dependencies.sh:236 get_image_from_deps() .$dep_name | .sourceRegistry + "/" + .image + ":" + .tag Yes Yes deploy action
deploy-zenko.sh:58 dependencies_image_env() .[] | .envsubst + "=" + .sourceRegistry + "/" + .image Yes No deploy action
deploy-zenko.sh:64 dependencies_dashboard_env() .[] | .envsubst + "=" + .sourceRegistry + "/" + .dashboard Yes No deploy action
deploy-zenko.sh:70 dependencies_policy_env() .[] | .envsubst + "=" + .sourceRegistry + "/" + .policy Yes No deploy action
deploy-zenko.sh:76 dependencies_config_env() .[] | .envsubst + "=" + .sourceRegistry + "/" + .config Yes No deploy action
deploy-zkop.sh:5 inline ."zenko-operator" | .sourceRegistry + "/" + .image No No deploy action

Each function builds the string slightly differently depending on its needs. Refactoring all 13 sites into a shared helper would be a separate effort. This PR adds one more inline call, consistent with the existing deploy-zkop.sh style (no docker.io fallback, no tag — both sorbet and drctl always have sourceRegistry defined in deps.yaml).

Consolidating the duplication into a shared utility could be done in a follow-up PR.

Fixes ZENKO-5220

@bert-e
Copy link
Contributor

bert-e commented Mar 16, 2026

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Mar 16, 2026

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@delthas delthas requested review from a team, SylvainSenechal and maeldonn March 16, 2026 10:54
@delthas delthas force-pushed the improvement/ZENKO-5220/fix-ctst-sourceregistry branch from 00492a6 to 31774ab Compare March 16, 2026 10:56
The ctst Dockerfile hardcoded ghcr.io/scality as the registry for sorbet
and drctl images, ignoring the sourceRegistry field in deps.yaml. This
meant changing sourceRegistry (e.g. to a playground fork) had no effect
on CI test builds.

Extract the full image path (sourceRegistry + image) from deps.yaml
using yq in the workflow, and pass it as Docker build args. The
Dockerfile now uses SORBET_IMAGE and DRCTL_IMAGE ARGs with
backward-compatible defaults.

Issue: ZENKO-5220
@delthas delthas force-pushed the improvement/ZENKO-5220/fix-ctst-sourceregistry branch from 31774ab to 02b8b4a Compare March 18, 2026 08:16
@francoisferrand
Copy link
Contributor

/after_pull_request=2357

@bert-e
Copy link
Contributor

bert-e commented Mar 18, 2026

Waiting for other pull request(s)

The current pull request is locked by the after_pull_request option.

In order for me to merge this pull request, run the following actions first:

➡️ Merge the OPEN pull request:

Alternatively, delete all the after_pull_request comments from this pull request.

The following options are set: after_pull_request, approve

@scality scality deleted a comment from delthas Mar 18, 2026
@bert-e
Copy link
Contributor

bert-e commented Mar 18, 2026

Waiting for other pull request(s)

The current pull request is locked by the after_pull_request option.

In order for me to merge this pull request, run the following actions first:

➡️ Merge the OPEN pull request:

Alternatively, delete all the after_pull_request comments from this pull request.

The following options are set: after_pull_request

@bert-e bert-e merged commit dc663bb into development/2.14 Mar 19, 2026
27 of 28 checks passed
@bert-e bert-e deleted the improvement/ZENKO-5220/fix-ctst-sourceregistry branch March 19, 2026 02:27
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.

5 participants