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
As a follow-up to #3806, I’d like to show some progress on the screen while waiting for the engine to provision and also while running the pipeline.
Demo
Watch the November 17th community call (0:40:45) where I show some of this.
Related
Multiple people will be working around improving logging. For the SDK, we’re particularly interested in improvements from the engine side. More specifically, if we have structured logging, we’ll be able to present more granular progress with each “pipeline step”.
Not sure where to best report this, but I have this issue too. I ported a portion of our CI/CD code to use Dagger's Python SDK, and it so far it works great, but before I throw the switch I want to make sure that the quality of our logs from CI do not degrade. For context, we have a C++ code with a number of dependencies. One aspect that we want to ensure is that each release builds on one of a number of common Linux distributions using system provided (and when supported MacOS) we can reasonably expect our users will have on their laptops using system provided dependencies.
However, in the process of debugging things using Dagger, it was really hard to determine which of a series of image layers led to a failure. This is because the outputs are not identifiable (i.e. is #18 relating to the series of tasks based on the almalinux:8 or almalinux:9 image). Improving the logs to make these distinguishable would be great.
(I intentionally inserted a typo in cmake in the centos_base function to illustrate my point)
Here is the error message that I get now:
> dnf install -y cmak gcc gcc-c++ ninja-build boost-devel ccache git pkg-config:#18 0.782 Last metadata expiration check: 0:31:29 ago on Wed Jan 4 22:08:40 2023.#18 1.149 No match for argument: cmak#18 1.182 Error: Unable to find a match: cmak------Traceback (most recent call last): File "/home/runderwood/git/libpressio/./ci/test.py", line 200, in <module> anyio.run(test, args) File "/home/runderwood/.local/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 70, in run return asynclib.run(func, *args, **backend_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runderwood/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 292, in run return native_run(wrapper(), debug=debug) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/runderwood/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper return await func(*args) ^^^^^^^^^^^^^^^^^ File "/home/runderwood/git/libpressio/./ci/test.py", line 187, in test async with anyio.create_task_group() as tg: File "/home/runderwood/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__ raise exceptions[0] File "/home/runderwood/git/libpressio/./ci/test.py", line 185, in test_centos return await common_steps(centos_base(client, version)).exit_code() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runderwood/.local/lib/python3.11/site-packages/dagger/api/gen.py", line 172, in exit_code return await _ctx.execute(int | None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runderwood/.local/lib/python3.11/site-packages/dagger/api/base.py", line 90, in execute result = await self.session.execute(query, get_execution_result=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runderwood/.local/lib/python3.11/site-packages/gql/client.py", line 1231, in execute raise TransportQueryError(gql.transport.exceptions.TransportQueryError: {'message': 'process "dnf install -y cmak gcc gcc-c++ ninja-build boost-devel ccache git pkg-config" did not complete successfully: exit code: 1', 'locations': [{'line': 43, 'column': 49}], 'path': ['container', 'from', 'withMountedCache', 'withMountedCache', 'withEnvVariable', 'withExec', 'withExec', 'withExec', 'withExec', 'withDirectory', 'withWorkdir', 'withExec', 'withExec', 'withExec', 'withExec', 'withDirectory', 'withWorkdir', 'withExec', 'withExec', 'withExec', 'withWorkdir', 'withExec', 'withExec', 'exitCode']}
Additionally, It would be great to get a more useful "backtrace" here. Something like
When building the following:from("almalinux:8")with_mounted_cache("/var/cache/dnf")with_mounted_cache("/var/ccache/ccache")with_exec("dnf install -y dnf-plugins-core")with_exec("dnf install -y epel-release")with_exec("dnf config-manager --set-enabled powertools")with_exec("dnf install -y cmak gcc gcc-c++ ninja-build boost-devel ccache git pkg-config")The build steps were: #1-5,18The following error occurred:#18 0.782 Last metadata expiration check: 0:31:29 ago on Wed Jan 4 22:08:40 2023.#18 1.149 No match for argument: cmak#18 1.182 Error: Unable to find a match: cmak
I've attached the (fixed) version of the pipeline for reference: test.zip
Activity
robertu94 commentedon Jan 4, 2023
Not sure where to best report this, but I have this issue too. I ported a portion of our CI/CD code to use Dagger's Python SDK, and it so far it works great, but before I throw the switch I want to make sure that the quality of our logs from CI do not degrade. For context, we have a C++ code with a number of dependencies. One aspect that we want to ensure is that each release builds on one of a number of common Linux distributions using system provided (and when supported MacOS) we can reasonably expect our users will have on their laptops using system provided dependencies.
However, in the process of debugging things using Dagger, it was really hard to determine which of a series of image layers led to a failure. This is because the outputs are not identifiable (i.e. is
#18relating to the series of tasks based on thealmalinux:8oralmalinux:9image). Improving the logs to make these distinguishable would be great.(I intentionally inserted a typo in
cmakein thecentos_basefunction to illustrate my point)Here is the error message that I get now:
Additionally, It would be great to get a more useful "backtrace" here. Something like
I've attached the (fixed) version of the pipeline for reference:
test.zip
helderco commentedon Jan 4, 2023
This issue doesn't include the logs from the engine as it works now, only when structured logging is available:
You might be interested in this though:
Watch this Community Call Demo - Upcoming Logging Improvements!
robertu94 commentedon Jan 5, 2023
@helderco thanks for the link to the demo. It looks awesome 🚀 and I think it would address my use cases.
helderco commentedon Apr 17, 2023
There's an experimental TUI with
dagger runfor better interactive progress during pipeline execution.Instructions here:
helderco commentedon Jul 18, 2023
Closing in favor of:
Footnotes
SDK checks and downloads CLI and starts session. ↩
gerhard commentedon Aug 1, 2023
Also addressed in this epic PR 💪 @helderco