8000 [JENKINS-61290] hard to see why a branch was not inspected - log them by jimklimov · Pull Request #318 · jenkinsci/bitbucket-branch-source-plugin · GitHub
[go: up one dir, main page]

Skip to content

[JENKINS-61290] hard to see why a branch was not inspected - log them #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

jimklimov
Copy link
Contributor

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.
  • JENKINS issue(s):
  • Description:
    • When branch is not indexed/scanned because of policy setting, it is not easy to see why it was skipped. This PR adds logging of isExcluded() hits into global jenkins log. Alas, I did not find a way to log it into the indexing run's log itself where it would be more appropriate.
  • Documentation changes:
    • No doc change proposed at this time, as this is a small change for trace-logging and no new/changed feature.
  • Users/aliases to notify:
    • markewaite

Solution:

Currently there is no test-case proposed for this change, as this is a small change for trace-logging and no new/changed feature. (And trying to make a test case in the github version of the plugin stalled the PR so I'm a bit fearful of this)

BranchDiscoveryTrait.java : report into scan log if a branch is ignored
(because it is or is-not a source of PR, based on user choice of settings)
similarly as proposed and refined for github-branch-source-plugin in
jenkinsci/github-branch-source-plugin#284
@jimklimov jimklimov closed this Jun 23, 2020
@jimklimov
Copy link
Contributor Author

Trying to trigger the rebuild, hoping jenkins-infra is fixed now.

@jimklimov jimklimov reopened this Jun 23, 2020
@lifeofguenter lifeofguenter added enhancement java Pull requests that update Java code labels Aug 24, 2022
Copy link
Contributor
@lifeofguenter lifeofguenter left a comment

Choose a reason for hiding this comment

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

lgtm!

@nfalco79
Copy link
Member

Could you rebase this pr?

@nfalco79 nfalco79 self-requested a review October 29, 2024 14:33
request.listener().getLogger().format(
"Ignoring %s because current strategy excludes branches "
+ "that ARE also filed as a pull request%n"
, head.toString());
Copy link
Member

Choose a reason for hiding this comment

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

As you report in #284 the output log seems to be

Checking branch featureimage/new-nut-configurator
Ignoring SCMHead{'featureimage/new-nut-configurator'} because current strategy excludes branches that ARE also filed as a pull request

Instead of head.toString() could you use a method to produce a readable the branch name as in the above log branch featureimage/new-nut-configurator ?

@@ -272,6 +278,10 @@ public boolean isExcluded(@NonNull SCMSourceRequest request, @NonNull SCMHead he
return false;
}
}
request.listener().getLogger().format(
"Ignoring %s because current strategy excludes branches "
+ "that ARE NOT also filed as a pull request%n"
Copy link
Member

Choose a reason for hiding this comment

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

please write all words in lower case

// result blocked together with a later indexed branch
request.listener().getLogger().format(
"Ignoring %s because current strategy excludes branches "
+ "that ARE also filed as a pull request%n"
Copy link
Member

Choose a reason for hiding this comment

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

please write all words in lower case

@nfalco79
Copy link
Member

The issues JENKINS-61290 is referred to github-source-plugin, we can not handle same issue cross multiple plugin to track the version

@nfalco79
Copy link
Member

https://issues.jenkins.io/browse/JENKINS-74784 clones original issue

@nfalco79
Copy link
Member

Manually merged in master with requested changes.

@nfalco79 nfalco79 closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0