Skip to content
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

Address reporting duplicate error messages #18

Merged
merged 3 commits into from
Apr 13, 2021
Merged

Conversation

omus
Copy link
Member

@omus omus commented Apr 9, 2021

Addresses part of this comment: #12 (comment)

Fix the double stack trace. I'm not sure why the stack trace was emitted twice here but it's also just adding noise

Here's a quick example when running the cluster manager on my local system. I've removed the stacktraces to make the output shorter.

Without this PR:

julia> ENV["HOSTNAME"] = "localhost";

julia> K8sClusterManagers.addprocs_pod(1)
[ Info: unsupported events.k8s.io/v1
[ Info: unsupported certificates.k8s.io/v1
[ Info: unsupported node.k8s.io/v1
[ Info: unsupported flowcontrol.apiserver.k8s.io/v1beta1
ERROR: Swagger.ApiException(404, "Not Found", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Cache-Control: no-cache, private
Content-Length: 186
Content-Type: application/json
Date: Fri, 09 Apr 2021 17:55:56 GMT
X-Kubernetes-Pf-Flowschema-Uid: 198121e7-8b62-4f63-a220-9ebe10e3e597
X-Kubernetes-Pf-Prioritylevel-Uid: 03120ce8-c0ee-46e3-8213-e7f5473f6db0
Connection: close

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"localhost\" not found","reason":"NotFound","details":{"name":"localhost","kind":"pods"},"code":404}
""")
Stacktrace: ...

caused by: UndefVarError: readPod not defined
Stacktrace: ...

caused by: Swagger.ApiException(404, "Not Found", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Cache-Control: no-cache, private
Content-Length: 186
Content-Type: application/json
Date: Fri, 09 Apr 2021 17:55:56 GMT
X-Kubernetes-Pf-Flowschema-Uid: 198121e7-8b62-4f63-a220-9ebe10e3e597
X-Kubernetes-Pf-Prioritylevel-Uid: 03120ce8-c0ee-46e3-8213-e7f5473f6db0
Connection: close

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"localhost\" not found","reason":"NotFound","details":{"name":"localhost","kind":"pods"},"code":404}
""")
Stacktrace: ...

caused by: UndefVarError: readPod not defined
Stacktrace: ...

With this PR:

julia> ENV["HOSTNAME"] = "localhost";

julia> K8sClusterManagers.addprocs_pod(1)
[ Info: unsupported events.k8s.io/v1
[ Info: unsupported certificates.k8s.io/v1
[ Info: unsupported node.k8s.io/v1
[ Info: unsupported flowcontrol.apiserver.k8s.io/v1beta1
ERROR: Swagger.ApiException(404, "Not Found", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Cache-Control: no-cache, private
Content-Length: 186
Content-Type: application/json
Date: Fri, 09 Apr 2021 17:56:57 GMT
X-Kubernetes-Pf-Flowschema-Uid: 198121e7-8b62-4f63-a220-9ebe10e3e597
X-Kubernetes-Pf-Prioritylevel-Uid: 03120ce8-c0ee-46e3-8213-e7f5473f6db0
Connection: close

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"localhost\" not found","reason":"NotFound","details":{"name":"localhost","kind":"pods"},"code":404}
""")
Stacktrace: ...

caused by: UndefVarError: readPod not defined
Stacktrace: ...

@omus
Copy link
Member Author

omus commented Apr 9, 2021

I've now worked around the issue causing:

Fix UndefVarError: readPod not defined. This error makes it appear that there is an internal failure happening

Comment on lines +73 to +75
# Avoid using a generator with `Dict` as any raised exception would be displayed twice:
# https://github.com/JuliaLang/julia/issues/33147
pods = Dict([port => configure(default_pod(ctx, port, cmd, driver_name; kwargs...)) for port in ports])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A proper fix: JuliaLang/julia#40445

@omus omus requested a review from kolia April 12, 2021 19:42
@omus omus merged commit f43f42a into main Apr 13, 2021
@omus omus deleted the cv/address-dup-error branch April 13, 2021 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant