Skip to content

[CP 1553] fix(tests): clean up orphaned DRA DeviceClass before GPU Operator hel…#585

Open
ci-penbot-01 wants to merge 1 commit into
ROCm:mainfrom
ci-penbot-01:CP.O2O.pensando.gpu-operator.1553.rocm.gpu-operator.main
Open

[CP 1553] fix(tests): clean up orphaned DRA DeviceClass before GPU Operator hel…#585
ci-penbot-01 wants to merge 1 commit into
ROCm:mainfrom
ci-penbot-01:CP.O2O.pensando.gpu-operator.1553.rocm.gpu-operator.main

Conversation

@ci-penbot-01

Copy link
Copy Markdown
Contributor

cp of pensando/gpu-operator#1553

…… (#1553)

* fix(tests): clean up orphaned DRA DeviceClass before GPU Operator helm install

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(tests): clean up orphaned DRA DeviceClass and stale DRA helm release before migration test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Vyoma Sadhu <vysadhu@SCSVYSADHU01.amd.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 147890957cc264243122da812b6189ad2dfc98dc)
@ci-penbot-01

Copy link
Copy Markdown
Contributor Author

AI-Assisted Cherry-Pick

Source PR: #1553
Target Branch: main

The cherry-pick operation encountered merge conflicts which were resolved automatically using AI assistance.

Files with conflicts (resolved by AI):

  • tests/pytests/k8/conftest.py:117-121
  • tests/pytests/k8/dra-driver/test_dra_migration.py:88-94
Original conflict in tests/pytests/k8/conftest.py
<<<<<<< ours (deleted)
=======
    for api_version in ("v1", "v1beta2", "v1beta1"):
        ret_code, _, _ = k8_util.k8_delete_custom_resource("resource.k8s.io", api_version, "deviceclasses", "", "gpu.amd.com")
        if ret_code == 0:
            Logger.warning("Deleted pre-existing DeviceClass 'gpu.amd.com' before helm install")
        break
>>>>>>> 14789095 (fix(tests): clean up orphaned DRA DeviceClass before GPU Operator hel… (#1553))
Original conflict in tests/pytests/k8/dra-driver/test_dra_migration.py
<<<<<<< ours (deleted)
=======
    # DRA sanity tests (test_dra_driver_uninstall) reinstall the DRA chart at teardown.
    # Uninstall it here so Step 2's helm_install does not fail with "release already exists".
    if helm_util.is_helm_chart_deployed(gpu_cluster, dra_driver_release_name, dra_driver_namespace):
        Logger.warning(f"Stale DRA release '{dra_driver_release_name}' found — uninstalling before migration test")
        ret_code, _, ret_stderr = helm_util.helm_uninstall(gpu_cluster, dra_driver_release_name, dra_driver_namespace)
        if ret_code != 0:
            helm_util.helm_cleanup(gpu_cluster, dra_driver_release_name, dra_driver_namespace)
>>>>>>> 14789095 (fix(tests): clean up orphaned DRA DeviceClass before GPU Operator hel… (#1553))

Cherry-pick triggered by: ACP-Automation

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.

2 participants