Skip to content

MLE-31723: fix publish image race - #469

Merged
barkhachoithani merged 2 commits into
developfrom
MLE-31723_fix-publish-image-race
Aug 3, 2026
Merged

MLE-31723: fix publish image race#469
barkhachoithani merged 2 commits into
developfrom
MLE-31723_fix-publish-image-race

Conversation

@barkhachoithani

@barkhachoithani barkhachoithani commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request strengthens the artifact selection and image handling logic in the Jenkinsfile to ensure that the correct build artifacts are used, especially in environments with concurrent builds. The main improvements are tighter version matching for RPM selection and more robust Docker image handling to prevent accidental cross-build contamination.

Artifact selection improvements:

  • Updated RPM and Converters selection to first match version-specific patterns, reducing the risk of picking up artifacts from other concurrent builds. If no version-specific file is found, it falls back to the previous pattern.
  • Added explicit error handling if no RPM is found, and added a check to ensure the resolved RPM version matches the requested marklogicVersion parameter, failing fast if there is a mismatch.

Docker image handling improvements:

  • Removed the logic that searched for a loosely-matching Docker image tag after loading from the archive. Now, only the exact, fully-qualified image tag (builtImage) is used and trusted, preventing accidental use of images from other builds.
  • Added a comment and an explicit docker image inspect command to verify that the expected image is present after loading, further ensuring correctness.

Checklist:

  • Owner:
  • JIRA_ID as part of branch/PR name

  • Rebase the branch with upstream

  • Squashed all commits into a single commit

  • Added Tests

  • Reviewer:
  • Reviewed Tests

  • Added to Release Wiki/Jira

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Jenkins pipeline to reduce race conditions during image publishing by tightening how build artifacts (RPMs/images) are selected and by avoiding ambiguous Docker image lookups in a shared-daemon environment.

Changes:

  • Prefer version-scoped RPM filename patterns (with fallback) and add validation that the resolved RPM matches the requested MarkLogic major version.
  • In the publish stage, rely only on the exact builtImage tag (and verify it exists) instead of “grep-first-match” discovery from docker images.
  • Add explanatory inline comments clarifying why fully-qualified tags are required with concurrent builds on shared Docker daemons.

Comment thread Jenkinsfile
Comment thread Jenkinsfile
@barkhachoithani
barkhachoithani merged commit d86baaf into develop Aug 3, 2026
6 checks passed
@barkhachoithani
barkhachoithani deleted the MLE-31723_fix-publish-image-race branch August 3, 2026 18:24
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.

3 participants