Skip to content

fix(jenkins): scope multi-branch build collection to current project#8781

Open
KyriosGN0 wants to merge 1 commit intoapache:mainfrom
KyriosGN0:fix-jenkins
Open

fix(jenkins): scope multi-branch build collection to current project#8781
KyriosGN0 wants to merge 1 commit intoapache:mainfrom
KyriosGN0:fix-jenkins

Conversation

@KyriosGN0
Copy link
Contributor

Summary

  • Fixes [Bug][Jenkins] _raw_jenkins_api_builds table becomes bloated with faulty records #8430_raw_jenkins_api_builds table becomes bloated with faulty records when using multiple multi-branch pipelines
  • The branch jobs query in collectMultiBranchJobApiBuilds selected all WorkflowJob entries across all multi-branch pipelines for a connection, causing builds to be duplicated and misattributed between projects
  • Added _raw_data_params filter to scope the query to only the current multi-branch project's branch jobs

Test plan

  • Configure two or more multi-branch pipelines on the same Jenkins connection
  • Run a full sync and verify _raw_jenkins_api_builds only contains records for the correct project per params value
  • Verify no cross-project data mixing in _tool_jenkins_builds

🤖 Generated with Claude Code

…pache#8430)

The branch jobs query in collectMultiBranchJobApiBuilds selected all
WorkflowJob entries across all multi-branch pipelines for a connection,
causing builds to be duplicated and misattributed. Filter by
_raw_data_params to collect only the current project's branch jobs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug labels Mar 18, 2026
Copy link
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Thanks for your contribution.

@KyriosGN0
Copy link
Contributor Author

@klesh could you approve then ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Jenkins] _raw_jenkins_api_builds table becomes bloated with faulty records

2 participants