• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeflow / mcp-server / 35115184991
77%

Build:
DEFAULT BRANCH: main
Ran 16 Sep 2026 03:26PM UTC
Jobs 3
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Sep 2026 03:24PM UTC coverage: 76.649% (+0.2%) from 76.46%
35115184991

push

github

web-flow
fix(trainer): validate runtime names in platform runtime tools (#236)

* fix(trainer): validate runtime names in platform runtime tools

create_runtime, patch_runtime and delete_runtime passed `name` straight to the
Kubernetes API. Malformed values — including an empty string — were reported as
successful calls, while every other trainer module (discovery, monitoring,
lifecycle, training) rejects them with VALIDATION_ERROR before any SDK call.
platform.py did not import a validator at all.

#163 and #165 rolled this validation out to discovery and monitoring; the
platform runtime tools were never in scope. This completes that rollout for the
three cluster-scoped mutating tools.

Runtime names are Kubernetes object names and may contain dots, as in the
torchtune runtimes Trainer ships (torchtune-llama3.2-1b), so validate_k8s_name
is too strict here. Adds validate_runtime_name for the subdomain form and uses
it in the three runtime tools.

Signed-off-by: Abhishek <abhikokadwar2@gmail.com>

* fix(core): reject runtime name labels longer than 63 characters

RFC 1123 caps each dot-separated label at 63 characters independently of the
253-character total, so a name such as 64*"a" passed validation here and was
then rejected by the API server. Check each label after the pattern match.

Adds regression tests for a 64-character label alone, leading, trailing and
repeated, plus the 63-character boundary.

Signed-off-by: Abhishek <abhikokadwar2@gmail.com>

* fix(core): anchor name validation with fullmatch

Python treats `$` as matching before a trailing newline, so `re.match` with a
`$`-anchored pattern accepted values such as "runtime\n". The name then reached
the API server carrying the newline.

Switches both K8S_NAME_PATTERN and K8S_SUBDOMAIN_PATTERN to fullmatch().
validate_k8s_name had the same flaw, so the fix covers the discovery, monitoring,
lifecycle and training tools that use it, not only the runtime tools.

Adds regression tests for trailing newlin... (continued)

2196 of 2865 relevant lines covered (76.65%)

2.3 hits per line

Coverage Regressions

Lines Coverage ∆ File
40
48.0
3.71% trainer/api/platform.py
11
92.47
0.74% core/security.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.10 - 35115184991.1 16 Sep 2026 03:26PM UTC 38
76.65
GitHub Action Run
2 python-3.11 - 35115184991.2 16 Sep 2026 03:26PM UTC 38
76.65
GitHub Action Run
3 python-3.12 - 35115184991.3 16 Sep 2026 03:26PM UTC 38
76.65
GitHub Action Run
Source Files on build 35115184991
  • Tree
  • List 38
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35115184991
  • ba5b9f76 on github
  • Prev Build on main (#35114713785)
  • Next Build on main (#35115491258)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc