Skip to content

DO NOT MERGE - Testing integration of #415, #417 and #418 on staging - #430

Closed
yuechao-qin wants to merge 6 commits into
ycq/staging-test-api-redaction-staging-basefrom
ycq/staging-integration-415-417-418
Closed

yuechao-qin wants to merge 6 commits into
ycq/staging-test-api-redaction-staging-basefrom
ycq/staging-integration-415-417-418

Conversation

@yuechao-qin

Copy link
Copy Markdown
Collaborator

Why this branch exists

Three open pull requests all touch the Kubernetes launcher and all want the same staging environment to prove themselves. This branch carries the three together so one staging deploy exercises all of them.

PR What it does Commits here
#415 keeps container command lines out of the serialized launcher data f2470fc, b709e6b, 9c63943
#417 reads a container log within a budget and gives up quietly eabb056
#418 treats an unreachable kubelet as a lost log f15728d, ab15742

Why the base is not master

The base is 3001032, which is the commit oasis-backend's staging branch currently points its backend/ submodule at. It is not on master: it is #396's work before that was squashed into db041c2, so staging is also missing ea250bc (#411) and 1766484 (#425).

Basing the integration branch here means the only difference staging sees is the three pull requests themselves, and nothing else rides along.

3001032  what staging runs today
  ├── #415  x3
  ├── #417  x1
  └── #418  x2   ->  ab15742, this branch

Conflicts resolved

Two, both the same shape: #415 and #418 each append a new module-level function at the same point in kubernetes_launchers.py. Both sides were kept, and #418's later rename of _api_exception_body to _extract_api_exception_body was applied on top.

Tests

Full suite on this branch: 598 passed. black reports no changes.

Do not merge

This branch exists to be deployed to staging and then thrown away. It can never be fast-forwarded onto master, because its base is not on master. Each pull request merges on its own.

…than in the shared serializer

_serialize_kubernetes_object_to_compact_dict no longer removes command lines; a
_serialize_kubernetes_object_to_compact_dict_and_censor_it wrapper does, and the
three call sites that persist a launched object use it.
…give up quietly

Reading a container log goes through the API server's proxy to the node's
kubelet, and a read that fails has almost always lost the log for good. The
caller retries `upload_log` five times, so each lost log cost its single
loop thread five requests and five waits for a log that would never arrive.

Both Kubernetes launchers now read within their own budget and return quietly
when it runs out. The budget wraps the read only: a failed write to storage
still raises and still earns the caller's retries.
A container log is read through the API server's proxy to the node's kubelet. When
the cluster-autoscaler reclaims the node, that proxy fails with a 500 whose body
reports a failed dial of port 10250. The log died with the node, so retrying cannot
recover it; the read is a lost cause from the first attempt.

`_get_log_by_pod_key` now returns None for that error, beside the existing branches
for a deleted Pod (404) and a container that has not started (400), and logs a
warning carrying the full response body. The match is deliberately narrow: a 500
whose body names the container-log endpoint and a failed dial. Any other 500 still
raises, so a reworded or unrelated error surfaces instead of being swallowed.
@yuechao-qin yuechao-qin closed this Nov 5, 2026
@yuechao-qin
yuechao-qin deleted the ycq/staging-integration-415-417-418 branch November 5, 2026 07:01
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