Skip to content

Commit 2a9bf12

Browse files
authored
Report installed packages when testing built wheels (#1821)
Closes ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing/index.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. ## Summary by CodeRabbit * **Chores** * Enhanced CI to always collect and archive per-build diagnostic package listings and per-test reports, improving post-build debugging and visibility even when individual test steps fail. * Added guaranteed report generation and artifact upload at pipeline completion to make build outputs more discoverable and reliable. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Will Killian (https://github.com/willkill07) - https://github.com/mnajafian-nv URL: #1821
1 parent 1db487d commit 2a9bf12

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/ci_pipe.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,15 @@ jobs:
209209
shell: bash
210210
run: ./nat/ci/scripts/github/build_wheel.sh
211211

212+
- name: Upload Package Reports
213+
uses: actions/upload-artifact@v6
214+
if: ${{ always() }}
215+
with:
216+
name: "package_listings"
217+
path: "${{ github.workspace }}/tmp/package_listings.tar.bz2"
218+
if-no-files-found: error
219+
compression-level: 0
220+
212221
- name: Upload Wheels
213222
uses: actions/upload-artifact@v6
214223
with:

ci/scripts/github/build_wheel.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ GITHUB_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd
2121
source ${GITHUB_SCRIPT_DIR}/common.sh
2222
WHEELS_BASE_DIR="${WORKSPACE_TMP}/wheels"
2323
WHEELS_DIR="${WHEELS_BASE_DIR}/nvidia-nat"
24+
PIP_REPORTS_DIR="${WORKSPACE_TMP}/pip_reports"
25+
mkdir -p "${PIP_REPORTS_DIR}"
2426

2527
GIT_TAG=$(get_git_tag)
2628
rapids-logger "Git Version: ${GIT_TAG}"
@@ -57,6 +59,18 @@ deactivate
5759
TEMP_INSTALL_LOCATION="${WORKSPACE_TMP}/wheel_test_env"
5860
install_python_versions
5961

62+
function create_package_report_tarball() {
63+
local tarball_path="${WORKSPACE_TMP}/package_listings.tar.bz2"
64+
tar -cjf "${tarball_path}" -C "${PIP_REPORTS_DIR}" .
65+
66+
# Clean out the reports directory, in CI this doesn't have an impact, but if running locally it prevents old
67+
# reports from being included in future tarballs
68+
rm -rf "${PIP_REPORTS_DIR}"
69+
echo "${tarball_path}"
70+
}
71+
72+
trap create_package_report_tarball EXIT
73+
6074
for whl in "${MOVED_WHEELS[@]}"; do
6175

6276
for pyver in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do
@@ -76,6 +90,10 @@ for whl in "${MOVED_WHEELS[@]}"; do
7690
UV_PIP_OUT=$(uv pip install -q --prerelease=allow --find-links "${WHEELS_BASE_DIR}" "${whl}" 2>&1)
7791
INSTALL_RESULT=$?
7892

93+
# Report the packages in the environment regardless of install success
94+
rapids-logger "Installed wheel ${whl} with Python ${pyver}, pip install exit code ${INSTALL_RESULT}"
95+
uv pip list --format json > "${PIP_REPORTS_DIR}/$(basename "${whl}" .whl)_py${pyver}_packages.json"
96+
7997
if [[ ${INSTALL_RESULT} -ne 0 ]]; then
8098
rapids-logger "Error, failed to install wheel ${whl} with Python ${pyver}"
8199
echo "${UV_PIP_OUT}"
@@ -119,3 +137,5 @@ for whl in "${MOVED_WHEELS[@]}"; do
119137
rm -rf "${TEMP_INSTALL_LOCATION}"
120138
done
121139
done
140+
141+
exit 0

0 commit comments

Comments
 (0)