Skip to content

add graphql websocket subsciption tests - #768

Open
dwsutherland wants to merge 11 commits into
cylc:masterfrom
dwsutherland:graphql-ws-tests
Open

add graphql websocket subsciption tests#768
dwsutherland wants to merge 11 commits into
cylc:masterfrom
dwsutherland:graphql-ws-tests

Conversation

@dwsutherland

Copy link
Copy Markdown
Member

Adds an integration test for testing the graphql subscriptions via websocket connection.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@dwsutherland dwsutherland added this to the 1.8.2 milestone Dec 20, 2025
@dwsutherland dwsutherland self-assigned this Dec 20, 2025
@dwsutherland
dwsutherland force-pushed the graphql-ws-tests branch 2 times, most recently from a0653ed to 8738722 Compare December 20, 2025 10:55
@dwsutherland dwsutherland changed the title add graphql websocket subsciption test add graphql websocket subsciption tests Dec 20, 2025

@oliver-sanders oliver-sanders left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, one question (see comment).

This pushes code coverage in the right direction 👍:

Screenshot from 2026-01-05 10-58-11

There are still a few gaps:

  • Would be good to cover error handling, e.g, GraphQL validation errors.
  • Would be good to cover more of the websocket subprocotocol (though note that we will change subprotocol soon)
  • Would be good to cover connection termination (as this is something we've had issues with).

Comment thread cylc/uiserver/graphql/tornado.py
Comment thread cylc/uiserver/graphql/tornado.py
Comment thread cylc/uiserver/tests/test_graphql.py Outdated
Comment thread cylc/uiserver/tests/test_graphql.py
@oliver-sanders oliver-sanders modified the milestones: 1.8.2, 1.8.3 Jan 7, 2026
@dwsutherland

Copy link
Copy Markdown
Member Author

There are still a few gaps:

Yes, this is a work in process, I'll keep expanding the tests here (hopefully until 85% project coverage at min)

Comment thread cylc/uiserver/graphql/tornado.py
@dwsutherland
dwsutherland force-pushed the graphql-ws-tests branch 4 times, most recently from 1627744 to 5710e81 Compare January 30, 2026 08:07
@oliver-sanders

oliver-sanders commented Jan 30, 2026

Copy link
Copy Markdown
Member

83% project coverage 🥇

Ping me when you want a review.

@dwsutherland

Copy link
Copy Markdown
Member Author

83% project coverage 🥇

Ping me when you want a review.

Just need to bump up the websocket/subscription side of things first.

@dwsutherland

dwsutherland commented Feb 17, 2026

Copy link
Copy Markdown
Member Author

@oliver-sanders - I think this will do for now, there's some more that could be done with the subscription handler.. But we might as well get this in as a first step for people to build on.

@oliver-sanders
oliver-sanders changed the base branch from 1.8.x to master February 19, 2026 11:14
@oliver-sanders oliver-sanders modified the milestones: 1.8.4, 1.9.0 Feb 19, 2026
@oliver-sanders

Copy link
Copy Markdown
Member

(shifting this onto the 1.9.0 milestone as there are functional code changes)

Comment thread cylc/uiserver/tests/test_graphql.py
@oliver-sanders

Copy link
Copy Markdown
Member

(shifting this onto the 1.9.0 milestone as there are functional code changes)

FYI: We'll be looking to release 1.9.0 shortly once the new Cylc Review is in, would be great to merge this pre-release.

@oliver-sanders oliver-sanders modified the milestones: 1.9.0, 1.10.0 May 6, 2026
@dwsutherland

Copy link
Copy Markdown
Member Author

(re-running CI on fresh merge to see if coverage reports change)

Looks like it's showing as covered now.. I don't want to be too finicky about tornado_ws.py with #821
in bound..

So good to go as is, then I can build on it.. i.e. with #597

@oliver-sanders

Copy link
Copy Markdown
Member

(Codecov sometimes jitters, I think test re-runs can cause it, a fresh run fixes it)

@oliver-sanders oliver-sanders modified the milestones: 1.9.x, 1.10.0 May 26, 2026
@oliver-sanders
oliver-sanders changed the base branch from 1.9.x to master May 26, 2026 09:42
Comment thread cylc/uiserver/tests/test_handlers.py Outdated
Comment thread cylc/uiserver/tests/test_handlers.py Outdated
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@MetRonnie

MetRonnie commented Jun 16, 2026

Copy link
Copy Markdown
Member

Sorry David, I've spotted that #823 didn't actually enable flake8 for the tests, please standby, pending #842

@MetRonnie

Copy link
Copy Markdown
Member

Kicking tests

@MetRonnie MetRonnie closed this Jul 6, 2026
@MetRonnie MetRonnie reopened this Jul 6, 2026
@oliver-sanders

Copy link
Copy Markdown
Member

@dwsutherland, have pushed some lint fixes to this branch in order to nudge this forward.

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.

3 participants