Skip to content

Fix Docker version extraction when prefixed with 'v' (on some systems / distributions)#20670

Merged
reta merged 1 commit intoopensearch-project:mainfrom
reta:fix.docker
Feb 18, 2026
Merged

Fix Docker version extraction when prefixed with 'v' (on some systems / distributions)#20670
reta merged 1 commit intoopensearch-project:mainfrom
reta:fix.docker

Conversation

@reta
Copy link
Contributor

@reta reta commented Feb 18, 2026

Description

On some systems, Docker reports version prefixed with 'v', on some without, for example:

 $ docker info
 Client: Docker Engine - Community
 Version: v29.1.2
 Context: default
 Debug Mode: false
 $ docker info
 Client:
 Version: 28.2.2
 Context: default
 Debug Mode: false

Related Issues

The build fails with:

* What went wrong:
A problem occurred evaluating project ':distribution:docker'.
> Failed to apply plugin 'opensearch.test.fixtures'.
   > Invalid version format: 'v29.1.2'. Should be major.minor.revision[-extra]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

… / distributions)

Signed-off-by: Andriy Redko <drreta@gmail.com>
@reta reta requested a review from a team as a code owner February 18, 2026 15:50
@reta reta added skip-changelog Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. labels Feb 18, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14749f7 and b8273aa.

📒 Files selected for processing (1)
  • buildSrc/src/main/java/org/opensearch/gradle/docker/DockerSupportService.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: gradle-check
  • GitHub Check: Analyze (java)
  • GitHub Check: precommit (25, macos-15)
  • GitHub Check: assemble (25, ubuntu-24.04-arm)
  • GitHub Check: precommit (25, ubuntu-24.04-arm)
  • GitHub Check: precommit (21, ubuntu-latest)
  • GitHub Check: assemble (25, windows-latest)
  • GitHub Check: precommit (21, ubuntu-24.04-arm)
  • GitHub Check: assemble (25, ubuntu-latest)
  • GitHub Check: assemble (21, ubuntu-latest)
  • GitHub Check: assemble (21, ubuntu-24.04-arm)
  • GitHub Check: assemble (21, windows-latest)
  • GitHub Check: precommit (21, macos-15)
  • GitHub Check: precommit (25, macos-15-intel)
  • GitHub Check: precommit (21, windows-latest)
  • GitHub Check: precommit (25, windows-latest)
  • GitHub Check: precommit (25, ubuntu-latest)
  • GitHub Check: precommit (21, macos-15-intel)
  • GitHub Check: precommit (21, windows-2025, true)
🔇 Additional comments (1)
buildSrc/src/main/java/org/opensearch/gradle/docker/DockerSupportService.java (1)

118-135: LGTM — normalization handles both v-prefixed and plain versions.

The trim + leading v removal is a clean, minimal fix for the CLI format variance.


📝 Walkthrough

Walkthrough

The change adjusts Docker version parsing in the DockerSupportService to handle optional leading 'v' characters in server version strings. The version string is now trimmed and any leading 'v' is stripped before creating the Version object, improving parsing robustness across different Docker CLI output formats.

Changes

Cohort / File(s) Summary
Docker Version Parsing
buildSrc/src/main/java/org/opensearch/gradle/docker/DockerSupportService.java
Updated version string preprocessing to trim whitespace and strip optional leading 'v' character before version object construction, improving compatibility with varying Docker CLI output formats.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

backport 3.5

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing Docker version extraction to handle optional 'v' prefix on some systems.
Description check ✅ Passed The description is mostly complete, includes a clear problem statement with examples, explains the build failure, and follows the template structure with Description and Related Issues sections filled out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@reta reta added the skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. label Feb 18, 2026
@cwperks
Copy link
Member

cwperks commented Feb 18, 2026

^ I just ran into this issue. Thanks for the fix @reta !

@github-actions
Copy link
Contributor

❌ Gradle check result for b8273aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@reta
Copy link
Contributor Author

reta commented Feb 18, 2026

❌ Gradle check result for b8273aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

On me

@github-actions
Copy link
Contributor

❌ Gradle check result for b8273aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b8273aa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

✅ Gradle check result for b8273aa: SUCCESS

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.15%. Comparing base (db0a16d) to head (b8273aa).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/gradle/docker/DockerSupportService.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20670      +/-   ##
============================================
- Coverage     73.19%   73.15%   -0.05%     
- Complexity    71924    71947      +23     
============================================
  Files          5781     5781              
  Lines        329292   329396     +104     
  Branches      47514    47525      +11     
============================================
- Hits         241026   240960      -66     
- Misses        68925    69058     +133     
- Partials      19341    19378      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reta reta merged commit 628aa3d into opensearch-project:main Feb 18, 2026
53 of 60 checks passed
@reta reta added the backport 3.5 Backport to 3.5 branch label Feb 18, 2026
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 18, 2026
… / distributions) (#20670)

Signed-off-by: Andriy Redko <drreta@gmail.com>
(cherry picked from commit 628aa3d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Feb 19, 2026
… / distributions) (#20670) (#20672)

(cherry picked from commit 628aa3d)

Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 3.5 Backport to 3.5 branch Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments