Commit Graph
100 Commits
Author SHA1 Message Date
Jakob Borg 793b86e604 script: Use strings instead of byte slice literals in asset generation
It compiles literally 50 times faster and generates the same code. Also
add the little header that indicates auto generated code.
2018-06-13 23:48:50 +02:00
Jakob Borg 7b47692ec0 build: MacOS X is now macOS; don't presume to know all possible goarchs 2018-06-13 23:20:52 +02:00
Jakob BorgandAudrius Butkevicius 35a75a95dc lib/model: Don't panic when rechecking file (fixes #5002) (#5003) 2018-06-13 18:07:52 +01:00
Jakob Borg c7c7fbe9d9 gui, man: Update docs & translations 2018-06-13 07:45:27 +02:00
Jakob Borg 4781e1d86f test: Migrate test configs to current version 2018-06-08 12:39:17 +02:00
Jakob BorgandGitHub a467f6908c lib/protocol: Test for IsEquivalent (#4996) 2018-06-08 12:02:16 +02:00
Jakob Borg 02da7414ab cmd/stfindignored: Default to current directory 2018-06-06 22:24:36 +02:00
Jakob Borg d1f953b0dd cmd/stfindignored: Make that 2018 2018-06-06 22:10:17 +02:00
Jakob Borg 47cefb2ab2 cmd/stfindignored: Add utility 2018-06-06 22:08:41 +02:00
Jakob BorgandGitHub 76f9e5c5db lib/protocol: Correct block size calculation on 32 bit archs (fixes #4990) (#4991) 2018-06-06 09:59:33 +02:00
Jakob Borg 27d675a793 lib/upgrade: Tests should pass on darwin-386 2018-06-06 09:47:13 +02:00
Jakob Borg dd9e1d61eb gui, man: Update docs & translations 2018-06-06 07:45:29 +02:00
Jakob Borg 8b15624f7d lib/scanner: Skip block size hysteresis test in -short mode
This burns like a percent of my laptop battery on every invocation...
2018-06-02 13:10:05 +00:00
Jakob Borg e187a5f5cb test: Add another variant of API timeout to skip when benchmarking 2018-05-30 13:23:52 +02:00
Jakob Borg e73631c5f0 gui, man: Update docs & translations 2018-05-30 07:45:27 +02:00
Jakob Borg b87e5ed13d build: Use commit date as assets change date 2018-05-29 08:49:25 +02:00
Jakob Borg c51365c634 script: Use source data from environment when generating assets 2018-05-29 08:39:46 +02:00
Jakob Borg 91f1f3067a gui, man: Update docs & translations 2018-05-23 07:45:25 +02:00
Jakob Borg 119335930c lib/model: Refactor override implementation into sendOnlyFolder
I'm trying to slowly clean this up a bit, and moving functionality out
into the folder types and having those methods not reach into model is
part of it. That can mean takign some odd arguments in the meantime,
some of those should probably become interfaces or properties on folder
in the long term.
2018-05-21 09:09:47 +02:00
Jakob Borg 370a3549e7 lib/model: Refactor folderScanner into folder
The functionality was anyway mostly implemented there and not isolated
in the folderScanner type. The attempt to refactor it out in the other
direction wouldn't work given that the event loop and stuff is on
`folder`.
2018-05-21 08:47:58 +02:00
Jakob BorgandGitHub 127c891526 cmd/stdiscosrv: Delete records for abandoned devices (#4957)
Once a device has been missing for a long time, and noone has asked
about it for a long time, delete the record.
2018-05-16 09:26:20 +02:00
Jakob BorgandGitHub c08024ebb8 lib/db: Add db and test with invalid files (#4954)
This adds a couple of utilities for transporting databases in JSON and a
test to load a database and verify a couple of invalid bits. The test
itself is quite pointless at the moment, but it lays the groundwork for
testing the migration of this data in the next step (after the invalid
bit should be changed to local flags for local files).

When that happens we need to have a database in the old format already
there in order to be able to test the migration.
2018-05-16 08:44:08 +02:00
Jakob Borg 677fde50b3 gui, man: Update docs & translations 2018-05-16 07:45:25 +02:00
Jakob Borg 22b0bd8e13 Merge branch 'release'
* release:
  gui: Fix scopes in notification directive (fixes #4941) (#4948)
  gui: Fallback to folder ID in recent changes (fixes #4947) (#4949)
2018-05-14 08:55:24 +02:00
Jakob Borg 9260248543 gui: Fix scopes in notification directive (fixes #4941) (#4948)
The directive lives in its own isolated scope (where we put the visible() function). The stuff transcluded into the notification directive lives in the root scope and doesn't have access to the directive scope. Hence we cannot call dismiss() from inside the directive.

Similarly, config does not exist by itself in the directive scope, we need $parent to access the root scope.

Reference: https://docs.angularjs.org/guide/directive#isolating-the-scope-of-a-directive

How this worked before is a mystery. My guess is Angular bug with directive scope that was fixed in 1.3. One possibility is that transclude plus scope: true (which doesn't make sense as that is supposed to be an object) resulted in the root scope being used in the directive itself. This would then "work" as long as there is only one notification, as visible() and dismiss() would then be registered on the root scope, thus accessible from within the notification but also overridden by any notification rendered.
2018-05-14 08:53:06 +02:00
Jakob BorgandGitHub 20aa53486a all: Serialize folder types to new names (#4942)
It's been a year and a half since we started accepting the new names.
It's time we start producing them.
2018-05-13 09:58:00 +02:00
Jakob BorgandGitHub ed4807d9a4 gui: Fix scopes in notification directive (fixes #4941) (#4948)
The directive lives in its own isolated scope (where we put the visible() function). The stuff transcluded into the notification directive lives in the root scope and doesn't have access to the directive scope. Hence we cannot call dismiss() from inside the directive.

Similarly, config does not exist by itself in the directive scope, we need $parent to access the root scope.

Reference: https://docs.angularjs.org/guide/directive#isolating-the-scope-of-a-directive

How this worked before is a mystery. My guess is Angular bug with directive scope that was fixed in 1.3. One possibility is that transclude plus scope: true (which doesn't make sense as that is supposed to be an object) resulted in the root scope being used in the directive itself. This would then "work" as long as there is only one notification, as visible() and dismiss() would then be registered on the root scope, thus accessible from within the notification but also overridden by any notification rendered.
2018-05-13 07:44:19 +02:00
Jakob BorgandGitHub 0c81fa4191 cmd/syncthing: Return formatted JSON in API (#4945)
Because machines don't care, and sometimes humans read the output.
2018-05-12 15:14:41 +02:00
Jakob Borg 9e696a154b lib/model: Rename {ro,rw}folder.go
To newer names better reflecting their types and yet sorting together
with folder.go. Doing it now without asking because there are no open
PRs that will get killed by it, and to avoid bikeshedding the names.
2018-05-11 11:00:02 +02:00
Jakob BorgandGitHub 344e52e311 lib/model: Refactor {ro,rw}folder serve loop into just folder (#4939)
The actual pull method (which is really the only thing that differs
between them) is now an interface member which gets overridden by the
subclass.

"Subclass?!" Well, this is dynamic dispatch with overriding, I guess.
2018-05-11 10:45:13 +02:00
Jakob Borg fb198a0645 lib/db: Actually delete the correct sequence prefix 2018-05-09 12:06:29 +02:00
Jakob Borg 15d0bdcba9 authors: Add xjtdy888 2018-05-09 08:42:27 +02:00
Jakob Borg b6b0d0664d gui, man: Update docs & translations 2018-05-09 07:45:15 +02:00
Jakob BorgandAudrius Butkevicius 2343c82c33 lib/model: Don't include unshared folders in ClusterConfig (fixes #4926)
Also fixes a data race where ClusterConfig would access folderFiles
without a lock. Tweaked the ClusterConfig unit test to verify the
behavior.
2018-05-08 08:19:34 +01:00
Jakob Borg 616883304e Revert "build: Only the first dash in the Debian version should become a tilde"
This reverts commit 1cb09b7d2d.

I misunderstood and acted too quickly.
2018-05-05 15:33:54 +02:00
Jakob Borg 1cb09b7d2d build: Only the first dash in the Debian version should become a tilde 2018-05-05 15:29:51 +02:00
Jakob BorgandAudrius Butkevicius 3b5e1fa0fc gui: Update Angular to 1.3.20, enable $applyAsync (fixes #4918) 2018-05-05 11:13:16 +01:00
Jakob Borg c9c2e69f49 authors: Add thunderstorm99 2018-05-05 10:27:26 +02:00
Jakob Borg 678c80ffe4 authors: Add harrisonhjones (fixes #4909) 2018-05-02 08:40:33 +02:00
Jakob Borg 0f1d0380dc build: Syso stuff needs to happen on build (ref #4909) 2018-05-02 08:37:53 +02:00
Jakob Borg 58bc722a1f gui, man: Update docs & translations 2018-05-02 07:45:15 +02:00
Jakob BorgandAudrius Butkevicius c2f498fc82 lib/model: Units are hard (fixes #4910) 2018-05-01 22:50:23 +01:00
Jakob Borg 78094fa0cb gui, man: Update docs & translations 2018-04-25 07:45:13 +02:00
Jakob Borg 56cf2db68b Merge branch 'release'
* release:
  vendor: Update github.com/syncthing/notify (fixes #4885) (#4894)
2018-04-21 13:43:56 +02:00
Jakob Borg 25bf406f0e authors: Patch pramodhkp 2018-04-20 08:03:11 +02:00
Jakob Borg bed6fb8baf authors: Add pramodhkp 2018-04-18 21:37:40 +02:00
Jakob Borg d903bf79c5 gui, man: Update docs & translations 2018-04-18 07:45:16 +02:00
Jakob Borg 49cfe57edc Merge branch 'release'
* release:
  lib/osutil: Fix TraversesSymlink with symlinked fs root on windows (fixes #4875) (#4886)
2018-04-18 07:33:01 +02:00
Jakob BorgandAudrius Butkevicius dbcf7a02a0 lib/model: Increase the default pull limit (fixes #4883)
Bumping the limit to 2 * the max block size (16 MiB) is a slight
increase compared to previously. Nonetheless I think it's good to allow
us to queue one request and have one on the way in, or conversely have
one large block on the way in and be able to ask for smaller blocks from
others at the same time.
2018-04-17 07:55:49 +01:00
Jakob Borg 7be53bbb88 Merge branch 'release'
* release:
  lib/fs: Fix watcher panic due to casing on windows (fixes #4877)  (#4878)
2018-04-16 20:14:54 +02:00
Jakob BorgandAudrius Butkevicius 19c7cd99f5 all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
Jakob Borg 8f6d587ecb authors: Patch wwwutz 2018-04-14 14:39:41 +02:00
Jakob Borg ea43e089d4 authors: Add wwwutz 2018-04-14 10:43:42 +02:00
Jakob BorgandAudrius Butkevicius 5fa9237a62 script: Don't base64 encode the assets (#4874)
We did this to minimize source size and make it compile faster. Nowadays
byte slice literals compile as fast as anything, and the source isn't
checked in so it doesn't matter how big it is.

Not using base64 avoids a decode step at startup and makes the binary
about 400k smaller.
2018-04-11 22:02:14 +01:00
Jakob Borg fa367e92b0 gui, man: Update docs & translations 2018-04-11 07:45:15 +02:00
Jakob BorgandGitHub e9c6795ef8 docker: Add README from old Docker repo (fixes #4868) (#4869)
With slight modifications
2018-04-09 10:48:37 +02:00
Jakob Borg cf4d7ff50f gui, man: Update docs & translations 2018-04-04 07:45:15 +02:00
Jakob BorgandGitHub 6982c06261 cmd/strelaypoolsrv: Handle portless X-Forwarded-For (#4856) 2018-04-01 21:29:34 -04:00
Jakob Borg 8b052a950d authors: Add fuzzybear3965 2018-03-28 15:48:04 -04:00
Jakob Borg 4aaf8d4ceb gui, man: Update docs & translations 2018-03-28 07:45:15 +02:00
Jakob Borg 8ac11f19bd Merge branch 'release'
* release:
  lib/scanner, lib/model: Actually assign version when un-ignoring (fixes #4841) (#4842)
2018-03-27 16:27:53 -04:00
Jakob BorgandGitHub 59802c3981 cmd/stdiscosrv, vendor: Remove remnants of golang.org/x/net/context (#4843) 2018-03-27 07:37:34 -04:00
Jakob Borg bdbaa84989 lib/connections: Wrong context snuck in somehow 2018-03-27 07:18:26 -04:00
Jakob Borg c49d864f14 lib/connections: Slightly refactor limiter juggling
Two small behavior changes: don't "charge" the data to the global rate
limit until it's been accepted by the device specific limiter, and fix
the send/recv direction in the log print on per device rate limits.
2018-03-26 11:45:02 -04:00
Jakob Borg d6bb8e6e06 docker: Build using Go 1.10 2018-03-24 09:21:22 +01:00
Jakob Borg ac2e9b0e09 authors: Update grahammiln 2018-03-21 08:00:41 +01:00
Jakob Borg 6cb4ac9ec2 gui, man: Update docs & translations 2018-03-21 07:45:15 +01:00
Jakob Borg 7da829a86f authors: Add grahammiln 2018-03-20 19:59:55 +01:00
Jakob BorgandSimon Frei 7872bfa173 cmd/syncthing: Improve local host check (fixes #4815) (#4816)
This does a less restrictive (and more correct) check on the IP address,
and also allows the fully qualified "localhost.".
2018-03-15 11:29:52 +01:00
Jakob BorgandSimon Frei bea3c01772 vendor: github.com/Zillode/notify is now github.com/syncthing/notify (#4813)
Given that we've taken on the resposibility of maintaining this forked
package I've added it to the Syncthing organization. We still vendor it
like an external package, because it's convenient to keep it as a fork
of upstream to easier merge and file pull requests towards them.
2018-03-14 14:48:22 +01:00
Jakob BorgandGitHub 470ef87dd5 vendor: Don't panic in FS watcher on old FreeBSD (fixes #4806) (#4809)
This adds a recover step to the notify package to avoid the panic. We
should get something like this upstreamed.
2018-03-13 13:31:26 +01:00
Jakob BorgandGitHub 1471c15b29 cmd/syncthing, lib/db: Be nicer about dropping deltas on upgrade (#4798)
When dropping delta index IDs due to upgrade, only drop our local one.
Previously, when dropping all of them, we would trigger a full send in
both directions on first connect after upgrade. Then the other side
would upgrade, doing the same thing. Net effect is full index data gets
sent twice in both directions.

With this change we just drop our local ID, meaning we will send our
full index on first connect after upgrade. When the other side upgrades,
they will do the same. This is a bit less cruel.
2018-03-10 11:42:01 +01:00
Jakob Borg 4b1782cf6d gui, man: Update docs & translations 2018-03-07 07:45:16 +01:00
Jakob Borg 71fab4d250 cmd/stdiscosrv: Record time of failed lookup
So that we can eventually garbage collect keys that noone is asking
about any more.
2018-03-06 16:15:29 +01:00
Jakob Borg 22ebc80329 cmd/stdiscosrv: Expose process metrics
Like this:

    $ curl -s http://localhost:9098/metrics | egrep '^syncthing_discovery_process'
    syncthing_discovery_process_cpu_seconds_total 12.92
    syncthing_discovery_process_max_fds 10240
    syncthing_discovery_process_open_fds 51
    syncthing_discovery_process_resident_memory_bytes 1.3674496e+08
    syncthing_discovery_process_start_time_seconds 1.52034731837e+09
    syncthing_discovery_process_virtual_memory_bytes 1.40324864e+08
2018-03-06 15:43:36 +01:00
Jakob Borg 74b820f287 test: Update conflict tests 2018-03-04 14:52:09 +01:00
Jakob Borg a26778fa9b gui, man: Update docs & translations 2018-02-28 07:45:16 +01:00
Jakob BorgandAudrius Butkevicius d4b7be009c cmd/syncthing: Reset delta indexes on upgrade 2018-02-26 22:22:19 +00:00
Jakob BorgandGitHub 42cc64e2ed lib/config, lib/model: Auto adjust pullers based on desired amount of pending data (#4748)
This makes the number of pullers vary with the desired amount of outstanding requests instead of being a fixed number.
2018-02-25 10:14:02 +01:00
Jakob BorgandAudrius Butkevicius e99be02055 lib/model: Don't panic if block size in index is larger than protocol block size
This doesn't happen today, but it might in the future if the block size
were increased or made variable and we were talking to a client from the
future.
2018-02-24 07:34:23 -05:00
Jakob BorgandAudrius Butkevicius a27032f09e cmd/strelaysrv: Don't patch the default HTTP client (fixes #4745) 2018-02-21 09:56:04 -05:00
Jakob BorgandGitHub 5e041dca9f cmd/strelaypoolsrv: Return better error codes and messages (#4770)
The current 500 "test failed" looks and sounds like a problem in the
relay pool server, while it actually indicates a problem on the
announcing side. Instead use 400 "connection test failed" to indicate
that the request was bad and what was the test.
2018-02-21 12:53:49 +01:00
Jakob Borg c9ec6159e8 lib/fs, vendor: s/zillode/Zillode/ 2018-02-21 08:27:33 +01:00
Jakob Borg 5b17aae1b2 cmd/syncthing: Fix help text for STRECHECKDBEVERY (fixes #4764) 2018-02-21 08:26:57 +01:00
Jakob Borg 5931231a32 gui, man: Update docs & translations 2018-02-21 07:45:16 +01:00
Jakob BorgandGitHub 7a92f6c6b1 lib/db: Don't panic on negative counts (#4761)
* lib/db: Don't panic on negative counts (fixes #4659)

So, negative counts should never happen and hence the original idea to
panic. However, this sucks as the panic will happen in a folder runner,
be automatically swallowed by suture, and the runner gets restarted but
now we are in a bad state. (Related: #4758)

At the time of writing the global list is somewhat in flux (we've
changed how ignored files are handled, invalid bits, etc.) and I think
that can cause unusual conditions here. Hence just fixing up the numbers
instead until the next full recount.
2018-02-14 11:25:34 +01:00
Jakob Borg b57c9b6af5 gui, man: Update docs & translations 2018-02-14 07:45:17 +01:00
Jakob BorgandAudrius Butkevicius c120c3a403 lib/scanner: Error handling in walk function (fixes #4753) (#4754) 2018-02-13 10:02:07 +00:00
Jakob Borg 2bbd2d6ed1 Merge branch 'release'
* release:
  lib/osutil: Fix priority lowering on Windows
  lib/osutil: Don't attempt to reduce our niceness level (fixes #4681)
  lib/osutil: Check PGID before trying to set it (fixes #4679)
2018-02-12 15:27:27 +01:00
Jakob BorgandGitHub b97d5bcca8 Remove KCP (fixes #4737) (#4741) 2018-02-09 11:40:57 +01:00
Jakob Borg 8cdab7231a meta: Fix authors check 2018-02-07 17:32:26 +01:00
Jakob Borg c17547159e gui, man: Update docs & translations 2018-02-07 07:45:17 +01:00
Jakob Borg 043b04d8a6 github: I want to review changes to the AUTHORS file and top level READMEs
Also move the issue template stuff for less clutter
2018-02-04 22:54:38 +01:00
Jakob BorgandGitHub 649d4cf7b0 dockerfile: Add Dockerfile (#4733)
This adds a multi stage build Dockerfile. The end state is equivalent to
the current syncthing/docker repository (which will be retired).
2018-02-04 22:43:14 +01:00
Jakob BorgandGitHub 98f2875b22 lib/fs: Further unflake watch tests (#4735) 2018-02-04 22:25:59 +01:00
Jakob Borg 2fdf9bc55d test: Mend the transfer benchmark 2018-02-03 10:29:05 +01:00
Jakob Borg c0ab669142 gui, man: Update docs & translations 2018-01-31 07:45:16 +01:00
Jakob BorgandAudrius Butkevicius 0fe3ae7c22 lib/fs: Unflake watch tests (fixes #4687)
This removes a number of timing related things, leaving just the total
test timeout now bumped to one minute. Normally we get the filesystem
events within a second or so, so this doesn't affect the test time in
the successfull case. If we don't actually get the events we expect
within a minute I think we are legitimately in "failed" territory.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4715
LGTM: imsodin, AudriusButkevicius
2018-01-28 10:44:43 +00:00
Jakob Borg 5d0eb80204 lib/protocol: Disable broken KCP benchmark 2018-01-28 10:41:03 +01:00
Jakob Borg 441230ff77 cmd/stdiscosrc: Handle address family indicator on other schemes than tcp 2018-01-28 10:24:48 +01:00