Skip to content

ci: full queueserver test suite (path-filtered)#47

Closed
Anthony Sligar (sligara7) wants to merge 3 commits into
NSLS2:mainfrom
sligara7:ci/qs-full-suite
Closed

ci: full queueserver test suite (path-filtered)#47
Anthony Sligar (sligara7) wants to merge 3 commits into
NSLS2:mainfrom
sligara7:ci/qs-full-suite

Conversation

@sligara7

Copy link
Copy Markdown
Collaborator

Closes the biggest CI gap since the hard fork: the ~2868-test queueserver suite ran in NO CI (upstream workflows stripped at import; only the 2 Side-B edge files run per PR).

New queueserver-tests workflow:

  • Path-filtered to backend/queueserver_service/** + backend/configuration_service/** (the suite boots config-service in-process) + the workflow file; workflow_dispatch for manual runs.
  • Redis + openldap (bitnamilegacy — Bitnami pulled the public images in 2025; same image, proven 9/9 on the LDAP authenticator tests) service containers.
  • 3 parallel groups via pytest-split using the committed .test_durations (collection verified locally: 2868 tests, groups 1750/589/529 duration-balanced).
  • Single pip invocation installs -e . -e ../configuration_service -r requirements-dev.txt — the editable satisfies bluesky-configuration-service, which is not on PyPI.

Also points the unit-tests.yml header at the new workflow.

…-item result schema

First full-suite CI run surfaced three env pins and two real in-tree bugs:
- requirements-dev.txt pins bluesky==1.14.6, ophyd-async==0.17, numpy==2.3.5 (committed test expectations are generated artifacts sensitive to all three; numpy 2.4 breaks repeated startup-script loading outright)
- /re/metadata called client method missing from released bluesky-queueserver-api -> send_request (pattern used by other in-tree endpoints)
- QueueItem schema now allows 'result': halted/aborted/failed plans return to the queue carrying it; extra=forbid made /queue/get 500 after halt/abort. OpenAPI artifacts regenerated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a dedicated, path-filtered GitHub Actions workflow to run the previously-missing full backend/queueserver_service test suite (including Redis + LDAP dependencies and pytest-split parallelization), and updates queueserver HTTP/OpenAPI artifacts and response models to reflect recent schema changes.

Changes:

  • Add queueserver-tests workflow that runs the full queueserver pytest suite in 3 parallel groups with Redis + OpenLDAP service containers, triggered only on relevant path changes (plus manual dispatch).
  • Update queueserver response models/OpenAPI schemas to include result on queue items and adjust HistoryItem documentation.
  • Switch /re/metadata to use REManagerAPI.send_request to avoid relying on an unexposed client method.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shared-schema/queueserver_service.openapi.json Bumps OpenAPI version and updates HistoryItem/QueueItem schema to include result.
backend/queueserver_service/subprojects/bluesky-httpserver/openapi.json Mirrors OpenAPI schema updates for the packaged httpserver subproject.
backend/queueserver_service/subprojects/bluesky-httpserver/bluesky_httpserver/routers/core_api.py Fixes /re/metadata endpoint by calling send_request instead of a missing client helper.
backend/queueserver_service/subprojects/bluesky-httpserver/bluesky_httpserver/re_manager_schemas.py Adds result to QueueItem and updates HistoryItem semantics/docs.
backend/queueserver_service/requirements-dev.txt Adds exact pins (bluesky/ophyd-async/numpy) to stabilize expectation-based tests.
.github/workflows/unit-tests.yml Updates workflow header comment to point at the new full-suite workflow.
.github/workflows/queueserver-tests.yml Introduces a new CI workflow for the full queueserver test suite with path filtering and parallelization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 77 to 79
class HistoryItem(QueueItem):
"""A history item: a queue item plus the execution ``result`` block.

``result`` is kept free-form in this first cut (tightening it to a typed model is a
noted follow-up)."""

result: Optional[dict] = None
"""A history item: same shape as a queue item, ``result`` always populated."""

Comment on lines +14 to +18
# numpy 2.4 refuses to load its C extension twice in one process
# ("cannot load module more than once per process"), which breaks every
# code path that re-loads startup scripts/modules in-process
# (qserver-list-plans-devices, RE worker startup).
numpy==2.3.5
Comment on lines +66 to +68
openldap:
image: bitnamilegacy/openldap:latest
ports:
@sligara7

Copy link
Copy Markdown
Collaborator Author

Has been superseded by refactoring the queueserver service, so is no longer relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants