Skip to content

model.go: use WARNING for "Unexpected folder" messages - #8998

Merged
calmh merged 2 commits into
syncthing:mainfrom
ckujau:patch-1
Jul 22, 2023
Merged

calmh merged 2 commits into
syncthing:mainfrom
ckujau:patch-1

Conversation

@ckujau

@ckujau ckujau commented Jul 22, 2023

Copy link
Copy Markdown
Contributor

Purpose

Use the WARNING log level for "Unexpected folder" messages.

So, this Syncthing client never complained that it could not sync a certain director^W folder to the Syncthing server. And with INFO messages ignored by monitoring, only logging in to the Syncthing GUI revealed that this new folder needed to be accepted by the server to be synced. As unexpected folder incidents may be uncommon enough, I feel WARNING to be more appropriate here.

Testing

none

Screenshots

n/a

Documentation

n/a

Authorship

Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.

So, this Syncthing client never complained that it could not sync a certain director^W folder to the Syncthing server. And with INFO messages ignored by monitoring, only logging in to the Syncthing GUI revealed that this new folder needed to be accepted by the server to be synced. As unexpected folder incidents may be uncommon enough, I feel WARNING to be more appropriate here.
@calmh

calmh commented Jul 22, 2023

Copy link
Copy Markdown
Member

Agreed on the first one in the diff as I think that's a "can't happen" scenario, or at least indicates something odd or problematic in the setup or timing of changes. This is probably not the one you saw, I think.

The second one though is a normal effect of just adding a folder, it'll pop up together with the prompt to add the folder in the gui and that seems excessive. I would rather suggest tweaking your logging rules if this is a thing you depend on, or using the API to manage and verify folder statuses.

@ckujau

ckujau commented Jul 22, 2023

Copy link
Copy Markdown
Contributor Author

Understood, thanks for explaining, @calmh! Adjusted the PR as suggested, if I got that right.

@calmh
calmh enabled auto-merge (squash) July 22, 2023 21:06
@calmh
calmh merged commit 6b6b2c6 into syncthing:main Jul 22, 2023
@ckujau
ckujau deleted the patch-1 branch July 22, 2023 21:28
calmh added a commit to calmh/syncthing that referenced this pull request Jul 25, 2023
* main:
  gui: Remove Twitter link from footer (syncthing#9000)
  gui, man, authors: Update docs, translations, and contributors
  lib/ur: Don't report uptime if start time is in the past (fixes syncthing#7698) (syncthing#8996)
  lib/model: use WARN for "Unexpected folder" messages (syncthing#8998)
  lib/osutil: Skip setLowPriority in Windows if already lower (fixes syncthing#6597) (syncthing#8993)
  all: replace empty slice literal with `var` (syncthing#8990)
  all: fix unused method receiver (syncthing#8988)
  all: unused parameter should be replaced by underscore (syncthing#8989)
  gui, man, authors: Update docs, translations, and contributors
  cmd/syncthing: Mention STVERSIONEXTRA in --help output (ref syncthing#8980)
  gui, lib/api: Add possibility to feed through extra version information (syncthing#8980)
  cmd/ursrv: Update map tile URL
  cmd/strelaypoolsrv: Update map tile URL (syncthing#8985)
  cmd/stcrashreceiver: Correct parsing of current version string
calmh added a commit to calmh/syncthing that referenced this pull request Jul 25, 2023
* main:
  gui: Remove Twitter link from footer (syncthing#9000)
  gui, man, authors: Update docs, translations, and contributors
  lib/ur: Don't report uptime if start time is in the past (fixes syncthing#7698) (syncthing#8996)
  lib/model: use WARN for "Unexpected folder" messages (syncthing#8998)
  lib/osutil: Skip setLowPriority in Windows if already lower (fixes syncthing#6597) (syncthing#8993)
  all: replace empty slice literal with `var` (syncthing#8990)
  all: fix unused method receiver (syncthing#8988)
  all: unused parameter should be replaced by underscore (syncthing#8989)
@calmh calmh added this to the v1.23.7 milestone Jul 31, 2023
@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 Jul 22, 2024
@syncthing syncthing locked and limited conversation to collaborators Jul 22, 2024
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