Skip to content

Commit 16042fb

Browse files
committed
[Docs] Document pod_config validator PEP 585 dict fix
1 parent 827ff42 commit 16042fb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,28 @@
295295
the resolver now lands on 36.0.2+.
296296
</td>
297297
</tr>
298+
<tr>
299+
<td><b>[Kubernetes] Accept PEP 585 <code>dict[K, V]</code> type strings in pod_config validator</b></td>
300+
<td><code>827ff42</code></td>
301+
<td><code>sky/provision/kubernetes/utils.py</code></td>
302+
<td>
303+
Second fallout from the <code>kubernetes</code> client <code>36.x</code>
304+
upgrade (companion to the <code>!=36.0.0</code> exclusion above, which lands
305+
the resolver on 36.0.2). The 36.x models were regenerated with PEP 585 type
306+
strings, so map fields like <code>metadata.labels</code> now declare their
307+
type as <code>dict[str, str]</code> (square brackets) instead of the old
308+
<code>dict(str, str)</code> (parentheses). SkyPilot's hand-rolled
309+
<code>PodValidator</code> (a reimplementation of the client's deserializer)
310+
only matched the parenthesized form, so the bracket form fell through to the
311+
model-import path and failed with
312+
<code>No module named 'kubernetes.client.models.dict[str, str]'</code>,
313+
breaking <code>sky serve up</code> / <code>sky launch</code> at pod_config
314+
validation. Fix: match both <code>dict(</code> and <code>dict[</code> and
315+
parse either closing bracket. Note <code>dict_to_k8s_object()</code> is
316+
unaffected — it delegates to the client's own (self-consistent)
317+
<code>deserialize()</code> rather than reimplementing it.
318+
</td>
319+
</tr>
298320
</tbody>
299321
</table>
300322

@@ -373,6 +395,7 @@ git cherry-pick 32e4e61 502df1c
373395
git cherry-pick c6f8f23 # Raise per-controller service capacity for k8s
374396
git cherry-pick 78fe751 # Pin uv pip to runtime venv via --python
375397
git cherry-pick 69b0a69 # Exclude kubernetes==36.0.0 (in-cluster auth regression)
398+
git cherry-pick 827ff42 # Accept PEP 585 dict[K,V] type strings in pod_config validator
376399
# Resolve any conflicts if upstream changed the same files
377400

378401
# 4. Push new branch

0 commit comments

Comments
 (0)