Subscription - #106
Conversation
Read initial log level from config file if present. Once the server is
running the level can be changed via a POST request to /loglevel/{level}
where level is one of info, debug or trace.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #106 +/- ##
==========================================
+ Coverage 49.27% 50.91% +1.64%
==========================================
Files 13 14 +1
Lines 621 707 +86
==========================================
+ Hits 306 360 +54
- Misses 315 347 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Possibly related to this, I'm not able to run any subscriptions. Is there a way to get it working with the current state or does the auth stuff need fixing first? |
|
The way I'm testing it is by chaning these lines in the tiled server code to just return "secret" I tried to get the headers today but could'nt find a way |
691e822 to
4bb20a3
Compare
tpoliaw
left a comment
There was a problem hiding this comment.
The public_address problem and the error reporting are the main changes needed - most of the other comments aren't critical
|
@tpoliaw I have fixed the public address issue and the errors are also reported now. Think to note : tiled has a new way of doing auth for websocket To test if errors are coming try adding the apikey header with a wrong value For unit tests:- |
tpoliaw
left a comment
There was a problem hiding this comment.
The graphiql editor is also failing to get the schema with a CORS error - no idea why
| let (ws_stream, _) = match connect_async(request).await { | ||
| Ok(ws) => ws, | ||
| Err(e) => { | ||
| return error!("Failed to connect to WebSocket: {}", e); |
There was a problem hiding this comment.
This is returning () and the user won't see any errors. Could we make the method return either Stream<Item=Result<...>> or Result<Stream<...>> (or even Result<Stream<Item=Result<...>>>) so that the user gets feedback when the connection fails?
These are the limitation of the tiled server ws
Currently I can get updates on the root node of creation of new node
and patch updates + creation updates for a particular node
To test the subscription to tiled websocket
docker run -d --rm --name tiled-test-redis -p 6379:6379 docker.io/redis:7-alpinetiled serve catalog --temp --api-key secret --cache redis://localhost:6379Todo:
I was not able to pass the API key in the header(Done)testsDone with help from gemini