SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
298 stars 150 forks source link

feature: add support to DELETE meta data #1728

Closed sbender9 closed 1 month ago

sbender9 commented 2 months ago

There is one issue... When there is the same meta data from baseDeltas and from another source (like a plugin). This will delete the plugins meta for that field until restart or the plugin sends it again.

I think we can live with that...?

sbender9 commented 2 months ago

@tkurki if you're ok with this in concept, I'll add some tests...

tkurki commented 2 months ago

Makes sense to me

sbender9 commented 1 month ago

why is this test working when I run it by itself? But not when I run all of them?

Somehow I am getting

{"context":"vessels.urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d","updates":[{"$source":"courseApi","timestamp":"2024-05-04T20:23:24.865Z","values":[{"path":"navigation.course.nextPoint","value":null}]}]}
tkurki commented 1 month ago

Other tests are creating stuff under serverState that creates deltas during server startup, messing up the order of the deltas that the test is getting. There's a new startServer that purges the settings directory before server startup that should be used.

The culprit here is courseApi, that stores the course settings so that they survive server restarts.