Skip to content

DEPRECATED: The extension that requires a workspace for polling is deprecated for Pipeline jobs. #3927

@swarren12

Description

@swarren12

Describe your use-case which is not covered by existing documentation.

Since updating the Jenkins Git Plug-in to v5.9.0 we have started to receive the following warning in our jobs:

DEPRECATED: The extension that requires a workspace for polling is deprecated for Pipeline jobs.  Use Pipeline-native SCM polling instead.

This isn't causing any problems (as it's just a warning) but it would be nice to action it. Unfortunately, the message doesn't really provide enough information about what is wrong and what the remediation is.

It appears that this log stemmed from #3068. In the original ticket, the cause and action were very well defined:

Cause: using the Check out to a sub-directory extension
Action: wrap the check-out call in a dir() step instead.

By the time this change was merged the scope of the deprecation appears to have grown to encompass other extensions too. Reading through the source code, I can identify at least three other extensions that will trigger this warning:

  • MessageExclusion
  • PathRestriction
  • UserExclusion

In my particular case, I believe we're receiving this warning because of the PathRestriction extension, but I cannot find any documentation that explains how to use this extension (or replace it) in a way that allows me to use "Pipeline-native SCM polling instead".

My concern is that, as this is a deprecation warning, it implies this functionality will be removed at some point in the future and there is no guarantee I can replace it with a viable alternative.

None of the extensions listed above are listed as "Deprecated" extensions in the documentation, although all three come with a note similar to:

Using this behavior will preclude the faster remote polling mechanism, forcing polling to require a workspace thus sometimes triggering unwanted builds, as if you had selected the Force polling using workspace extension as well.

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

Documentation:
https://github.com/jenkinsci/git-plugin?tab=readme-ov-file#build-initiation-extensions

Original issue:
#3068

PR:
#3905

Are you interested in contributing to the documentation?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions