Uploaded image for project: 'Red Hat Advanced Cluster Security'
  1. Red Hat Advanced Cluster Security
  2. ROX-30388

patch-csv.py cannot handle nightly version strings

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Build and release
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False

      USER PROBLEM
      What is the user experiencing as a result of the bug? Include steps to reproduce.

      Fast stream nightly builds are failing with an error in `patch-csv.py`, which cannot handle version strings such as `4.9.x-nightly-20250730-fast` due to the `x` in the version.

      Traceback (most recent call last):
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 244, in <module>
          main()
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 233, in main
          patch_csv(doc,
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 81, in patch_csv
          replaced_xyz = calculate_replaced_version(
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 135, in calculate_replaced_version
          current_xyz = XyzVersion.parse_from(version)
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 21, in parse_from
          x, y, z = (int(c) for c in version_str.split('-', maxsplit=1)[0].split('.'))
        File "/stackrox/operator/./bundle_helpers/patch-csv.py", line 21, in <genexpr>
          x, y, z = (int(c) for c in version_str.split('-', maxsplit=1)[0].split('.'))
      ValueError: invalid literal for int() with base 10: 'x'
      

      CONDITIONS
      What conditions need to exist for a user to be affected? Is it everyone? Is it only those with a specific integration? Is it specific to someone with particular database content? etc.

      • Version strings that contain letters (e.g. 4.9.x)

      ROOT CAUSE
      What is the root cause of the bug?

      • The XyzVersion.parse_from method on line 21 tries to convert 'x' to an integer

      FIX
      How was the bug fixed (this is more important if a workaround was implemented rather than an actual fix)?

      • pending

              Unassigned Unassigned
              rh-ee-vbologa Vlad Bologa
              ACS Install
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: