Skip to content

lib/api, lib/db: Add file debug endpoint - #7095

Merged
imsodin merged 1 commit into
syncthing:mainfrom
imsodin:api/filedebug
Nov 10, 2020
Merged

imsodin merged 1 commit into
syncthing:mainfrom
imsodin:api/filedebug

Conversation

@imsodin

@imsodin imsodin commented Nov 6, 2020

Copy link
Copy Markdown
Member

The /rest/db/file endpoint already has a good amount of helpful info when debugging weird out-of-sync issues, but it doesn't give the full picture. I added a /rest/debug/file endpoint which in addition to the info already contained in /rest/db/file also prints the global versions. Thus one can see at a glance all involved devices and at which versions they are (plus if ignored and/or deleted). I named all the involved method with Debug and the api data is a string, as it is an internal implementation detail and should not be used for anything but debugging.

@calmh

calmh commented Nov 9, 2020

Copy link
Copy Markdown
Member

Is this better than adding more info to the existing file endpoint?

@imsodin

imsodin commented Nov 9, 2020

Copy link
Copy Markdown
Member Author

I didn't want to do that because of the global version list being an implementation detail. While unlikely, I don't want anyone to start depending on that info. On a /rest/debug endpoint it seems fine to e.g. change the format at any time, while on /lib/db/file not so much.

@imsodin
imsodin merged commit 1d3b987 into syncthing:main Nov 10, 2020
@imsodin
imsodin deleted the api/filedebug branch November 10, 2020 08:24
@calmh calmh added this to the v1.12.0 milestone Nov 10, 2020
calmh added a commit to calmh/syncthing that referenced this pull request Nov 11, 2020
* main: (42 commits)
  gui: Initialise sharing when accepting new device (fixes syncthing#7113) (syncthing#7114)
  gui: Initialise sharing when accepting new device (fixes syncthing#7113) (syncthing#7114)
  lib/model: Prevent test deadlock (syncthing#7110)
  lib/api, lib/db: Add file debug endpoint (syncthing#7095)
  gui: Add advance config port mapping to gui (fixes syncthing#4824) (syncthing#7017)
  lib/tlsutil: Add O and OU to generated certificates (fixes syncthing#7108) (syncthing#7109)
  all: Add untrusted folders behind feature flag (ref syncthing#62) (syncthing#7055)
  build: Update notify (fixes syncthing#5360) (syncthing#7106)
  lib/model: Fix locking when resending cluster-configs (syncthing#7107)
  gui: Remove superfluous translate in previous (ref syncthing#7102)
  gui: Add warning when JavaScript is disabled in Web browser (fixes syncthing#7099) (syncthing#7102)
  lib/model: Add done chan to track folder-lifetime (fixes syncthing#6664) (syncthing#7094)
  lib/model: Send indexes for newly shared folder (fixes syncthing#7098) (syncthing#7100)
  lib/folder: Clear pull errors when nothing is needed anymore (syncthing#7093)
  lib/api: Fix debug endpoints (ref syncthing#7001) (syncthing#7092)
  gui, man, authors: Update docs, translations, and contributors
  lib/config: Sanity checks on MaxConcurrentWrites (ref syncthing#7064) (syncthing#7069)
  lib/ur: Fix panics in failure-reporting (fixes syncthing#7090) (syncthing#7091)
  lib/ur: Fix panics in failure-reporting (fixes syncthing#7090) (syncthing#7091)
  build: Update dependencies (syncthing#7088)
  ...
@imsodin imsodin modified the milestones: v1.12.0, v1.12.1 Dec 18, 2020
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Nov 11, 2021
@syncthing syncthing locked and limited conversation to collaborators Nov 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants