Skip to content

Conversation

@NirWolfer
Copy link
Contributor

@NirWolfer NirWolfer commented Dec 30, 2025

Description

sha1 might contain tag/ as input, causing files created in the blackduck script to be under a new sub folder that does not exist

What

Remove "tags/" prefix from PROJECT_VERSION

Why ?

Justification for the PR. If there is existing issue/bug please reference.

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)

@NirWolfer NirWolfer marked this pull request as ready for review December 30, 2025 09:32
@greptile-apps
Copy link

greptile-apps bot commented Dec 30, 2025

Greptile Summary

Fixed Blackduck log file creation failure by removing the tags/ prefix from the sha1 default value in the Jenkins pipeline configuration. When sha1 contained tags/<tag>, the Blackduck script would attempt to create log files at paths like log/LibVMA_tags/<tag>*.log, causing failures because the intermediate directory didn't exist.

  • Changed sha1 default from tags/$release_tag to $release_tag to prevent path issues
  • Updated git refspec to explicitly fetch tags: +refs/tags/*:refs/remotes/origin/tags/*
  • Removed depth: 2 parameter (unrelated change that may impact checkout performance)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix directly addresses the root cause of the Blackduck log file creation failure with a simple, targeted change. The removal of the tags/ prefix is the correct solution for the file path issue, and the refspec update ensures tags are properly fetched. The only minor concern is the removal of depth: 2 which wasn't mentioned in the PR description, but this change is likely intentional to support full tag history access.
  • No files require special attention

Important Files Changed

Filename Overview
.ci/pipeline/release_jjb.yaml Fixed sha1 default to remove tags/ prefix, preventing file path issues in Blackduck script; updated refspec to properly fetch tags

Sequence Diagram

sequenceDiagram
    participant Jenkins
    participant Git
    participant Blackduck
    participant FileSystem

    Note over Jenkins: User triggers release with release_tag
    Jenkins->>Jenkins: Set sha1 = $release_tag (no tags/ prefix)
    Jenkins->>Git: Fetch refs with refspec<br/>+refs/tags/*:refs/remotes/origin/tags/*
    Git-->>Jenkins: Return commit at tag
    Jenkins->>Jenkins: Checkout $sha1
    Jenkins->>Blackduck: Run blackduck_source.sh
    Note over Blackduck: PROJECT_VERSION = $sha1 (clean tag name)
    Blackduck->>Blackduck: Execute scan
    Blackduck->>FileSystem: Write log/LibVMA_${PROJECT_VERSION}*.log
    Note over FileSystem: Path is valid (no tags/ subdir)
    Blackduck->>FileSystem: Read log/${PROJECT_NAME}_${PROJECT_VERSION}*.log
    FileSystem-->>Blackduck: Log contents
    Blackduck->>Jenkins: Copy logs to WORKSPACE/logs/
    Jenkins->>Jenkins: Archive artifacts
Loading

@greptile-apps
Copy link

greptile-apps bot commented Dec 30, 2025

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@NirWolfer NirWolfer changed the title [CI] issue: 4568257 Blackduck fails creating log file [skip-ci] [CI] issue: 4568257 Blackduck fails creating log file Dec 30, 2025
@NirWolfer
Copy link
Contributor Author

bot:retest

sha1 might contain tag/<tag> as input, causing files created in the
blackduck script to be under a new sub folder that does not exist

Remove "tags/" prefix from sha1

Signed-off-by: NirWolfer <nwolfer@nvidia.com>
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.

2 participants