buildcache push: improve printing#36141
Conversation
|
nitpick: I'm generally not a fan of putting tty.info(...) in source files other than Alternatively, can you make:
Then the tty.info business can go into cmd/buildcache.py and cmd/ci.py. This also ties in with #35601 since error handling can be improved too. Maybe |
5e1c03b to
603f5cb
Compare
This is the bit I thought was really key from your review, thanks. Let me know if I missed the mark in your opinion, I didn't really see the benefit of a |
603f5cb to
2389977
Compare
2389977 to
99a3469
Compare
alalazo
left a comment
There was a problem hiding this comment.
I have test-driven this PR trying to create buildcaches on my local filesystem. This LGTM from a user perspective.
Concerning the code, is it possible to update type-hints and docstring of all the functions that have been modified?
|
|
||
| This method raises NoOverwriteException when force=False and the tarball or | ||
| spec.json file already exist in the buildcache. |
There was a problem hiding this comment.
Not a fault of this PR, but as we are at it, can we add a description of each argument in the docstring (and type-hints)?
Also refactor so that it is clear that the ci module is only ever going to push a single packaged spec to the mirror.
5a4b1ea to
f297ac0
Compare
|
@spackbot run pipeline |
|
I encountered an error attempting to run the pipeline. DetailsError: <class 'aiohttp.client_exceptions.ContentTypeError'>, 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://gitlab.spack.io/api/v4/projects/2/repository/commits/pr36141_print-msg-for-each-pushed-buildcache')
Stack trace:
File "/usr/local/lib/python3.7/site-packages/rq/worker.py", line 1359, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 1178, in perform
self._result = self._execute()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 1218, in _execute
coro_result = loop.run_until_complete(result)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./spackbot/workers.py", line 197, in run_pipeline_task
if not await check_gitlab_has_latest(branch, head_sha, gh, comments_url):
File "./spackbot/workers.py", line 77, in check_gitlab_has_latest
gitlab_commit = await helpers.get(commit_url, headers)
File "./spackbot/helpers.py", line 202, in get
return await response.json()
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1110, in json
headers=self.headers,
|
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
@haampie Feel free to merge, if this seems ready. All the points in my previous review seem addressed, so ✔️ |

If for any reason dependent jobs begin (or continue) pushing buildcaches for all of their dependencies, it will be easy to spot in job traces (like this one from a previous test PR).