Open
Description
#116 introduced a side effect. If you call "project update", it will now always update all project mainline states:
> poetry run capycli project update -id 50c... -url https://sw360.siemens.com -t <token> -oa -i project.sbom
CaPyCli, 2.7.0 - Create or update a project on SW360
Loading SBOM file project.sbom
Updating project...
3 releases in SBOM
3 releases in project before update
3 releases in project after update
Restoring original project mainline states...
Done
In the current implementation, it will update each release's project mainline state individually. This leads to unnecessary SW360 API calls and for large projects, you will end up with API rate limiting timeouts:
Restoring original project mainline states...
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 897, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 897, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 897, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 887, in urlopen
retries = retries.increment(method, url, response=response, _pool=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/distroclearing-9TtSrW0h-py3.11/lib/python3.11/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sw360.siemens.com', port=443): Max retries exceeded with url: /resource/api/projects/e4/release/0c (Caused by ResponseError('too many 500 error responses'))
Metadata
Assignees
Labels
No labels