jenkinsci / jenkinsci/java-client-api
JobWithDetails - getAllBuils() method
- Langage dominant
- Java
- Étoiles
- 913
- Forks
- 466
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hello.
I try to use this library and I met some issue.
I want to retrieve all builds for job and I write:
`List builds = jenkinsServer.getJob(jobName).getAllBuilds();`
This method always returns null.
Method `getAllBuilds(Range range)` returns null too, but I see warning about this in documentation.
Only method `getBuilds()` works correctly.
In documentation for `getAllBuilds()` method there is no information about problems with it.
I found that null returns in `catch (HttpResponseException e)` block in `getAllBuilds()`:
```
catch (HttpResponseException e) {
// TODO: Thinks about a better handline if the job does not exist?
if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
// TODO: Check this if this is necessary or a good idea?
return null;
}
throw e;
}
```
So, I want to ask, is this only my problem, or not? Has anyone been getting this issue?
And how I can fix it or circumvent it?
Maybe you already know about this problem and plan to solve it? Then, perhaps, you can tell how quickly this problem will be solved.
Hope for answer. Thanks in advance.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par JobWithDetails.getAllBuilds() et la gestion de HttpResponseException, puis comparez-la avec getBuilds() et le comportement documenté de getAllBuilds(Range range). Reproduisez l’appel auprès de Jenkins afin de déterminer pourquoi un 404 se produit ; le travail est terminé lorsque la cause et le traitement attendu sont établis et que le comportement est couvert ou clairement documenté.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100