jenkinsci / jenkinsci/branch-api-plugin

[JENKINS-63573] Possible regression: rateLimitBuilds() syntax not accepted

Open
#750 2 comments 0 reactions 0 assignees View on GitHub
component:branch-api-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
39
Forks
154
PR merge metrics
No merged PRs in 30d

Description

I was trying to add a job that takes ~20 hours to run so I decided to limit it to one run per week, but if I use the suggested snippet properties([rateLimitBuilds([count: 1, durationName: 'week', userBoost: true])]) I get the following error and it's not applied:

WARNING: Unknown parameter(s) found for class type 'jenkins.branch.RateLimitBranchProperty$JobPropertyImpl': count,durationName,userBoost

Searching for other examples it appears that the correct syntax is rateLimitBuilds(throttle: [count: 1, durationName: 'week', userBoost: true]).

I spent many hours trying to debug this error message and would appreciate it if the snippet generator was fixed (or the suggested syntax was also accepted) so that others don't also run into this issue.

I feel like this syntax worked correctly in the past, so this might be a regression introduced in https://github.com/jenkinsci/branch-api-plugin/commit/97f7edb2af0a5dcba423ac70efeb9b9851b58524#diff-ca2ff61b92524e082e6ac9d90496948f ?

---
Originally reported by arichardson, imported from: Possible regression: rateLimitBuilds() syntax not accepted


  • status: Open
  • priority: Minor
  • component(s): branch-api-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 5
  • imported: 20251211-141027

Raw content of original issue

I was trying to add a job that takes ~20 hours to run so I decided to limit it to one run per week, but if I use the suggested snippet properties([rateLimitBuilds([count: 1, durationName: 'week', userBoost: true])]) I get the following error and it's not applied:

WARNING: Unknown parameter(s) found for class type 'jenkins.branch.RateLimitBranchProperty$JobPropertyImpl': count,durationName,userBoost

Searching for other examples it appears that the correct syntax is rateLimitBuilds(throttle: [count: 1, durationName: 'week', userBoost: true]).

I spent many hours trying to debug this error message and would appreciate it if the snippet generator was fixed (or the suggested syntax was also accepted) so that others don't also run into this issue.

I feel like this syntax worked correctly in the past, so this might be a regression introduced in https://github.com/jenkinsci/branch-api-plugin/commit/97f7edb2af0a5dcba423ac70efeb9b9851b58524#diff-ca2ff61b92524e082e6ac9d90496948f ?

  • environment: Jenkins 2.235.5, all plugins at latest version as of 2020-09-02.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the warning with the reported Jenkins 2.235.5 environment and compare the two rateLimitBuilds syntaxes in the issue. Inspect the linked commit diff in the branch-api-plugin repository to locate the changed snippet or parameter handling. Done means the suggested syntax is accepted or the snippet generator emits the working syntax, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.