Uploaded image for project: 'AI Platform Core Components'
  1. AI Platform Core Components
  2. AIPCC-11078

[opendatahub-io/base-containers] tox strips PYTHON_VERSION / CUDA_VERSION from the environment, causing version validation tests to silently skip

    • False
    • Hide

      None

      Show
      None
    • False
    • DP Sprint 27

      [3990752948] Upstream Reporter: smoparth
      Upstream issue status: Open
      Upstream description:

      The [testenv:test] section in tox.ini only passes PYTHON_IMAGE and CUDA_IMAGE through to the test process. PYTHON_VERSION and CUDA_VERSION are not listed in passenv, so tox's environment isolation strips them out, even when explicitly exported in the shell.
      The version validation tests silently skip every time.

      smoparth@smoparth-mac base-containers % PYTHON_VERSION=3.12 CUDA_VERSION=12.8 tox -e test
      test: install_deps> python -I -m pip install '.[test]'
      test: commands[0]> pytest tests/ -v
      ========================== test session starts ==========================
      platform darwin – Python 3.12.9, pytest-9.0.2, pluggy-1.6.0 – /Users/smoparth/redhat/learning/forks/base-containers/.tox/test/bin/python
      cachedir: .tox/test/.pytest_cache
      rootdir: /Users/smoparth/redhat/learning/forks/base-containers
      configfile: pyproject.toml
      collected 68 items

      tests/test_common.py::test_python_version[python_container] SKIPPED [ 1%]
      tests/test_common.py::test_python_version[cuda_container] SKIPPED [ 2%]

      Fix: Add both variables to passenv in the [testenv:test] section of tox.in

              rh-ee-shikhan Shifa Khan
              upstream-sync Upstream Sync
              Antonio's Team
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: