-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Use labels instead of pod name for pod log read in k8s exec #28546
Use labels instead of pod name for pod log read in k8s exec #28546
Conversation
1b0a294
to
374b042
Compare
label_selector=selector, | ||
).items | ||
if not pod_list: | ||
raise RuntimeError("Cannot find pod for ti %s", ti) |
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.
Instead of raising an error (which I think will result in a 500!) should we do something like we do on L191-192:
log += f"*** {str(e)}\n"
return log, {"end_of_log": True}
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.
it is already in a try / except so that catches and does just that
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.
so i could duplicate that code or just raise :)
4bdcd38
to
ad89b4e
Compare
This means we don't have to use ti.hostname as a proxy for pod name, and allows us to lift the 63 charcter limit, which was a consequence of getting pod name through hostname.
ad89b4e
to
d61fe03
Compare
This means we don't have to use ti.hostname as a proxy for pod name, and allows us to lift the 63 charcter limit, which was a consequence of getting pod name through hostname.
Using @uranusjr-style "protected" methods just, as always, to contain "public" surface area