Skip to content

[JENKINS-73820] "load" sometimes load the wrong file #1691

@jenkins-infra-bot

Description

@jenkins-infra-bot

Setup:

We have lots of pipelines that rely on common code. Currently, we use "load" to load code that is shared across multiple pipelines:

Jenkins_helper = load "${someDirectory}/Jenkins_helper.groovy"

The groovy scripts come from one repo and are checked out at the beginning, the files, then loaded one by one when required.

Exception

In approximate 1 out of 1.000 pipeline runs, one random groovy file is not loaded correctly, but Jenkins loads another file. The pipeline then crashes as a method that should be called on this loaded file is naturally not present.
The checked out file in the workspaces are sane, i.e. both the wrongly loaded file and the file that should actually be loaded are ok.
No exceptions can be seen in the overall jenkins log nor in the job log

Version
We currently have Jenkins in version Version 2.462.2, but it also occurred previous versions


Originally reported by danielschuh, imported from: "load" sometimes load the wrong file
  • status: Open
  • priority: Minor
  • component(s): workflow-cps-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07
Raw content of original issue

Setup:

We have lots of pipelines that rely on common code. Currently, we use "load" to load code that is shared across multiple pipelines:

Jenkins_helper = load "${someDirectory}/Jenkins_helper.groovy"

The groovy scripts come from one repo and are checked out at the beginning, the files, then loaded one by one when required.

Exception

In approximate 1 out of 1.000 pipeline runs, one random groovy file is not loaded correctly, but Jenkins loads another file. The pipeline then crashes as a method that should be called on this loaded file is naturally not present. The checked out file in the workspaces are sane, i.e. both the wrongly loaded file and the file that should actually be loaded are ok. No exceptions can be seen in the overall jenkins log nor in the job log

Version We currently have Jenkins in version Version 2.462.2, but it also occurred previous versions

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions