Skip to content

fix(testkit): honor SDS module pull override env on StorageClass enable#49

Open
AleksZimin wants to merge 3 commits into
mainfrom
fix/testkit-sds-module-pull-override
Open

fix(testkit): honor SDS module pull override env on StorageClass enable#49
AleksZimin wants to merge 3 commits into
mainfrom
fix/testkit-sds-module-pull-override

Conversation

@AleksZimin

Copy link
Copy Markdown
Member

Summary

pkg/testkit.CreateDefaultStorageClass re-enables sds-node-configurator and
sds-local-volume to provision the default StorageClass. It passed no
ModulePullOverride, so on a dev registry configureModulePullOverride reset
their ModulePullOverride to main on the first provision — clobbering any
pr<N>/mr<N> image a suite had pinned at bring-up via
SDS_LOCAL_VOLUME_MODULE_PULL_OVERRIDE / SDS_NODE_CONFIGURATOR_MODULE_PULL_OVERRIDE.

This wires each backend's per-module <MODULE>_MODULE_PULL_OVERRIDE env var into
the runtime enable (new unexported helper moduleImageTagFromEnv, delegating to
config.EnvKeyForModulePullOverride), so the runtime tag stays consistent with
the bring-up tag. The <MODULE>_MODULE_PULL_OVERRIDE contract now holds
end-to-end for the SDS storage backends, whether they are enabled in
cluster_config.yml or enabled lazily by CreateDefaultStorageClass.

Why

The generic <MODULE>_MODULE_PULL_OVERRIDE channel already lets suites pin a
module image at config load. But for the two SDS backends that testkit enables
at runtime, that pinned tag was silently overwritten with main the moment the
StorageClass was provisioned — the env override only half-worked. This is the
missing half so a suite (e.g. state-snapshotter e2e) can actually run its
volume-data flow against a pr<N> sds-local-volume image.

Behavior

  • Unset env var → helper returns "", i.e. the pre-existing main default.
    No behavior change for existing suites (pure no-op).
  • Set env var → the same tag is applied at both bring-up and the runtime
    re-enable, so no clobber.
  • No public API change (only an unexported helper + an existing exported
    function's internal wiring); docs/ARCHITECTURE.md env-var table updated.

CreateDefaultStorageClass re-enables sds-node-configurator and sds-local-volume
to provision the default StorageClass. It passed no ModulePullOverride, so on a
dev registry configureModulePullOverride reset their MPO to "main" on the first
provision, clobbering any pr<N>/mr<N> image a suite pinned at bring-up via
SDS_*_MODULE_PULL_OVERRIDE.

Read each module's per-module <MODULE>_MODULE_PULL_OVERRIDE env var (new
moduleImageTagFromEnv helper) so the runtime tag stays consistent with the
bring-up tag; an unset var yields "" (the existing "main" default), a no-op.

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
@AleksZimin AleksZimin self-assigned this Jul 10, 2026
@AleksZimin
AleksZimin requested a review from fastrapier July 10, 2026 06:19
@github-code-quality

github-code-quality Bot commented Jul 10, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Go

Go / code-coverage/go

The overall coverage remains at 22%, unchanged from the branch.


Updated July 13, 2026 00:31 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@AleksZimin
AleksZimin marked this pull request as ready for review July 10, 2026 06:24
The worklog rule (.cursor/rules/worklog.mdc) and docs/WORKLOG.md were
removed; clean up the remaining dangling references so no rule still
points at a worklog that no longer exists:
- todo-command: remove the "append a worklog entry" step
- backward-compatibility: record the [Possible compatibility break] flag
  in the commit message / PR description instead of the worklog

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
The setup VM is named "<DefaultSetupVM.Hostname><unix-ts>" via plain
concatenation (CreateVirtualMachines), i.e. "bootstrap-node<ts>" with no
separator. The cloud-init selector matched the prefix "bootstrap-node-"
(trailing hyphen), so it never matched and the setup node was provisioned
with the regular node cloud-init (no docker.io). Step 9 (Wait for Docker on
setup node) then failed with 'sudo: docker: command not found', breaking
alwaysCreateNew bootstrap. Match "bootstrap-node" (no hyphen).

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Health
github.com/deckhouse/storage-e2e/internal/cluster 0%
github.com/deckhouse/storage-e2e/internal/config 56%
github.com/deckhouse/storage-e2e/internal/infrastructure/ssh 0%
github.com/deckhouse/storage-e2e/internal/infrastructure/ssh/v2 80%
github.com/deckhouse/storage-e2e/internal/kubernetes/clusterlock 75%
github.com/deckhouse/storage-e2e/internal/kubernetes/commander 49%
github.com/deckhouse/storage-e2e/internal/kubernetes/deckhouse 0%
github.com/deckhouse/storage-e2e/internal/kubernetes/kubeaccess 78%
github.com/deckhouse/storage-e2e/internal/kubernetes/storage 0%
github.com/deckhouse/storage-e2e/internal/kubernetes/virtualization 0%
github.com/deckhouse/storage-e2e/internal/logger 53%
github.com/deckhouse/storage-e2e/internal/provisioning/commander 15%
github.com/deckhouse/storage-e2e/internal/provisioning/dvp 61%
github.com/deckhouse/storage-e2e/internal/provisioning/dvp/vm 78%
github.com/deckhouse/storage-e2e/pkg/cluster 4%
github.com/deckhouse/storage-e2e/pkg/clusterprovider 89%
github.com/deckhouse/storage-e2e/pkg/clusterprovider/registry 100%
github.com/deckhouse/storage-e2e/pkg/e2e 30%
github.com/deckhouse/storage-e2e/pkg/e2e/conformance 0%
github.com/deckhouse/storage-e2e/pkg/kubernetes 5%
github.com/deckhouse/storage-e2e/pkg/retry 94%
github.com/deckhouse/storage-e2e/pkg/storage-e2e 0%
github.com/deckhouse/storage-e2e/pkg/testkit 5%
Summary 22% (3428 / 15370)

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