Skip to content

fix(build): pin OVN to specific commit for reproducible builds#6335

Merged
oilbeater merged 1 commit intorelease-1.14from
fix/pin-ovn-commit-release-1.14
Feb 25, 2026
Merged

fix(build): pin OVN to specific commit for reproducible builds#6335
oilbeater merged 1 commit intorelease-1.14from
fix/pin-ovn-commit-release-1.14

Conversation

@oilbeater
Copy link
Copy Markdown
Collaborator

Clone with depth=10 and checkout a specific commit to ensure reproducible builds and avoid picking up unexpected changes from the branch-24.03 branch tip.

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

Clone with depth=10 and checkout a specific commit to ensure
reproducible builds and avoid picking up unexpected changes from
the branch-24.03 branch tip.

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 25, 2026
@oilbeater oilbeater merged commit 5c2de20 into release-1.14 Feb 25, 2026
6 of 7 checks passed
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @oilbeater, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the reliability of the build process by precisely controlling the version of the OVN source code used. By pinning OVN to a specific commit and increasing the cloning depth, it prevents unexpected changes from the branch tip from affecting builds, thereby ensuring greater consistency and reproducibility.

Highlights

  • OVN Build Reproducibility: The OVN cloning process in the Dockerfile was updated to ensure reproducible builds by increasing the 'git clone' depth and explicitly checking out a specific commit.
  • Dockerfile Changes: The 'Dockerfile.base' now clones the OVN repository with a depth of 10 (up from 1) and then performs a 'git checkout' to a fixed commit hash (ef8f5c1ac63e8094eaf13507013e310991db45a2).
Changelog
  • dist/images/Dockerfile.base
    • Increased the 'git clone' depth for the OVN repository from 1 to 10.
    • Added a 'git checkout' command to pin the OVN repository to commit ef8f5c1ac63e8094eaf13507013e310991db45a2.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@oilbeater oilbeater deleted the fix/pin-ovn-commit-release-1.14 branch February 25, 2026 02:11
@dosubot dosubot bot added the bug Something isn't working label Feb 25, 2026
oilbeater added a commit that referenced this pull request Feb 25, 2026
Clone with depth=10 and checkout a specific commit to ensure
reproducible builds and avoid picking up unexpected changes from
the branch-24.03 branch tip.

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to pin the OVN dependency to a specific commit for reproducible builds, which is a good practice. The implementation correctly adds a git checkout to a specific commit. However, the git clone command uses a shallow clone with --depth=10, which is likely insufficient to contain the target commit, causing the build to fail. I've suggested removing the --depth option to ensure the clone is deep enough, making the build process more robust.

git apply $SRC_DIR/54b767822916606dbb78335a3197983f435b5b8a.patch

RUN cd /usr/src/ && git clone -b branch-24.03 --depth=1 https://github.com/ovn-org/ovn.git && \
RUN cd /usr/src/ && git clone -b branch-24.03 --depth=10 https://github.com/ovn-org/ovn.git && \
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.

high

The shallow clone with --depth=10 is likely not deep enough to contain the commit ef8f5c1ac63e8094eaf13507013e310991db45a2. This commit is from early May 2024, and the branch-24.03 has received many more than 10 commits since then. This will likely cause the git checkout command on the next line to fail.

For a more robust and reproducible build, it's better to perform a full clone of the branch. While this may be slower, it guarantees that the specific commit can be checked out.

RUN cd /usr/src/ && git clone -b branch-24.03 https://github.com/ovn-org/ovn.git && \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant