Refresh stale integration tests#4505
Conversation
Greptile SummaryThis PR refreshes stale integration and unit tests to match tightened recipe/API contracts, with no changes to production behaviour. The
Confidence Score: 5/5Safe to merge — all changes are test-side fixes or internal refactoring of the preflight check enum with no behaviour changes to production federation logic. The production change (CheckStatus enum) is a pure rename/type-safety improvement; the old integer codes and the new enum values map one-to-one, and the unit tests explicitly verify every status transition. All recipe test fixes are additive (providing previously-missing fixtures) and the hello-pt test file deletion removes dead code that was never part of a submitted job. No files require special attention. The CheckStatus docstring nit in package_checker.py is the only finding. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[preflight_check.py\ncheck_packages] --> B{should_be_checked?}
B -- No --> C[CheckStatus.PASS]
B -- Yes --> D[PackageChecker.check]
D --> E{All required\nrules pass?}
E -- No --> F[CheckStatus.FAIL]
E -- Yes --> G[check_dry_run]
G --> H{process\nreturncode == 0?}
H -- Yes --> I[CheckStatus.PASS_WITH_CLEANUP]
H -- No --> J[CheckStatus.FAIL_WITH_CLEANUP]
G --> K{TimeoutExpired?}
K -- Yes --> I
G --> L{Exception?}
L -- Yes --> F
I --> M[stop_dry_run force=False]
J --> N[stop_dry_run force=True]
F --> O[No cleanup]
C --> O
Reviews (18): Last reviewed commit: "Merge branch 'main' into codex/refresh-i..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Refreshes several integration/smoke tests to align with tightened Recipe API/preflight-check expectations and to provide required fixtures for recipe-based runs.
Changes:
- Update XGBoost recipe smoke tests to always provide
per_site_configand to constructSimEnvusing explicit client lists. - Adjust recipe-system and experiment-tracking integration tests to satisfy newer recipe/model requirements.
- Update preflight-check integration tests’ expected check sets.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration_test/xgb_vertical_recipe_test.py | Refactors per-site XGBoost vertical test setup into a helper and passes explicit clients/per_site_config. |
| tests/integration_test/xgb_histogram_recipe_test.py | Refactors per-site XGBoost horizontal test setup into a helper and passes explicit clients/per_site_config. |
| tests/integration_test/recipe_system_test.py | Updates dict-model config key used in a recipe simulation test. |
| tests/integration_test/preflight_check_test.py | Updates expected preflight check outputs and related assertions. |
| tests/integration_test/experiment_tracking_recipes_test.py | Adds explicit model fixture creation for experiment-tracking recipe tests. |
| tests/integration_test/data/jobs/hello-pt/app/custom/test_custom.py | Makes hello-pt unit tests deterministic by injecting a single synthetic CIFAR batch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2bcbe4c to
5ea2507
Compare
66761a7 to
28207cb
Compare
28207cb to
0a303f8
Compare
|
Added a signed follow-up commit for the PyTorch The failure was caused by the server Validation:
|
|
Added one more signed follow-up for the same PR #4392 PyTorch persistence tightening: Validation:
|
|
Reviewed the diff. Test-only refresh, scope looks right. A few suggestions before merge: 1. Simplify
|
|
Addressed the two review follow-ups in signed commit
Validation:
|
|
/build |
|
/build |
…tion-tests # Conflicts: # tests/integration_test/preflight_check_test.py
229174b to
66676f3
Compare
|
/build |
|
/build |
|
/build |
Summary
Root Cause
Several integration tests were not updated after production APIs were intentionally tightened. These are test-side fixes only. The hello-pt app/custom test file was also being collected accidentally because it lived under tests/integration_test, but it is not used by the submitted job.
Validation
PYTHONPYCACHEPREFIX=/tmp/nvflare_pycache python3 -m py_compile tests/integration_test/preflight_check_test.pyPYTHONPYCACHEPREFIX=/tmp/nvflare_pycache python3 -m py_compile tests/integration_test/experiment_tracking_recipes_test.py tests/integration_test/xgb_vertical_recipe_test.py tests/integration_test/xgb_histogram_recipe_test.py tests/integration_test/preflight_check_test.pybash -n tests/integration_test/run_integration_tests.shgit diff --checkgit verify-commit HEAD