jenkinsci / jenkinsci/cloudbees-folder-plugin

[JENKINS-67103] "Queue refused to schedule" WARNING log messages for disabled jobs

Open
#703 4 comments 1 reaction 0 assignees View on GitHub
component:cloudbees-folder-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
59
Forks
117
PR merge metrics
No merged PRs in 30d

Description

We're seeing lots of WARNING log messages such as:

WARNING c.c.h.p.f.c.PeriodicFolderTrigger#run: Queue refused to schedule org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@​37177326[foo/bar/jobname]

We're using bitbucket and multibranch pipelines and what seems to be shared by the jobs in the warning log messages is that they are disabled.

Checking the code this log messages comes from com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger.run() when scheduling a build returns null. Checking that logic there is a check if the job (or parent) is disabled and the nreturn null, which would support what we're seeing.

I'm thinking that the logic is either wrong or the log messages is wrong. It is not the queue that is refusing to schedule a build but it's the job that's disabled. I would suggest first checking if the job is disabled and in that case log that (at debug or info). If not disabled, try to schedule a build and if that fails log a warning messages.

---
Originally reported by ahammar, imported from: "Queue refused to schedule" WARNING log messages for disabled jobs


  • status: Open
  • priority: Minor
  • component(s): cloudbees-folder-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 6
  • imported: 20251211-141027

Raw content of original issue

We're seeing lots of WARNING log messages such as:
WARNING c.c.h.p.f.c.PeriodicFolderTrigger#run: Queue refused to schedule org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@37177326[foo/bar/jobname]

We're using bitbucket and multibranch pipelines and what seems to be shared by the jobs in the warning log messages is that they are disabled.
Checking the code this log messages comes from com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger.run() when scheduling a build returns null. Checking that logic there is a check if the job (or parent) is disabled and the nreturn null, which would support what we're seeing.

I'm thinking that the logic is either wrong or the log messages is wrong. It is not the queue that is refusing to schedule a build but it's the job that's disabled. I would suggest first checking if the job is disabled and in that case log that (at debug or info). If not disabled, try to schedule a build and if that fails log a warning messages.

environment

```
Jenkins 2.303.2 with OpenJDK 11 on RHEL7

cloudbees-folder-plugin 6.16

bitbucket-branch-source-plugin 2.9.11

```

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.