jenkinsci / jenkinsci/subversion-plugin

[JENKINS-14254] Possible inconsistent checkouts if using multiple modules and post-commit-hook resp. RevisionParameter

Open
#938 3 comments 0 reactions 0 assignees View on GitHub
component:subversion-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
131
Forks
275
Avg merge
12h 4m
Merged PRs (30d)
6

Description

We have a job with a lot of SVN modules configured (most of them point in fact to the same repository, but different paths in it) and the SVN post-commit-hook configured as described in the Wiki https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin#SubversionPlugin-Postcommithook

What we experienced by this was that we had often inconsistent checkouts - i.e. some modules having an older revision than others, though they are from the same repository. We had this on nearly every 3rd build!

We thought that Jenkins was always checking out based on the timestamp of the build to ensure consistent revision across all modules, however this turned out to be only partly true. What turned out to be the problem, is the ?rev=$REV parameter in the post-commit-hook which 'fixes' the modules (via RevisionParameterAction) which are triggered by this hook to be on that revision. In case some other changes come on to this module or other modules between starting the build and checking out the module, this lead to inconsistent checkouts as the other modules (not triggered explicitly) are checked-out based on timestamp.

The workaround in this case was quite simple: remove ?rev=$REV from the post-commit-hook. However, I think this points out a general problem when working with post-commit-hook/RevisionParameters and multiple modules.

---
Originally reported by kutzi, imported from: Possible inconsistent checkouts if using multiple modules and post-commit-hook resp. RevisionParameter


  • assignee: kutzi
  • status: Open
  • priority: Major
  • component(s): subversion-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 20251212-090250

Raw content of original issue

We have a job with a lot of SVN modules configured (most of them point in fact to the same repository, but different paths in it) and the SVN post-commit-hook configured as described in the Wiki https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin#SubversionPlugin-Postcommithook

What we experienced by this was that we had often inconsistent checkouts - i.e. some modules having an older revision than others, though they are from the same repository. We had this on nearly every 3rd build!

We thought that Jenkins was always checking out based on the timestamp of the build to ensure consistent revision across all modules, however this turned out to be only partly true. What turned out to be the problem, is the ?rev=$REV parameter in the post-commit-hook which 'fixes' the modules (via RevisionParameterAction) which are triggered by this hook to be on that revision. In case some other changes come on to this module or other modules between starting the build and checking out the module, this lead to inconsistent checkouts as the other modules (not triggered explicitly) are checked-out based on timestamp.

The workaround in this case was quite simple: remove ?rev=$REV from the post-commit-hook. However, I think this points out a general problem when working with post-commit-hook/RevisionParameters and multiple modules.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.