jenkinsci / jenkinsci/java-client-api

JobWithDetails - getAllBuils() method

オープン
#370 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
Java
スター
913
フォーク
466
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with JobWithDetails.getAllBuilds() and its HttpResponseException handling, then compare it with getBuilds() and the documented getAllBuilds(Range range) behavior. Reproduce the call against Jenkins to determine why a 404 occurs; done means the cause and expected handling are established and the behavior is covered or clearly documented.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。