fix(renovate): enable Renovate version tracking for DCGM AzureLinux 3.0#8276
fix(renovate): enable Renovate version tracking for DCGM AzureLinux 3.0#8276
Conversation
….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>
There was a problem hiding this comment.
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
extractVersionregex 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>[^\"]+)\")?" |
There was a problem hiding this comment.
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.
| "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\")}]}" |
There was a problem hiding this comment.
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.
| "{\"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\")}]}" |
| }, | ||
| { | ||
| "customType": "regex", | ||
| "description": "auto update Nvidia DCGM packages for OS AzureLinux 3.0 in components.json", |
There was a problem hiding this comment.
why specific for DCGM ? and not generic to azurelinux3 ? something doesnt seem right here.
What this PR does / why we need it:
Fixes Renovate skipping Azure Linux 3.0 version bumps for DCGM packages (
datacenter-gpu-manager-4-coreanddatacenter-gpu-manager-4-proprietary). Three issues were identified and resolved: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.jsonhad arenovateTagwithRPM_registry=...prefix and arepository=nvidiafield that didn't match the generic AzureLinux 3.0 RPM regex (which expectedname=immediately followed by, os=azurelinux). This PR adds a dedicated custom regex manager pointing to a newnvidia-rpm-azl3custom datasource that scrapes the NVIDIA AzL3 HTML directory listing for available RPM versions.Wrong
renovateTagformat incomponents.json: The DCGM AzureLinux entries included anRPM_registry=prefix referencing the/repodatapath, but NVIDIA's repo doesn't use standard RPM repodata XML — it's an HTML directory listing. TheRPM_registry=prefix is removed since the registry URL is now hardcoded in thenvidia-rpm-azl3custom datasource'sdefaultRegistryUrlTemplate.Python-style named groups in
extractVersionregexes: Two pre-existingextractVersionentries (foross/binaries/kubernetes/*andoss/v2/kubernetes/*-sysext) used Python-style(?P<version>...)named groups instead of JavaScript/RE2-style(?<version>...). Renovate's regex engine (RE2 viauhop/node-re2) does not support(?P<...>)syntax, causingconfig-validationerrors that aborted the entire lookup phase (lookup: 0ms), preventing version updates for all packages — not just DCGM.Changes
.github/renovate.json:nvidia-rpm-azl3custom datasource withformat: "html"and a JSONata transform that filters RPM filenames, excludesdebuginfovariants, and prepends the1:epoch prefixdatasourceTemplate: "custom.nvidia-rpm-azl3"andversioningTemplate: "deb"(to handle epoch-prefixed versions)extractVersionon line 528:(?P<version>...)→(?<version>...)extractVersionon line 538:(?P<version>...)→(?<version>...)parts/common/components.json:RPM_registry=https://developer.download.nvidia.com/compute/cuda/repos/azl3/x86_64/repodata,prefix fromrenovateTagfordatacenter-gpu-manager-4-coreAzureLinux 3.0 entrydatacenter-gpu-manager-4-proprietaryAzureLinux 3.0 entryVerification
Tested locally with
LOG_LEVEL=debug npx renovate --platform=local --dry-run=lookup:config-validation)nvidia-rpm-azl3datasource fetches the NVIDIA HTML directory and resolves versions correctlyWhich issue(s) this PR fixes:
Inspired by: #8221 (review) and #8220 (review)