-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Convert debugging page #7407
Conversation
https://dagger.cloud/dagger/traces/8b7aa1a600a20884ffd6f895633babbc - TS lint shows a failure, but https://github.com/dagger/dagger/actions/runs/9140565827/job/25134037910?pr=7407 - TS lint (which is presumably doing the same thing) shows success. Not quite sure what this means or how to turn it green. Please lmk if any suggestions @gerhard @matipan |
I am assuming that the trace failed because the span never terminated: The only way that I was able to make this type of check green is to run it again, even if the job succeeded. CC-ing @vito & @crjm @aluzzardi in case they have a different suggestion. Triggering the re-run to check if that still works as I remember. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from my comment, LGTM!
Yes, this is the reason why this is happening. @vito it seems like we are setting the state in the FE for timeouts, but we are not showing any UI for that state. |
@@ -40,19 +54,19 @@ Using the command `dagger call --debug echo --msg="hello"`, should print | |||
something like: | |||
|
|||
``` | |||
✔ MyModule.echo(msg: "hello"): String! 0.5s | |||
✔ Mymodule.echo(msg: "hello"): String! 0.5s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@helderco this is not the current output. The current output contains a very large number of spans, and I wasn't able to find anything similar to what is shown here. Please suggest what should be done for this output.
### Enable SDK debug logs | ||
|
||
:::important | ||
The information in this section is only applicable to the Python SDK. Debug logs are not currently available for the Go and TypeScript SDKs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vikram-dagger when I run this I see the following final output:
```
✔ initialize 5.3s
✔ debug: Debug! 0.9s
┃ [DEBUG] dagger.mod._resolver: func => <Signature () -> None>
┃ [DEBUG] dagger.mod._resolver: input args => {}
┃ [DEBUG] dagger.mod._resolver: structured args => {}
┃ [DEBUG] dagger.mod._module: result => Debug()
┃ [DEBUG] dagger.mod._module: output => '{}'
┃ [DEBUG] dagger.client._session: Closing client session to GraphQL server
✔ connect 0.1s
✔ Debug.echo(msg: "hello"): String! 0.9s
┃ [DEBUG] dagger.mod._resolver: func => <Signature (msg: str) -> str>
┃ [DEBUG] dagger.mod._resolver: input args => {'msg': 'hello'}
┃ [DEBUG] dagger.mod._resolver: structured args => {'msg': 'hello'}
┃ [DEBUG] dagger.mod._module: result => 'hello'
┃ [DEBUG] dagger.mod._module: output => '"hello"'
┃ [DEBUG] dagger.client._session: Closing client session to GraphQL server
✔ connect 0.1s
hello
```
However, while its executing I see a ton of DBG messages like this:
```
15:41:17 DBG recording span span=moby.buildkit.v1.Control/Session id=cd9772c3f2d5b7a0
15:41:17 DBG recording span child span=moby.buildkit.v1.Control/Session parent=3c1b9516c5eb911a child=cd9772c3f2d5b7a0
15:41:17 DBG new end old="2024-05-20 15:41:16.972974556 -0700 PDT" new="2024-05-20 15:41:17.077128834 -0700 PDT"
15:41:17 DBG recording span span="dagger call --debug echo --msg=hello" id=2998d3b4f5ce8c55
15:41:17 DBG got EOF
15:41:17 DBG got EOF
15:41:17 DBG run finished err=<nil>
```
I think it might be fine to explain that the user will see a lot of DBG
info in the output and then end with the nicely formatted thing that
gets printed out at the end.
Are you seeing something completely different?
…On Mon, May 20, 2024 at 01:08:39PM -0700, vikram-dagger wrote:
@vikram-dagger commented on this pull request.
> @@ -40,19 +54,19 @@ Using the command `dagger call --debug echo --msg="hello"`, should print
something like:
```
-✔ MyModule.echo(msg: "hello"): String! 0.5s
+✔ Mymodule.echo(msg: "hello"): String! 0.5s
@helderco this is not the current output. The current output contains a very large number of spans, and I wasn't able to find anything similar to what is shown here. Please suggest what should be done for this output.
--
Reply to this email directly or view it on GitHub:
#7407 (review)
You are receiving this because your review was requested.
Message ID: ***@***.***>
|
@levlaz Yes, I see the DBG output but at the end I only see this output, which only partially matches what you have:
Which of the two outputs is correct. @helderco ? |
┃ [DEBUG] dagger.mod._resolver: func => <Signature (msg: str) -> str> | ||
┃ [DEBUG] dagger.mod._resolver: input args => {'msg': 'hello'} | ||
┃ [DEBUG] dagger.mod._resolver: structured args => {'msg': 'hello'} | ||
┃ [DEBUG] dagger.mod._module: result => 'hello' | ||
┃ [DEBUG] dagger.mod._module: output => '"hello"' | ||
┃ [DEBUG] dagger.client._session: Closing client session to GraphQL server | ||
DEBUG: executing query="query{myModule{echo(msg:\"hello\")}}" | ||
DEBUG: executing query="query{mymodule{echo(msg:\"hello\")}}" | ||
``` | ||
|
||
The above gives a lot of useful information: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this list still accurate @helderco ? I see some of this in the output but not all
@@ -63,13 +77,4 @@ The above gives a lot of useful information: | |||
- The user inputs after being converted to more complex types (structuring) | |||
- The function's result before and after serialization | |||
|
|||
Additionally, with `--debug` the GraphQL query that the CLI produced is also shown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query still shows, but it's no longer at the end, you'll have to search for it.
d6aa8c6
to
017a489
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vikram and I looked at this together over Discord, its good to go once we add the updated output.
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
4e55714
to
b64b18d
Compare
Fyi, to show Python logs you don't need to have |
No description provided.