Repository navigation
test(frontend): request self-host metadata from the mocker's endpoint - #18550
zhongdaor-nv wants to merge 1 commit into
Conversation
`test_worker_serves_metadata_via_http` requested `/v1/metadata/dynamo/sample/generate/...`, but `MockerWorkerProcess` passes no `--endpoint`, so the mocker registers its metadata under its default `dyn://dynamo.backend.generate`. `sample` is the default component of `SampleUnifiedWorkerProcess`, a different class. The route is an exact lookup on the endpoint triple, so the worker correctly answered 404 and the first assertion failed. Request the component the worker registers under. The three assertions (config.json is 200 and parses as a HF config, missing.json is 404, vocab.json is 200 and non-empty) are unchanged. Signed-off-by: Zhongdao Ren <zhongdaor@nvidia.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe metadata HTTP test now uses ChangesMetadata HTTP test
Estimated code review effort: 1 (Trivial) | ~3 minutes Severity of issue fixed: Low Merge Risk:
|
✅ Dynamo PR CI passed — run 42936178546 (attempt 2) on
|
Overview
test_worker_serves_metadata_via_httpalways fails with 404: it requests the self-host metadata route under componentsample, while the mocker it starts registers underbackend. This PR requests the component the worker registers under, so the test checks the route again.Key Changes
Core logic: 0 lines. One test file (+5/−5).
tests/frontend/test_self_host_metadata.py: the URL component changes fromsampletobackend, and the comment that named the wrong default is corrected.The three assertions (
config.jsonis 200 and parses as a HF config,missing.jsonis 404,vocab.jsonis 200 and non-empty) are unchanged.Validation
Cause.
MockerWorkerProcesspasses no--endpoint, so the mocker usesDEFAULT_ENDPOINT = dyn://dynamo.backend.generate(components/src/dynamo/mocker/args.py).sampleis the default component ofSampleUnifiedWorkerProcess, a different class. The route is an exact lookup on the endpoint triple, so the worker correctly answers404 Not found. The URL has been wrong since #10351 added the endpoint triple to it.Fix. The test requests
/v1/metadata/dynamo/backend/generate/..., the endpoint the worker registered.Assumption kept. The
dynamosegment is the default namespace. The mocker builds its default endpoint fromDYN_NAMESPACE(defaultdynamo) andDYN_NAMESPACE_WORKER_SUFFIX(components/src/dynamo/mocker/args.py,components/src/dynamo/common/utils/namespace.py), so the URL matches only when neither variable is set in the test environment. The test made the same assumption before this change, and this PR leaves it as is.main@ 0f6b82b)test_worker_serves_metadata_via_httpAssertionError: GET http://localhost:24170/v1/metadata/dynamo/sample/generate/qwen_qwen3-0_6b/_base/config.json returned 404: Not found(1 failed in 4.06s)1 passed in 4.18sThe worker log of the failing run shows
Using default endpoint: dyn://dynamo.backend.generate. Run on x86_64 against theai-dynamo/ai-dynamo-runtime1.7.0.dev20261110wheels with the mocker, etcd 3.4.30, and nats-server 2.10.24.CI coverage. No workflow selects this test: it is
post_merge+gpu_0with no backend marker, and the non-backend jobs selectpre_mergeonly (see theTODO: widen to include post_mergeinpost-merge-ci.yml). CI on this PR does not exercise the change, so the run above is the validation. To reproduce:python -m pytest -m "post_merge and gpu_0" tests/frontend/test_self_host_metadata.pyIssues and Ongoing Work
test_self_host_metadata).Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code
Summary by CodeRabbit