Commit Graph
84 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub 447c2b3238 Feature/improve ci testing (#5781)
* Added options to insert delays in backend tester

* Added wait delays to Azure and GoogleDrive to see it the CI is more stable with small delays

* Added more debug output to the backend tester

* Fixed dropbox reporting OAuth quota errors, when it is likely Dropbox API quota errors

* Implemented exception detection on AzureBlob backend

* Also showing sleep times in output

* Fixed a bug with the dropbox quota response

* Fixed error message to report correct number of files

* Fixed suppressed warning
2024-12-20 16:10:08 +01:00
Kenneth SkovhedeandGitHub 86f3f6b178 Fixed issues with timeout in msgraph (#5790)
* Fixed issues with timeout in msgraph

Fixed a place where the cancellation token was not applied.

Fixed a problem with msgraph not sending correct DNS information.

Fixed a problem with msgraph downloading the entire file before streaming it, bypassing throttle and tripping the timeout.

Added `ITimeoutExemptBackend` to selectively disable timeouts for backends that do not support it.

Updated the backendmanager to support `ITimeoutExemptBackend`.

Updated the backendmanager to abort as soon as a timeout happens.

* Updated BackendTester to use the `TimeoutObservingStream` and support the `--read-write-timeout` setting.

Updated backend tester code to use `var`

* Fixed a bug reading the `read-write-timeout`

* Updated to using constants with names instead of `-1`.
2024-12-19 09:31:06 +01:00
Kenneth Skovhede 61ea36091a Added DNSNames as async 2024-10-02 09:37:52 +02:00
Kenneth Skovhede 586c08522e Implemented async method for Test, CreateFolder and Quota in all backends.
Still missing the List and DNSHostnames.
The AsyncRequest class is also preventing many backends from fully upgrading.
2024-10-01 09:30:02 +02:00
Kenneth Skovhede 8bdb85e261 Implemented RenameAsync on all backends supporting rename 2024-09-29 23:21:50 +02:00
Kenneth Skovhede ecf2e8b551 Implemented DeleteAsync on all backends 2024-09-29 23:04:54 +02:00
Kenneth Skovhede e3e3d1305f Implemented async version of Get for all backends. 2024-09-29 22:00:57 +02:00
Kenneth Skovhede 3548475360 Implemented preload support.
This commit adds the option to provide preload/preset options that change the default values for Duplicati's commandline or environment variables.
This fixes #5480
2024-08-28 00:18:55 +02:00
Suguru Hirahara a6b8f61646 Remove conjugation more 2024-08-13 08:09:04 -04:00
Kenneth Skovhede 115e887802 Implemented new updater logic that supports multi-arch distributions. 2024-03-15 14:18:56 +01:00
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Thomas Suckow d528703fe7 Merge branch 'master' into experiment/net5-split
# Conflicts:
#	.github/workflows/tests.yml
#	Duplicati.sln
#	Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj
#	Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj
#	Duplicati/CommandLine/Duplicati.CommandLine.csproj
#	Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/Library/Backend/AzureBlob/AzureBlobWrapper.cs
#	Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj
#	Duplicati/Library/Backend/Mega/packages.config
#	Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj
#	Duplicati/Library/Backend/Tardigrade/Duplicati.Library.Backend.Tardigrade.csproj
#	Duplicati/Library/Backend/Tardigrade/Properties/AssemblyInfo.cs
#	Duplicati/Library/Backend/Tardigrade/packages.config
#	Duplicati/Library/Common/Duplicati.Library.Common.csproj
#	Duplicati/Library/Common/IO/SystemIOWindows.cs
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/packages.config
#	Duplicati/Library/Utility/Utility.cs
#	Duplicati/License/Duplicati.License.csproj
#	Duplicati/Server/Duplicati.Server.csproj
#	Duplicati/Server/packages.config
#	Duplicati/UnitTest/Duplicati.UnitTest.csproj
2022-02-22 19:04:01 -08:00
Kenneth Skovhede 8892ff7df3 Cleaned up all .csproj files.
Moved things around to make cleaner build files.
Implementing everything with `netstandard2.1` and then thin wrapper executables using .net5
2021-04-03 13:57:02 +02:00
Tyler Gill 3dce0df106 Fix typo 2021-03-23 17:40:34 -06:00
Tyler Gill a064d66603 Parse throttle speeds in backend tester as sizes. 2021-03-22 10:47:44 -06:00
Tyler Gill da71d28422 Allow backend tester to test throttling. 2021-03-22 09:57:56 -06:00
Kenneth Hsu 87c1fa5a04 Fix compiler warning about unused variable. 2020-03-29 19:17:37 -07:00
Tyler Gill e742205f65 Add --use-http-client=false parameter to backends based on Microsoft Graph APIs (OneDrive v2, SharePoint v2, etc.) to make them use the OAuthHelper and HttpWebRequest infra used by most / all other backends for HTTP requests. This lives in parallel to the original implementation that uses the OAuthHttpClient class, but is intended to see if this prevents the memory leaks and problems seen in some versions of Mono when using the OneDrive v2 backend. 2020-03-23 14:10:40 -06:00
Kenneth Hsu 3551238000 Remove redundant calls to String.Format. 2020-01-25 17:07:02 -08:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Kenneth Hsu 036a0ee8b0 Remove unused variable. 2018-12-31 19:31:03 -08:00
Kenneth Hsu a6153c3cd8 Do not explicitly rethrow exception.
When rethrowing an exception, we should do it by simply calling throw;
and not throw exc;, because the stack trace is reset with the second
syntax, making debugging a lot harder.
2018-12-31 15:25:57 -08:00
Kenneth Hsu 8dd3aeaf26 Use invariant culture in calls to ToLower and ToUpper. 2018-12-11 21:21:07 -08:00
Kenneth Hsu 11689159eb Disable warning about unreferenced field.
This field is unreferenced, but we might now want the object to be
disposed of by the garbage collector.
2018-09-29 13:38:11 -07:00
Kenneth Hsu 81875adcfb Restore removed reference to system settings context.
This initializes some state and is IDisposable, so it is not so trivial
to remove.
2018-09-29 13:20:16 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth Hsu d4692e2d35 Use built-in method to expand environment variables.
After we removed the tilde expansion in revision c9aa6cf5fb ("Avoid
performing tilde expansion"), the Utility.ExpandEnvironmentVariables
method simply called System.Environment.ExpandEnvironmentVariables.  We
can simplify the code by just referencing the built-in method directly.
2018-09-22 19:59:46 -07:00
Kenneth Hsu 0d23302220 Use ordinal case-insensitive comparison instead of ToLower. 2018-09-19 15:21:59 -07:00
verhoek f7a4e5164a Reordered logic. 2018-06-29 19:46:33 +02:00
verhoek f102646359 Fixed to desired behavior. In particular, backend tester works again for the ftp
backend (some backends cannot handle the default set of extended characters).
2018-06-29 19:43:42 +02:00
verhoek 67c8929759 wip 2018-05-23 19:37:49 +02:00
verhoek 7bf1768f80 Implemented default tempdir for backend server. 2018-05-22 21:51:29 +02:00
Tyler Gill 5646e3de9d Add a test for the DNSName property to the BackendTester and report the DNS names it returns. 2018-03-20 15:26:17 -06:00
Tyler Gill 4e4b9a56d6 Adds a test to the BackendTester for quota-enabled backends.
This test simply loads the quota information and displays it (or displays an error if the backend was unable to get it)
2018-03-20 13:53:32 -06:00
Tyler Gill dba0b3772e Add a test to BackendTester for backends which support renaming.
This is done by renaming the second file (or first if only one file is being created) and updating the in memory set of expected files,
while keeping track of the original info so it can be reported if it is still present (e.g., if the rename operated as a copy instead).
2018-03-20 13:50:06 -06:00
Tyler Gill cff8f172fc Add support for 'trim-filename-spaces' flag to BackendTester.
This flag ensures that any randomly generated file names don't have leading or trailing whitespace, which some backends might not support.
2018-03-20 13:48:21 -06:00
Tyler Gill 00c1a296da BackendTester should explicitly call Test() when performing the initial check to see if the main folder exists.
Without this, the auto create folders flag was broken for backends which lazily enumerate List() (as they instead throw after the try block is ended)
Calling Test() dierctly also better matches the IBackend interface contract.
2018-03-20 13:46:49 -06:00
Kenneth SkovhedeandGitHub 36aadc4ad1 Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
2017-09-25 23:17:45 -06:00
Kenneth Skovhede 2ee110abb3 Added fix for faster commandline startup to the other commandline tools 2017-03-13 09:26:22 +01:00
Kenneth Skovhede 1424be05f9 Fixed a bunch of typos.
This fixes #2278.
2017-01-23 22:12:24 +01:00
Kenneth Skovhede 60bd9693d0 Imporved handling of the ~ character in paths 2015-09-05 09:14:21 +02:00
Kenneth Skovhede e953b2d9de Setting various temp file related environment variables to force SQLite to place temporary files in the folder specified by --tempdir 2015-09-04 15:04:04 +02:00
Kenneth Skovhede 02ba7b91b1 Added helper code to store backendtester config in a file instead of on the commandline 2015-07-01 09:39:26 +02:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00