Add missing test modules for the edge3 provider - #73111
Open
keith991001 wants to merge 2 commits into
Open
Conversation
The OVERLOOKED_TESTS guard list carries six edge3 entries. Five of the test modules are genuinely missing; test_edge_worker.py already exists on main but its exemption was never removed (the stale-entry check compares Path objects against strings and never fires), so the module methods and worker lifecycle operations it should cover were untested. Batch the whole provider into one change, as requested by the maintainers when closing the old tracking issue: add the five missing test modules, extend test_edge_worker.py to cover the model queue handling and the maintenance/shutdown/queue/concurrency operations, and drop all six edge3 exemptions from the guard list.
keith991001
requested review from
dheerajturaga,
jscheffl and
shubhamraj-git
as code owners
September 14, 2026 02:52
The kwargs-dict factory pattern defeats mypy's heterogeneous-dict inference and the Optional-returning lookup helper leaked union types into assertions, both failing the providers type check in CI. Spell out the factory parameters and split the worker lookup into an asserting getter and an Optional finder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch of missing test modules for the
edge3provider, filling all sixOVERLOOKED_TESTSentries for the provider in one PR — grouped per provider as requested by the maintainers when closing the old tracking issue #35442 (all further context there).New test modules (80 tests total across the change):
models/test_edge_job.py—EdgeJobModel:key→TaskInstanceKeymapping,queued_dttmdefault,last_update_tfallback, DB round trip, per-try rowsmodels/test_edge_logs.py—EdgeLogsModel: constructor field mapping, DB round trip, incremental chunks as separate rowsworker_api/test_datamodels.py—EdgeJobBase.key,EdgeJobFetchedcommand coercion +identifier,WorkerStateBody/WorkerQueuesBasedefaults and enum coercion,PushLogsBodytimestamp parsing,versions_matchdefaulting toFalseon both return modelsworker_api/test_datamodels_ui.py—Worker/Jobdefaults and required fields, collection responses,ConcurrencyRequestgt=0bound, request-body validation errorscli/test_example_extended_sysinfo.py— measured sysinfo fields, INFO/WARNING/ERROR thresholds for CPU and free disk, status-file override pathsOne special case:
models/test_edge_worker.pyalready exists onmain, but itsOVERLOOKED_TESTSexemption was never removed — the stale-entry check comparesPathobjects against strings and never fires (#71985 fixes that mechanism). The existing file only covered metrics and host queries, so this PR extends it with the untested surface (EdgeWorkerModelqueue handling and the maintenance/shutdown/remove/queue/concurrency lifecycle operations, 33 new tests) and removes the stale exemption alongside the five real ones.All 80 tests pass locally; the
test_providers_modules_should_have_testsguard passes with the six entries removed.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines