You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SEP-1818: Warn when the chosen executor node is not the node hosting the target service (#1399)
## Summary
Added an advisory executor-host mismatch warning so SEP task forms can
surface when the selected executor runs on a different node than the
selected service, without changing submission or cascade behavior.
- `app/sep/apps/framework/form_dsl/markers.py`,
`app/sep/apps/framework/form_dsl/derivation.py`,
`app/sep/apps/framework/schema.py`,
`app/sep/apps/framework/form_dsl/model.py`,
`app/sep/apps/alters/models.py`: added the new `target_service`
form-DSL/schema contract, derived it onto host fields, and declared
`service_id` as the target service for executor host fields.
-
`frontend/packages/framework/src/components/HostSelector/HostSelector.tsx`,
`frontend/packages/framework/src/components/HostSelector/isHostMismatch.ts`,
`frontend/packages/framework/src/components/SchemaFormRenderer/fields/HostField.tsx`,
`frontend/packages/api/src/types/app-schema.ts`: added address-based
mismatch detection, rendered a non-blocking warning in the single host
selector, and threaded the new schema field through the frontend types
and renderer.
- `frontend/packages/api/specs/sep.json`,
`frontend/packages/api/src/generated/sep.ts`,
`tests/app/sep/snapshots/openapi/*.json`,
`tests/app/sep/snapshots/schema/*.json`: regenerated the OpenAPI spec,
generated TypeScript client, and schema/openapi snapshots for the
additive `target_service` contract.
- `tests/app/sep/apps/framework/test_form_dsl.py`,
`tests/app/sep/apps/framework/test_task_form_model.py`,
`frontend/packages/framework/src/components/HostSelector/isHostMismatch.test.ts`,
`frontend/packages/framework/src/components/HostSelector/HostSelector.test.tsx`:
added backend/frontend coverage for derivation rules, task-form
propagation, mismatch comparison, warning rendering, and silence states.
- Test files: updated focused backend and frontend tests to cover the
new warning behavior and preserve existing host selector behavior.
## Tested
- [x] Show a warning when the host and service are on different nodes,
and hide it when they match.
- [x] Do not show the warning when the service is missing or the check
cannot run.
- [x] Keep MongoDB Backup cascade working, and warn only if the user
picks a different host.
## Checklist
<!-- Check items that apply. Leave unchecked items visible — reviewers
use this too. -->
- [x] New/modified functions have type hints and rST docstrings
- [x] New tests added for new features or bug fixes
- [x] All tests pass locally (`make test`)
- [x] Pre-commit hooks pass (`make run-pre-commit`)
- [ ] Database migrations generated if models changed (`make
makemigrations`)
- [ ] User-facing changes documented (README, inline help, UI text)
- [ ] Configuration changes documented with examples
- [ ] Changelog fragment added under `changelog.d/` if the change is
user-facing (`make changelog-add`), or confirmed N/A (internal-only
change, or a same-release-cycle fix for an unreleased sibling ticket)
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Task create forms that pick an execution host against a database service now show a non-blocking warning when the selected host is not the node where that service runs; submit stays allowed.
0 commit comments