Commit Graph
95 Commits
Author SHA1 Message Date
Kenneth Skovhede 580947a0cc Fixed compile issue for tests 2025-03-25 14:20:26 +01:00
Kenneth Skovhede 54d6492e90 Added timings to deleted files 2025-03-25 14:17:26 +01:00
Kenneth Skovhede 0f9669b273 Final conversion to async backends
This PR is the final change, where all backends are now purely implemented with async interfaces.

The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.

In many places, the backeds were already prepared for async output, in other some glue was needed.

To reduce the scope of this change, some backends simply report a synchronous result as an async list.
2025-02-17 16:45:51 +01:00
marceloduplicatiandGitHub 3a604998e2 Merge pull request #5921 from duplicati/feature/backend-tester-improv
Change timeout configuration for BackendTester
2025-02-03 17:44:17 -03:00
marceloduplicatiandGitHub 03b7fac65c Merge pull request #5889 from marceloduplicati/feature/unified-help-arguments
Help Command unification
2025-01-30 10:23:10 -03:00
Marcelo C. 0fca2ba96b Changing default streaming timeout from 10 to 60 seconds 2025-01-29 20:37:40 -03:00
Marcelo C. 36db29dc77 Change timeout configuration for BackendTester
This change will allow an environment variable READ_WRITE_TIMEOUT_SECONDS to control the read write timeout used during the tests on streaming backends.

-1 will set it to infinite.

Additionally all console logs during test execution have a timestamp with millisecond precision to aid in benchmarking.
2025-01-28 10:35:32 -03:00
Marcelo C. cee1b8428d Centralizing the check on Helper function. 2025-01-21 12:45:53 -03:00
Marcelo C. 2e502ea7be Help Command unification
All CLI tools and executables now accept a unified set of help command variants:

"help", "/help","--help", "usage", "/usage", "--usage", "/h", "-h"

Affected executables:

Duplicati.Agent
Duplicati.CommandLine
Duplicati.CommandLine.AutoUpdater
Duplicati.CommandLine.BackendTester
Duplicati.CommandLine.BackendTool
Duplicati.CommandLine.ConfigurationImporter
Duplicati.CommandLine.SecretTool
Duplicati.CommandLine.Snapshots
Duplicati.GUI.TrayIcon
Duplicati.Server
Duplicati.Service
Duplicati.WindowsService

Note that SharpAesCrypt command is not included in this because the parameter parsing is part of the SharpAesCrypt code base.
2025-01-17 14:00:14 -03:00
Marcelo C. adc4bfa650 Added timers to backend testing tool
Also changed logic around test result, ensuring it fails when any unexpected behavior happens.
2025-01-17 09:45:49 -03:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
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