From 5c3acd9baa2d21a4ec3cdd92b81e7d67cbad56ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Thu, 20 Nov 2025 17:15:51 -0800 Subject: [PATCH 1/2] refactor: Update CI workflow to support runpod>= versioning Changes: - Update grep pattern from runpod~= to runpod>= - Replace major.minor range logic with semantic version comparison - Add validation for current_version extraction - Update sed replacement to maintain >= operator - Workflow now triggers on any version increase (patch, minor, major) Previously, the workflow only updated for major.minor changes due to ~= (compatible release) constraint. Now with >=, all new releases are honored. --- .github/workflows/CI-runpod_dep.yml | 30 ++++++++++++++++------------- builder/requirements.txt | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI-runpod_dep.yml b/.github/workflows/CI-runpod_dep.yml index fa63c75..09028d8 100644 --- a/.github/workflows/CI-runpod_dep.yml +++ b/.github/workflows/CI-runpod_dep.yml @@ -21,8 +21,8 @@ jobs: run: | echo "Fetching the current runpod version from requirements.txt..." - # Get current version (supports '~=' versioning) - current_version=$(grep -oP 'runpod~=\K[^ ]+' ./builder/requirements.txt) + # Get current version (supports '>=' versioning) + current_version=$(grep -oP 'runpod>=\K[^ ]+' ./builder/requirements.txt) echo "Current version: $current_version" # Get new version from PyPI @@ -35,23 +35,27 @@ jobs: exit 1 fi - # Extract major and minor from current version (e.g., 1.7) - current_major_minor=$(echo $current_version | cut -d. -f1,2) - new_major_minor=$(echo $new_version | cut -d. -f1,2) - - echo "Current major.minor: $current_major_minor" - echo "New major.minor: $new_major_minor" + if [ -z "$current_version" ]; then + echo "ERROR: Failed to extract current version from requirements.txt." + exit 1 + fi - # Check if the new version is within the current major.minor range (e.g., 1.7.x) - if [ "$new_major_minor" = "$current_major_minor" ]; then - echo "No update needed. The new version ($new_version) is within the allowed range (~= $current_major_minor)." + # Compare versions using sort -V (version sort) + if [ "$current_version" = "$new_version" ]; then + echo "No update needed. Already at version $new_version." exit 0 fi - echo "New major/minor detected ($new_major_minor). Updating runpod version..." + # Check if new version is actually newer + newer_version=$(printf "%s\n%s" "$current_version" "$new_version" | sort -V | tail -n1) + if [ "$newer_version" = "$current_version" ]; then + echo "No update needed. Current version ($current_version) is already >= new version ($new_version)." + exit 0 + fi + echo "New version detected ($new_version > $current_version). Updating runpod version..." # Update requirements.txt with the new version while keeping '~=' - sed -i "s/runpod~=.*/runpod~=$new_version/" ./builder/requirements.txt + sed -i "s/runpod>=.*/runpod>=$new_version/" ./builder/requirements.txt echo "requirements.txt has been updated." - name: Create Pull Request diff --git a/builder/requirements.txt b/builder/requirements.txt index 40f9db2..99c5409 100644 --- a/builder/requirements.txt +++ b/builder/requirements.txt @@ -1,4 +1,4 @@ -runpod~=1.7.0 +runpod>=1.8.0 infinity-emb[all,onnxruntime-gpu]==0.0.53 einops # deployment of custom code with nomic git+https://github.com/pytorch-labs/float8_experimental.git@f7a920d2c53db8912f2a0c1d9040dbe71a88906d From edc43dff28c41f82527561074aaac88e4a4ad991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Thu, 20 Nov 2025 17:15:51 -0800 Subject: [PATCH 2/2] refactor: Update CI workflow to support runpod>= versioning Changes: - Update grep pattern from runpod~= to runpod>= - Replace major.minor range logic with semantic version comparison - Add validation for current_version extraction - Update sed replacement to maintain >= operator - Workflow now triggers on any version increase (patch, minor, major) Previously, the workflow only updated for major.minor changes due to ~= (compatible release) constraint. Now with >=, all new releases are honored. --- .github/workflows/CI-runpod_dep.yml | 30 ++++++++++++++++------------- requirements.txt | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI-runpod_dep.yml b/.github/workflows/CI-runpod_dep.yml index 18c8729..f8e6d9f 100644 --- a/.github/workflows/CI-runpod_dep.yml +++ b/.github/workflows/CI-runpod_dep.yml @@ -21,8 +21,8 @@ jobs: run: | echo "Fetching the current runpod version from requirements.txt..." - # Get current version (supports '~=' versioning) - current_version=$(grep -oP 'runpod~=\K[^ ]+' ./requirements.txt) + # Get current version (supports '>=' versioning) + current_version=$(grep -oP 'runpod>=\K[^ ]+' ./requirements.txt) echo "Current version: $current_version" # Get new version from PyPI @@ -35,23 +35,27 @@ jobs: exit 1 fi - # Extract major and minor from current version (e.g., 1.7) - current_major_minor=$(echo $current_version | cut -d. -f1,2) - new_major_minor=$(echo $new_version | cut -d. -f1,2) - - echo "Current major.minor: $current_major_minor" - echo "New major.minor: $new_major_minor" + if [ -z "$current_version" ]; then + echo "ERROR: Failed to extract current version from requirements.txt." + exit 1 + fi - # Check if the new version is within the current major.minor range (e.g., 1.7.x) - if [ "$new_major_minor" = "$current_major_minor" ]; then - echo "No update needed. The new version ($new_version) is within the allowed range (~= $current_major_minor)." + # Compare versions using sort -V (version sort) + if [ "$current_version" = "$new_version" ]; then + echo "No update needed. Already at version $new_version." exit 0 fi - echo "New major/minor detected ($new_major_minor). Updating runpod version..." + # Check if new version is actually newer + newer_version=$(printf "%s\n%s" "$current_version" "$new_version" | sort -V | tail -n1) + if [ "$newer_version" = "$current_version" ]; then + echo "No update needed. Current version ($current_version) is already >= new version ($new_version)." + exit 0 + fi + echo "New version detected ($new_version > $current_version). Updating runpod version..." # Update requirements.txt with the new version while keeping '~=' - sed -i "s/runpod~=.*/runpod~=$new_version/" ./requirements.txt + sed -i "s/runpod>=.*/runpod>=$new_version/" ./requirements.txt echo "requirements.txt has been updated." - name: Create Pull Request diff --git a/requirements.txt b/requirements.txt index 9812a81..0c2c330 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -runpod~=1.7.0 +runpod>=1.8.0 infinity-emb[all]==0.0.76 einops # deployment of custom code with nomic git+https://github.com/pytorch-labs/float8_experimental.git