incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

feat(jenkins): add branch filtering for Jenkins jobs

Open GoSimplicity opened this issue 5 months ago • 2 comments

add branch filtering for Jenkins jobs #8579

GoSimplicity avatar Oct 02 '25 15:10 GoSimplicity

After reading issue #8579, could the problem be that scope_api.go and remote_api.go are returning incorrect scopes?

Thanks for the review I checked both remote_api.go and scope_api.go. You're right to question this. From what I can see:

  • remote_api.go looks fine - MultiBranchProject is treated as a scope (it's in scopesWithJobs), so its branch jobs won't show up as selectable scopes in the UI
  • The issue in #8579 is different - when you select a MultiBranchProject, the collector grabs all branch jobs underneath it, converts them to cicd_pipelines, and they all show up in Grafana My PR filters branches during collection so only matching ones get into Grafana. But you're right that we should check if GetScopeList is also returning these auto-collected branch jobs alongside user-selected scopes. Should I add logic to distinguish user-selected scopes from auto-collected branch jobs? Or is filtering at collection time enough for this use case?

GoSimplicity avatar Oct 09 '25 13:10 GoSimplicity

Thanks for the explanation. @OG256 could you provide some context/input on this?

klesh avatar Oct 10 '25 08:10 klesh