jenkinsci / jenkinsci/git-plugin

[JENKINS-30131] build won't trigger on an empty workspace if workspace is needed for polling but build is restricted to a label

Open
#2,714 6 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

I have a job which is set to poll a repository, and also uses the Polling uses certain paths behavior (include) along with the Force polling using workspace behavior.

Polling worked properly when the workspace was already present, but after wiping the workspace it did not trigger a build.

When I made jenkins to poll the repo via calling /git/notifyCommit?url=myrepo I got the following response:

Scheduled polling of chef-diff-app-apt-mirror-manual

but my job was not built

looking into the git polling log for this job I've seen this:

Started on Aug 25, 2015 9:43:02 AM

No workspace is available, so can’t check for updates. (nonexisting_workspace)

Done. Took 2 ms

No changes

I've tried to simplify my build to see if that resolves the issue, and realized that removing the "Restrict where this project can be run" settings solves the issue, even thought that in my setup this setting was redundant as the only node available/allowed to run jobs without explicit node restrictions was the same as I was specifying with my label.

After I removed the restrict label and curled /git/notifyCommit again I got a build started and this in my git polling log:

Started on Aug 25, 2015 9:55:41 AM

No workspace is available, so can’t check for updates.

Scheduling a new build to get a workspace. (nonexisting_workspace)

Done. Took 1 ms

Changes found

Let me know if you need any more info to reproduce the issue.

---
Originally reported by tyrael, imported from: build won't trigger on an empty workspace if workspace is needed for polling but build is restricted to a label


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • label(s): git-plugin, polling, pollscm
  • resolution: Unresolved
  • votes: 5
  • watchers: 9
  • imported: 2025-12-02

Raw content of original issue

I have a job which is set to poll a repository, and also uses the Polling uses certain paths behavior (include) along with the Force polling using workspace behavior.
Polling worked properly when the workspace was already present, but after wiping the workspace it did not trigger a build.
When I made jenkins to poll the repo via calling /git/notifyCommit?url=myrepo I got the following response:
Scheduled polling of chef-diff-app-apt-mirror-manual
but my job was not built
looking into the git polling log for this job I've seen this:
Started on Aug 25, 2015 9:43:02 AM
No workspace is available, so can’t check for updates. (nonexisting_workspace)
Done. Took 2 ms
No changes

I've tried to simplify my build to see if that resolves the issue, and realized that removing the "Restrict where this project can be run" settings solves the issue, even thought that in my setup this setting was redundant as the only node available/allowed to run jobs without explicit node restrictions was the same as I was specifying with my label.

After I removed the restrict label and curled /git/notifyCommit again I got a build started and this in my git polling log:
Started on Aug 25, 2015 9:55:41 AM
No workspace is available, so can’t check for updates.
Scheduling a new build to get a workspace. (nonexisting_workspace)
Done. Took 1 ms
Changes found

Let me know if you need any more info to reproduce the issue.

environment

```
Jenkins version: 1.609.2

GIT Plugin version: 2.4.0

git version: 1.7.10.4
```

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.