Skip to content

[DRAFT]: Modeling splitting out API into its own module - #2802

Draft
aryangorwade wants to merge 8 commits into
NVIDIA:mainfrom
aryangorwade:aryan-api-module-split
Draft

[DRAFT]: Modeling splitting out API into its own module#2802
aryangorwade wants to merge 8 commits into
NVIDIA:mainfrom
aryangorwade:aryan-api-module-split

Conversation

@aryangorwade

Copy link
Copy Markdown
Contributor

Description

This is a sample PR demonstrating what splitting /api into a standalone module would look like. As described in this design doc, this would serve to fix GPU Operator versioning issues (Go only allows v0.x.y and v1.x.y).

This architectural split involves:

  • Moving dependencies external to api/ into /api to avoid circular imports
  • Splitting API into its standalone module with its own go.mod and go.sum; root go.mod references this module now

CI checks introduced:

  • PR check ensuring shared module dependencies stay in sync
  • Post-release (after tagging) check ensuring compiled binary versions match tags
  • PR check ensuring version bump PRs do not reference preexisting API tags (checks for "operator", "version", "bump" in PR title)

Changes to CI pipeline:

  • Modified .nvidia-ci.yaml and .common-ci.yaml to ensure that tagging a release commit with operator and api tags does not cause a separate release process to trigger for the api tag in addition to the operator tag

Dependabot changes:

  • Modified dependabot.yaml using group-by: dependency-name and a cross-directory pattern to update each shared dependency between both modules in one PR (one PR per dependency; for both modules). Note that groups such as k8s.io/* can be created, resulting in one cross-directory PR for all deps under k8s.io/*.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)

Testing

None done yet as this is a sample PR.

@aryangorwade aryangorwade self-assigned this Aug 25, 2026
Relocate shared image path logic and NVIDIADriver constants so api/ no longer imports root internal packages ahead of becoming a standalone Go module.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
@aryangorwade
aryangorwade force-pushed the aryan-api-module-split branch 4 times, most recently from 7a5c3ae to 4223159 Compare August 25, 2026 21:25
Give API consumers a Go-compatible versioned module while keeping root development builds pinned to the local API source.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Fail CI when direct dependencies shared by the root and API modules use different versions.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Verify operator and API tags share a commit and that released binaries record the independently downloadable API module version.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Have Dependabot update shared root and API dependencies together while preserving grouped Kubernetes upgrades.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Run the unpublished-tag check for pull requests whose titles identify an operator version bump.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
Skip internal pipelines for API-only tags and prevent them from reaching Nspect or NGC publishing jobs.

Signed-off-by: Aryan Gorwade <agorwade@nvidia.com>
@aryangorwade
aryangorwade force-pushed the aryan-api-module-split branch from 4223159 to 442274a Compare August 25, 2026 22:04
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.

1 participant