Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-78461

Refactor infraUtils.stageWrapper if/else chain to data-driven routing

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • CNV QE DevOps
    • None
    • None

      Issue
      infraUtils.stageWrapper uses a long if/else chain on env.STAGE_NAME to decide behavior. This is hard to extend and not data-driven.

      Steps to reproduce
      1. Review stageWrapper() in vars/infraUtils.groovy.
      2. Observe repeated stage name comparisons and body() calls.

      Expected result
      Stage handling is data-driven using a set/map of special stage names or a strategy map.

      Actual result
      Hard-coded if/else chain controls stage behavior.

      Plan

      • Introduce a Set of stage names that skip labels or require special handling.
      • Replace if/else chain with membership checks and a default path.
      • Document the list and provide a single place to add new stage rules.

              dkeler@redhat.com Daniel Keler
              lbednar@redhat.com Lukas Bednar
              Daniel Keler Daniel Keler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: