Skip to content

fix(renovate): enable Renovate version tracking for DCGM AzureLinux 3.0#8276

Open
surajssd wants to merge 1 commit intomainfrom
fix/renovate-azurelinux-dcgm-tag
Open

fix(renovate): enable Renovate version tracking for DCGM AzureLinux 3.0#8276
surajssd wants to merge 1 commit intomainfrom
fix/renovate-azurelinux-dcgm-tag

Conversation

@surajssd
Copy link
Copy Markdown
Member

@surajssd surajssd commented Apr 10, 2026

What this PR does / why we need it:

Fixes Renovate skipping Azure Linux 3.0 version bumps for DCGM packages (datacenter-gpu-manager-4-core and datacenter-gpu-manager-4-proprietary). Three issues were identified and resolved:

  1. Missing DCGM AzureLinux regex manager: When DCGM packages were originally added in Add NVIDIA DCGM packages and repository support #7063, only Ubuntu 22.04 and 24.04 Renovate managers were created. The Azure Linux 3.0 entries in components.json had a renovateTag with RPM_registry=... prefix and a repository=nvidia field that didn't match the generic AzureLinux 3.0 RPM regex (which expected name= immediately followed by , os=azurelinux). This PR adds a dedicated custom regex manager pointing to a new nvidia-rpm-azl3 custom datasource that scrapes the NVIDIA AzL3 HTML directory listing for available RPM versions.

  2. Wrong renovateTag format in components.json: The DCGM AzureLinux entries included an RPM_registry= prefix referencing the /repodata path, but NVIDIA's repo doesn't use standard RPM repodata XML — it's an HTML directory listing. The RPM_registry= prefix is removed since the registry URL is now hardcoded in the nvidia-rpm-azl3 custom datasource's defaultRegistryUrlTemplate.

  3. Python-style named groups in extractVersion regexes: Two pre-existing extractVersion entries (for oss/binaries/kubernetes/* and oss/v2/kubernetes/*-sysext) used Python-style (?P<version>...) named groups instead of JavaScript/RE2-style (?<version>...). Renovate's regex engine (RE2 via uhop/node-re2) does not support (?P<...>) syntax, causing config-validation errors that aborted the entire lookup phase (lookup: 0ms), preventing version updates for all packages — not just DCGM.

Changes

  • .github/renovate.json:
    • Add nvidia-rpm-azl3 custom datasource with format: "html" and a JSONata transform that filters RPM filenames, excludes debuginfo variants, and prepends the 1: epoch prefix
    • Add dedicated custom regex manager for DCGM AzureLinux 3.0 packages using datasourceTemplate: "custom.nvidia-rpm-azl3" and versioningTemplate: "deb" (to handle epoch-prefixed versions)
    • Fix extractVersion on line 528: (?P<version>...)(?<version>...)
    • Fix extractVersion on line 538: (?P<version>...)(?<version>...)
  • parts/common/components.json:
    • Remove RPM_registry=https://developer.download.nvidia.com/compute/cuda/repos/azl3/x86_64/repodata, prefix from renovateTag for datacenter-gpu-manager-4-core AzureLinux 3.0 entry
    • Remove same prefix from datacenter-gpu-manager-4-proprietary AzureLinux 3.0 entry

Verification

Tested locally with LOG_LEVEL=debug npx renovate --platform=local --dry-run=lookup:

  • Extract phase successfully matches both DCGM AzureLinux packages
  • Lookup phase completes (no longer aborted by config-validation)
  • nvidia-rpm-azl3 datasource fetches the NVIDIA HTML directory and resolves versions correctly

Which issue(s) this PR fixes:

Inspired by: #8221 (review) and #8220 (review)

….0 packages

- Add dedicated custom regex manager and `nvidia-rpm-azl3` custom datasource
for `datacenter-gpu-manager-4-core` and `datacenter-gpu-manager-4-proprietary`
on AzureLinux 3.0, scraping the NVIDIA HTML directory listing
- Remove `RPM_registry=` prefix from DCGM AzureLinux `renovateTag` entries in
`components.json` since NVIDIA's repo uses HTML format, not RPM repodata
- Fix `extractVersion` regexes using Python-style `(?P<version>...)` named
groups to JavaScript/RE2-style `(?<version>...)`, which caused
`config-validation` errors aborting the entire lookup phase

Signed-off-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com>
Copilot AI review requested due to automatic review settings April 10, 2026 23:24
@github-actions github-actions bot added the components This pull request updates cached components on Linux or Windows VHDs label Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Enables Renovate to properly track and bump NVIDIA DCGM package versions for Azure Linux 3.0 by adding a dedicated regex manager + custom HTML datasource, and fixing invalid named-group syntax that was aborting lookups.

Changes:

  • Add a custom Renovate datasource (nvidia-rpm-azl3) to scrape NVIDIA’s AzL3 HTML repo listing and expose RPM versions.
  • Add a dedicated regex manager to update DCGM AzL3 entries in parts/common/components.json.
  • Fix extractVersion regex named groups to use RE2/JS syntax ((?<version>...)), unblocking Renovate lookup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
parts/common/components.json Removes RPM_registry=... prefix from DCGM AzL3 renovate tags so the new dedicated manager/datasource can match.
.github/renovate.json Fixes invalid regex group syntax and adds a new custom datasource + regex manager for DCGM AzL3 RPM version detection.

],
"matchStringsStrategy": "any",
"matchStrings": [
"\"renovateTag\":\\s*\"name=(?<packageName>datacenter-gpu-manager-4-core|datacenter-gpu-manager-4-proprietary), repository=nvidia, os=azurelinux, release=3\\.0\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depType is being used as a capture for previousLatestVersion (apparently just to detect presence), which is misleading and makes the regex harder to understand/maintain. Consider renaming the group to something semantic like previousLatestVersion (and update the {{#if ...}} conditional accordingly), or change the optional part to a non-capturing presence check if you only need a boolean.

Copilot uses AI. Check for mistakes.
"defaultRegistryUrlTemplate": "https://developer.download.nvidia.com/compute/cuda/repos/azl3/x86_64/",
"format": "html",
"transformTemplates": [
"{\"releases\": [releases[$contains(version, \"{{packageName}}-\") and $contains(version, \".x86_64.rpm\") and $not($contains(version, \"debuginfo\")) and $match($substringAfter(version, \"{{packageName}}-\"), /^[0-9]/)].{\"version\": \"1:\" & $substringBefore($substringAfter(version, \"{{packageName}}-\"), \".x86_64.rpm\")}]}"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transform hard-codes an epoch prefix (\"1:\" & ...) for all returned versions. If NVIDIA ever changes the epoch (or removes it), Renovate will start producing incorrect versions and could get stuck or create noisy PRs. Prefer deriving the epoch from the source (if present), or avoid hard-coding by using an appropriate versioning scheme (e.g., RPM versioning if it supports epochs in your setup) and returning the raw version string from the filename.

Suggested change
"{\"releases\": [releases[$contains(version, \"{{packageName}}-\") and $contains(version, \".x86_64.rpm\") and $not($contains(version, \"debuginfo\")) and $match($substringAfter(version, \"{{packageName}}-\"), /^[0-9]/)].{\"version\": \"1:\" & $substringBefore($substringAfter(version, \"{{packageName}}-\"), \".x86_64.rpm\")}]}"
"{\"releases\": [releases[$contains(version, \"{{packageName}}-\") and $contains(version, \".x86_64.rpm\") and $not($contains(version, \"debuginfo\")) and $match($substringAfter(version, \"{{packageName}}-\"), /^[0-9]/)].{\"version\": $substringBefore($substringAfter(version, \"{{packageName}}-\"), \".x86_64.rpm\")}]}"

Copilot uses AI. Check for mistakes.
},
{
"customType": "regex",
"description": "auto update Nvidia DCGM packages for OS AzureLinux 3.0 in components.json",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why specific for DCGM ? and not generic to azurelinux3 ? something doesnt seem right here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components This pull request updates cached components on Linux or Windows VHDs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants