From 19110c117b50c0c63aedb13dd98168be5b66da25 Mon Sep 17 00:00:00 2001 From: Bikash Shaw Date: Wed, 19 Aug 2026 10:21:10 +0530 Subject: [PATCH 1/3] OPCT-454: skip dependency waiter when no blocker plugin configured In upgrade mode, OPCT CLI sets PLUGIN_BLOCKED_BY to empty in the collector manifest template (plugins 10/20/80 are skipped). However, the wait-updater Go code ignores the --blocker flag and uses the hardcoded BlockerPlugins from NewPlugin(), causing the collector to poll indefinitely for a non-existent plugin 80 pod. Fix at two layers: - wait-updater.go: early return when --blocker is empty - entrypoint-collector.sh: skip wait-updater call when PLUGIN_BLOCKED_BY is empty Co-Authored-By: bshaw7 --- artifacts-collector/entrypoint-collector.sh | 4 ++++ openshift-tests-plugin/cmd/exec/wait-updater.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/artifacts-collector/entrypoint-collector.sh b/artifacts-collector/entrypoint-collector.sh index d70844b..9f32f88 100755 --- a/artifacts-collector/entrypoint-collector.sh +++ b/artifacts-collector/entrypoint-collector.sh @@ -51,6 +51,10 @@ ${UTIL_OC_BIN} login "${KUBE_API_INT}" \ PROGRESS=( ["completed"]=0 ["total"]=${CERT_TEST_COUNT} ["failures"]="" ["msg"]="starting..." ) watch_dependency_done() { os_log_info "[watch_dependency] Starting dependency check..." + if [[ -z "${PLUGIN_BLOCKED_BY}" ]]; then + os_log_info "[watch_dependency] No blocker plugins configured, skipping" + return + fi for blocker_plugin_name in "${PLUGIN_BLOCKED_BY[@]}"; do os_log_info "waiting for plugin [${blocker_plugin_name}]" diff --git a/openshift-tests-plugin/cmd/exec/wait-updater.go b/openshift-tests-plugin/cmd/exec/wait-updater.go index 98d3792..f788b0d 100644 --- a/openshift-tests-plugin/cmd/exec/wait-updater.go +++ b/openshift-tests-plugin/cmd/exec/wait-updater.go @@ -54,6 +54,13 @@ func NewCmdWaitUpdater() *cobra.Command { // Check the API and watch for done file. func StartWaitUpdater(opts *OptionsWaitUpdate) error { + // When --blocker is empty (e.g. upgrade mode), skip the dependency + // waiter entirely — there is no plugin to wait for. + if opts.BlockerPlugin == "" { + log.Infof("No blocker plugin specified, skipping dependency waiter for %s", opts.PluginName) + return nil + } + pl, err := plugin.NewPlugin(opts.PluginName) if err != nil { return fmt.Errorf("unable to create plugin %s: %w", opts.PluginName, err) From 51291f3888b4bcbbe8abdaaf34845f4052095de4 Mon Sep 17 00:00:00 2001 From: Bikash Shaw Date: Wed, 19 Aug 2026 11:00:52 +0530 Subject: [PATCH 2/3] OPCT-454: override hardcoded BlockerPlugins with --blocker flag NewPlugin() hardcodes BlockerPlugins in its switch statement, ignoring the --blocker flag passed from PLUGIN_BLOCKED_BY env var. Override the hardcoded value after plugin creation so the OPCT CLI template controls which plugin the collector waits for in upgrade mode. Co-Authored-By: Claude Opus 4.6 (1M context) --- openshift-tests-plugin/cmd/exec/wait-updater.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openshift-tests-plugin/cmd/exec/wait-updater.go b/openshift-tests-plugin/cmd/exec/wait-updater.go index f788b0d..f686012 100644 --- a/openshift-tests-plugin/cmd/exec/wait-updater.go +++ b/openshift-tests-plugin/cmd/exec/wait-updater.go @@ -54,8 +54,6 @@ func NewCmdWaitUpdater() *cobra.Command { // Check the API and watch for done file. func StartWaitUpdater(opts *OptionsWaitUpdate) error { - // When --blocker is empty (e.g. upgrade mode), skip the dependency - // waiter entirely — there is no plugin to wait for. if opts.BlockerPlugin == "" { log.Infof("No blocker plugin specified, skipping dependency waiter for %s", opts.PluginName) return nil @@ -67,6 +65,14 @@ func StartWaitUpdater(opts *OptionsWaitUpdate) error { } defer pl.Done() + // Override hardcoded BlockerPlugins with the --blocker flag value, + // so the OPCT CLI template controls which plugin to wait for. + blocker, err := plugin.NewPlugin(opts.BlockerPlugin) + if err != nil { + return fmt.Errorf("unable to create blocker plugin %s: %w", opts.BlockerPlugin, err) + } + pl.BlockerPlugins = []*plugin.Plugin{blocker} + if err = pl.Initialize(); err != nil { return fmt.Errorf("unable to initialize plugin %s: %w", opts.PluginName, err) } From e413762aaaaed85da259d8812fe73405b3b4d06a Mon Sep 17 00:00:00 2001 From: Bikash Shaw Date: Wed, 19 Aug 2026 13:45:18 +0530 Subject: [PATCH 3/3] OPCT-454: fix PluginFullNameByName to handle alias inputs When wait-updater passes full plugin name like 05-openshift-cluster-upgrade, PluginFullNameByName() didnt recognize it and returned -05-openshift-cluster-upgrade (leading minus), breaking pod label lookup. Fix: return alias directly when input already contains plugin ID prefix. --- openshift-tests-plugin/pkg/plugin/plugin.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openshift-tests-plugin/pkg/plugin/plugin.go b/openshift-tests-plugin/pkg/plugin/plugin.go index c8c6e5f..3404f62 100644 --- a/openshift-tests-plugin/pkg/plugin/plugin.go +++ b/openshift-tests-plugin/pkg/plugin/plugin.go @@ -186,12 +186,22 @@ func (p *Plugin) PluginFullNameByName(name string) string { switch name { case PluginName05: id = PluginId05 + case PluginAlias05: + return PluginAlias05 case PluginName10: id = PluginId10 + case PluginAlias10: + return PluginAlias10 case PluginName20: id = PluginId20 + case PluginAlias20: + return PluginAlias20 case PluginName80: id = PluginId80 + case PluginAlias80: + return PluginAlias80 + case PluginAlias99: + return PluginAlias99 } return fmt.Sprintf("%s-%s", id, name) }