-
Notifications
You must be signed in to change notification settings - Fork 341
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
Remove/deprecate checksName parameter to junit step #210
Comments
Posted on the PR initially, reposting here: While I don't disagree that there may be a better way of detecting a default value that isn't Providing it via the program that produces the xml to be consumed would require both substantial changes to our Jenkinsfiles and junit producing programs, compared to the one line we are able to achieve the behaviour with currently. We already have an issue with the warningsng plugin where the name of the report on jenkins has to be the exact same as the check reported to github. For context, our use case here is that we have a number of parent jobs that may run on a single PR, each with a large number of inidividual checks - e.g. our smoke run has > 10 checks reported, our long run about 5. They are a mix of test results, warnings, and coverage, plus some custom checks. They are also duplicated between parent jobs, for instance our build stage runs on both the long run and the deploy run. Therefore, to help keep some kind of order to the large number of checks, we namespace them by the parent job, so we end up with:
etc. The easiest way to achieve this, by far, is for every plugin that publishes a check to allow the user to provide the name of that check. I'm also hoping that at some point the checks API will support updating checks, so that we can have a pattern that looks like:
ie, a wrapper that creates a check in progress, catches and reports exceptions. Having now seen the proposal - this would be totally unacceptable as a replacement. We sometimes invoke junit multiple times per stage, so would have to totally rearchitect our jenkinsfiles to meet this reduced flexibility. Again, I think this would make a lot of sense as a default, but the ability to override must be kept. |
Another thought arises - having the checks name have to come from the stage name will make using this check as a required check on github hard, as any refactoring of your jenkinsfile could result in a change to the computed name, requiring changes to configuration of your branch protection rules. Again to make absolutely clear, I think this would be a sensible default (and I'm happy to raise a PR for it), but it can't be the only option. |
could you create the feature request on the checks-api plugin?
https://github.com/jenkinsci/checks-api-plugin/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc it makes sense to me |
The design of the At this point By the way I stumbled across this issue by noticing that |
FTR they aren't aggregated after: |
As far as what name is used for a check on Github, it's seems to be open season as far as the four places I'm currently it:
I would argue that as far as how jenkins interacts with external services, users should at least be given the option to chose names that suit them. Otherwise in order to have consistency on the receiving end on github, we must force the same idiom used within junit on all other plugins, and indeed on anything consuming such checks (like branch protection rules) |
checksName
was introduced in #189 as an attempt to address #183, namelyIt suffices to use
SuiteResult.getEnclosingBlockNames
, which will be set automatically according tostage
orparallel
branch as of #76, without modifications to theJenkinsfile
.The text was updated successfully, but these errors were encountered: