-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows 7 x64
Jenkins 1.580.3
Mercurial plugin 1.54
Configuration options set in the "Custom configuration" global field do not seem to always be sent in the same order. There is at least one case where the order of each line is important: the subpaths section. Regex substitutions for subpaths are performed in the order they appear in the config (source). I have two configuration lines, and I had a case where one of the configurations of my build used a different order when adding the "--config subpaths.search=replace" parts of the command line.
I'm guessing the config options are stored internally in some unsorted container.
Here's an example:
My configuration:
[someconfig] a=1 b=2 c=3 f=6 e=5 d=4
Log snippet from a build with some dummy code:
$ hg --config someconfig.b=2 --config someconfig.d=4 --config someconfig.e=5 --config someconfig.c=3 --config someconfig.a=1 --config someconfig.f=6 clone --rev default --noupdate D:\Projets\Hg\Test E:\JenkinsWrk\TestHgBug adding changesets adding manifests adding file changes added 29 changesets with 362 changes to 326 files [TestHgBug] $ hg --config someconfig.b=2 --config someconfig.d=4 --config someconfig.e=5 --config someconfig.c=3 --config someconfig.a=1 --config someconfig.f=6 update --rev default 325 files updated, 0 files merged, 0 files removed, 0 files unresolved [TestHgBug] $ hg --config someconfig.d=4 --config someconfig.f=6 --config someconfig.b=2 --config someconfig.c=3 --config someconfig.e=5 --config someconfig.a=1 log --rev . --template {node} [TestHgBug] $ hg --config someconfig.d=4 --config someconfig.f=6 --config someconfig.b=2 --config someconfig.c=3 --config someconfig.e=5 --config someconfig.a=1 log --rev . --template {rev} Finished: SUCCESS
Note the order of the --config value varies wildly for each command, and it would also vary from build to build.
In my case, the configuration contains two entries under the "subpaths" section, and the order in which they are applied makes a difference. As it is, I get random build failures when the update command uses the wrong config order.
- relates to
-
JENKINS-37446 StringIndexOutOfBoundsException when editing Custom Configuration field
- Open