[Bug 898] UDP (local) spots can show an incorrect location of the spotter#907
[Bug 898] UDP (local) spots can show an incorrect location of the spotter#907alanhargreaves wants to merge 4 commits intoaccius:Stagingfrom
Conversation
accius
left a comment
There was a problem hiding this comment.
Review — UDP spotter location fallback (draft)
Minimal, targeted fix. The one-line change is sensible for the local-UDP case: the "spotter" in a local UDP feed is effectively the operator themselves, so falling back to the server's CONFIG.gridSquare (which in self-hosting mode = the operator's grid) is reasonable when the upstream program doesn't supply one.
Concerns / questions
-
CONFIG.gridSquaresemantics in a multi-tenant deployment. On the public server atopenhamclock.com,CONFIG.gridSquareis the server operator's grid, not the individual user's — if this code path is ever reached in the hosted deployment, we'd be tagging every UDP spot with the server's location. Can you confirm thisudpSessioncode path is only hit in self-hosted mode? If there's any chance it runs for hosted users, please guard with anisLocal/isSelfHostedcheck or pass the user's own grid in via the session. -
CONFIGin scope: please double-check thatCONFIGis imported/available at the top of this route, and thatCONFIG.gridSquareis the field name (vsCONFIG.locator— the frontend config useslocator). A grep for otherCONFIG.gridSquarereferences inserver/would be reassuring. -
Nit: consider falling back to
CONFIG.locatorifCONFIG.gridSquareisn't set — same source, different name on the frontend config, and either could be the canonical field depending on how the server reads the user's config. -
PR description typos ("teh", "preoblematical", "gris") — tidy up before marking ready.
Happy to re-review when out of draft.
|
Hmmm, I was under the apparently mistaken impression that this could only run for a local session. OK, a better approach might be to where we have the setting selection for this to have it also request a default grid square where it defaults to the users DE, and pass that when we configure the session. I can see this will need a bit more work and thought. Thank you for picking up on that. |
|
as to locator, it looks like we set it in config.js, but read it in to gridSquare If I just look for locator I get |
|
I think that with making it so you can't set the dxcluster type to 'udp' unless |
|
It just occurred to me, ... In the settings, should I check to see if it's not a local install and the "udp" option is selected, and change it to the recommended? |
What does this PR do?
When using Local UDP for a DX Cluster source, some programs do not list a lat/lon or grid square. When this happens,
s.spotterGridis set tonulland the hooks code tries to find the location based purely on the callsign prefix, which can be preoblematical.This fix uses
CONFIG.gridSquareinstead of just defaulting tonullif no gridSquare is offered.We should also not offer "UDP Spots(local)" as an option for DX Cluster Source unless
isLocalInstallis true. Otherwise we could have random people setting up UDP listeners on servers like OHC.Type of change
How to test
curl localhost:3000/api/dxcluster/pathsspotterGridis set to the local grid squareChecklist
server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)var(--accent-cyan), etc.).bak,.old,console.logdebug lines, or test scripts included