You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocking for build completion breaks when networking is unreliable.
EXPECTED RESULTS
I would expect that block would be (at least to some extent) resilient to network errors like in the case of queue.block_until_building.
ACTUAL RESULTS
Blocking for build completion breaks when Jenkins instance will respond with one non-200 response.
USEFUL INFORMATION
How to reproduce:
Make connection to Jenkins
Invoke job with block=True
During building on Jenkins receive 502 response from server
16:11:16 Traceback (most recent call last):
(...)
16:11:16 File "/home/jenkins/workspace/***.py", line 105, in build
16:11:16 queue_item = job.invoke(build_params=params, block=True)
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/job.py", line 238, in invoke
16:11:16 qi.block_until_complete(delay=delay)
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/queue.py", line 142, in block_until_complete
16:11:16 return build.block_until_complete(delay=delay)
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/build.py", line 417, in block_until_complete
16:11:16 while self.is_running():
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/build.py", line 399, in is_running
16:11:16 data = self.poll(tree='building')
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/jenkinsbase.py", line 60, in poll
16:11:16 data = self._poll(tree=tree)
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/build.py", line 63, in _poll
16:11:16 return self.get_data(url, params={'depth': self.depth}, tree=tree)
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/jenkinsapi/jenkinsbase.py", line 84, in get_data
16:11:16 response.raise_for_status()
16:11:16 File "/tmp/venv/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
16:11:16 raise HTTPError(http_error_msg, response=self)
16:11:16 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url:
I could make PR, but I would need some assistance, to confirm if my solution proposition is correct.
The text was updated successfully, but these errors were encountered:
ISSUE TYPE
Jenkinsapi VERSION
0.3.11
Jenkins VERSION
2.176.3
SUMMARY
Blocking for build completion breaks when networking is unreliable.
EXPECTED RESULTS
I would expect that block would be (at least to some extent) resilient to network errors like in the case of
queue.block_until_building
.ACTUAL RESULTS
Blocking for build completion breaks when Jenkins instance will respond with one non-200 response.
USEFUL INFORMATION
How to reproduce:
block=True
I could make PR, but I would need some assistance, to confirm if my solution proposition is correct.
The text was updated successfully, but these errors were encountered: