Skip to content

Conversation

@ntsemah
Copy link
Contributor

@ntsemah ntsemah commented Dec 8, 2025

Description

Please provide a summary of the change.

What

Install doca-host during image build instead of runtime

Why ?

HPCINFRA-4061
reduce ci duration and avoid network failures

How ?

It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@greptile-apps
Copy link

greptile-apps bot commented Dec 8, 2025

Greptile Overview

Greptile Summary

This PR moves DOCA installation from CI runtime to Docker image build time, improving CI performance and reducing network-related failures.

Key changes:

  • Created 6 new Dockerfiles and updated 1 existing Dockerfile to include DOCA installation during image build
  • Removed two runtime installation steps ("Install Doca-host" and "Install Doca-host on Tools") from matrix_job.yaml
  • Updated all base container configurations to build from Dockerfiles instead of pulling pre-built images, with a new tag 20251208
  • Removed DOCA_VERSION and DOCA_BRANCH Jenkins parameters from proj_jjb.yaml since these are now hardcoded in the Docker images
  • Updated doca_install.sh to hardcode DOCA version 3.2.0 (upgraded from 2.8.0) and fixed RHEL version parsing to extract only the major version (e.g., rhel9 instead of rhel9.6)

The RHEL version fix in doca_install.sh:60 ensures compatibility with DOCA repository structure which uses major version paths.

Confidence Score: 5/5

  • This PR is safe to merge - it's a straightforward refactoring that improves CI efficiency
  • The changes are well-structured and follow a clear pattern across all affected files. The refactoring moves DOCA installation from runtime to build-time, which is a standard best practice for Docker workflows. The RHEL version parsing fix properly handles versioned OS releases. All changes are confined to CI infrastructure with no impact on production code.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.ci/matrix_job.yaml 5/5 Removed runtime DOCA installation steps and updated all base images to build from Dockerfiles with tag 20251208
.ci/proj_jjb.yaml 5/5 Removed DOCA_VERSION and DOCA_BRANCH Jenkins parameters as they are now hardcoded in the Docker images
.ci/scripts/doca_install.sh 5/5 Hardcoded DOCA version to 3.2.0, fixed RHEL version parsing to use major version only, and minor formatting cleanup

Sequence Diagram

sequenceDiagram
    participant CI as CI Pipeline
    participant DockerBuild as Docker Build Process
    participant BaseImage as Base Image
    participant DocaScript as doca_install.sh
    participant DocaRepo as DOCA Repository
    participant FinalImage as Final Docker Image
    
    Note over CI,FinalImage: Before this PR: Runtime Installation
    CI->>BaseImage: Pull base image
    CI->>CI: Run container from base image
    CI->>DocaScript: Execute doca_install.sh at runtime
    DocaScript->>DocaRepo: Download DOCA packages (network call)
    DocaRepo-->>DocaScript: Return packages
    DocaScript->>CI: Install DOCA in running container
    CI->>CI: Continue with build/test steps
    
    Note over CI,FinalImage: After this PR: Build-Time Installation
    CI->>DockerBuild: Trigger image build
    DockerBuild->>BaseImage: FROM base image
    DockerBuild->>DockerBuild: COPY doca_install.sh to /tmp
    DockerBuild->>DocaScript: RUN doca_install.sh during build
    DocaScript->>DocaRepo: Download DOCA packages (network call)
    DocaRepo-->>DocaScript: Return packages
    DocaScript->>DockerBuild: Install DOCA in image layer
    DockerBuild->>DockerBuild: Cleanup temp files
    DockerBuild->>FinalImage: Build complete with DOCA pre-installed
    CI->>FinalImage: Pull pre-built image with DOCA
    CI->>CI: Continue with build/test steps (faster)
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

9 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

9 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Install doca-host during image build instead of runtime to reduce ci duration and avoid network failures.

Signed-off-by: Noam Tsemah <ntsemah@nvidia.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ntsemah
Copy link
Contributor Author

ntsemah commented Dec 17, 2025

bot:retest

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