Commit Graph

36025 Commits

Author SHA1 Message Date
Bjarke Berg
aefb596b4b More viewengine migration. Including wrapping in profiler etcs
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-03 14:25:45 +01:00
Bjarke Berg
3faf0cb9ce Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate_custom_view_engines 2020-11-03 13:25:55 +01:00
Bjarke Berg
3cf45c9e88 Merge pull request #9329 from AndyButland/feature/amend-health-check-notifier-first-run-time-to-crontab
.NetCore: change health check notifier first run time to cron expression
2020-11-03 12:06:34 +01:00
Bjarke Berg
94b9f7453c Fix boot issue, because hosted services uses IServerMessenger that uses ISqlContext before the db is ready
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-03 11:20:51 +01:00
Bjarke Berg
9776816282 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate_custom_view_engines
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-03 10:51:00 +01:00
Bjarke Berg
8e44d89856 Introducing interface for our needs of a CronTabParser. And inject it where needed
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-03 09:36:56 +01:00
Bjarke Berg
1c2f048402 Migrated ProfilingViewEngine.cs
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-03 08:14:38 +01:00
Bjarke Berg
63acacab7e Merge pull request #9332 from AndyButland/feature/further-hosted-services-2
NetCore: Migrated scheduled publishing task to a hosted service.
2020-11-03 07:33:58 +01:00
Bjarke Berg
2da6c8517a Merge remote-tracking branch 'origin/netcore/netcore' into feature/amend-health-check-notifier-first-run-time-to-crontab
# Conflicts:
#	src/Umbraco.Core/ServiceCollectionExtensions.cs
#	src/Umbraco.Web.Common/Runtime/AspNetCoreComposer.cs
2020-11-03 07:09:15 +01:00
Bjarke Berg
f81fcc8437 Merge pull request #9330 from rustybox/netcore/netcore
NetCore: Fixes registration issue (continued)
2020-11-03 07:06:14 +01:00
Andy Butland
2f2da679a4 Migrated scheduled publishing task to a hosted service. 2020-11-02 18:08:25 +01:00
Bjarke Berg
051dcccae7 Merge pull request #9324 from AndyButland/feature/further-hosted-services
Netcore: Migrates further background tasks to hosted services
2020-11-02 14:36:37 +01:00
Andy Butland
21c29d6446 Fixes failing unit test due to null reference.
Amended signatures of method under test to support testing without the previously observed behaviour of an erroring test passing but crashing the test runner process.
2020-11-02 11:59:39 +01:00
Paul Johnson
ebdad9f91e Add additional "mutliple unique" registrations and rename extension for clarity. 2020-11-02 10:54:29 +00:00
Andy Butland
978b8eeda7 Added additional comments on IOHelper.CleanFolder(). 2020-11-02 11:19:21 +01:00
Andy Butland
719a443af8 Moved CleanFolderResultStatus enum to it's own file. 2020-11-02 11:06:02 +01:00
Andy Butland
794d293c36 Merge branch 'netcore/netcore' into feature/further-hosted-services 2020-11-02 11:01:26 +01:00
Bjarke Berg
308617930b Merge pull request #9323 from AndyButland/feature/fix-issue-with-multiple-di-registations-for-same-interface
NetCore: Fixes registration issue
2020-11-02 10:47:59 +01:00
Bjarke Berg
2dc96c99a4 Merge pull request #9318 from umbraco/netcore/bugfix/fix-issue-with-scope-test
Netcore : Fixed issue in ScopedRepositoryTests
2020-11-02 08:49:20 +01:00
Andy Butland
0bffe9aa55 Updated health check configuration validation tests to match change to cron expression. 2020-11-01 08:41:17 +01:00
Andy Butland
ed8c29f902 Fixes issue with introduced MSDI abstractions where a single implemention is used for two interfaces, ensuring only one singleton instance is created. 2020-10-31 22:49:16 +01:00
Andy Butland
a0ce44c9fc Changed configuration of first run time for health check notifier from a time string to a cron expression. 2020-10-31 22:49:12 +01:00
Andy Butland
a60fe36c33 Fixed amended temp file clean-up routine to restore behaviour of continuing on single file error. 2020-10-31 14:46:56 +01:00
Andy Butland
433fdbb047 Change LoggingSettings.MaxLogAge from integer (minutes) to a TimeSpan. 2020-10-31 14:25:40 +01:00
Andy Butland
88380a17ae Migrated log scrubber backgroun task to a hosted service. 2020-10-31 14:13:24 +01:00
Andy Butland
092fcac28a Fixed mock leading to failing test run. 2020-10-31 11:04:02 +01:00
Andy Butland
4920fba7cb Migrated temp file cleanup background task to a hosted service. 2020-10-31 08:58:47 +01:00
Andy Butland
684185f777 Fixes issue with introduced MSDI abstractions where a single implemention is used for two interfaces, ensuring only one singleton instance is created. 2020-10-31 07:54:28 +01:00
Andy Butland
98b1798bbe Fixes issue with introduced MSDI abstractions where a single implemention is used for two interfaces, ensuring only one singleton instance is created. 2020-10-30 19:56:26 +01:00
Andy Butland
9cb59239d1 Migrated KeepAlive recurring task to hosted service. 2020-10-30 17:19:01 +01:00
Bjarke Berg
6a30cd3158 Changed the test from using IsoCode to IsMandatory, as this is not important to the test, but changing IsoCode leads PublishedSnapshotService to rebuild its caches
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-30 14:08:05 +01:00
Andy Butland
bdb8f34da3 Netcore: Health check notifier hosted service (#9295)
* Implemented health check notifier as a hosted service.
Added validation to health check settings.

* Registered health check notifier as a hosted service.
Modified health check nested settings to use concrete classes to align with other configuration models.

* Resolved issues with email sending using development server.

* PR review comments and fixed failing unit test.

* Changed period and delay millisecond and hourly values to TimeSpans.
Changed configuration of first run time for health check notifications to use H:mm format.

* Set up SecureSocketOptions as a locally defined enum.

* Tightened up time format validation to verify input is an actual time (with hours and minutes only) and not a timespan.

* Aligned naming and namespace of health check configuration related classes with other configuration classes.

* Created constants for hex colors used in formatting health check results as HTML.

* Revert "Tightened up time format validation to verify input is an actual time (with hours and minutes only) and not a timespan."

This reverts commit f9bb8a7a825bcb58146879f18b47922e09453e2d.

* Renamed method to be clear validation is of a TimeSpan and not a time.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-30 13:56:13 +01:00
Paul Johnson
4ae329589a NetCore: MSDI refactor remove IFactory & IRegister (#9308)
* Replace IFactory with IServiceProvider

* Replace IRegister with IServiceCollection

* Fix Rte.cshtml so the view can service locate.

* Replace Composing Lifetime with MSDI ServiceLifetime

* Remove ServiceProvider AddMultipleUnique extension

* Remove Umbraco.Web.Composing.Current.Reset and any calls

* Remove LightInject from net framework projects

* Brought back a helper for setting MediaFileSystem underlying IFileSystem
2020-10-30 12:16:17 +01:00
Bjarke Berg
82a0c50a98 Temp fix for test
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-29 21:05:50 +01:00
Bjarke Berg
0a05611826 Migrated ScopedRepositoryTests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-29 14:08:01 +01:00
Bjarke Berg
cfaa353dff Fixed isses with NewEmpty* integration tests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-28 14:54:16 +01:00
Bjarke Berg
8c5daec967 Clean in tests + Moved logviewer tests from integration to unit tests, and minimized the test file, to speed up the tests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-28 09:41:23 +01:00
Bjarke Berg
765140b7cd Moved unit tests to right project + Cleanup + Write info in test console
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 14:10:19 +01:00
Bjarke Berg
a09e218501 Merge remote-tracking branch 'origin/netcore/bugfix/azure-devops-tests' into netcore/netcore 2020-10-27 12:01:44 +01:00
Bjarke Berg
d4376e00c6 removed test file
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 12:01:17 +01:00
Bjarke Berg
5d5c4c6904 Remove build warnings
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 12:00:30 +01:00
Bjarke Berg
1b4f3a9a5f Remove test file again
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 11:58:54 +01:00
Bjarke Berg
4d260b036b Merge branch 'netcore/bugfix/azure-devops-tests' into netcore/netcore 2020-10-27 11:57:38 +01:00
Bjarke Berg
6c2ece0619 Remove build warnings
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 11:57:15 +01:00
Paul Johnson
ec66990e72 NetCore: MSDI refactor phase 2 (#9280)
* Moved adapters from Infra -> Core

* Allow Composition to accept a service collection instead of an IRegister

* Composition no longer takes IRegister as constructor arg

all tests passing

* Composition no longer implements IRegister

* Lose _uniques in Composition

* lose Composition OnCreatingFactory actions

* Clean up UmbracoCoreServiceCollectionExtensions & Composition

Less IFactory

* LightInject gone where TFW == netstandard2.0 || TFW == netcoreapp3.1

* Resolve dead code issues

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later.

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later (continued)

Thought the counts were low, it's mostly extension method usage
2020-10-27 11:53:01 +01:00
Bjarke Berg
a6ef907427 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/bugfix/azure-devops-tests 2020-10-26 16:26:59 +01:00
Andy Butland
507facbdaa NetCore: Further unit test migration (#9269)
* Migrated ContentExtensionsTests.

* Migrated PropertyCollectionTests.

* Migrated AbstractFileSystemTests and PhysicalFileSystem tests.

* Migrated SiteDomainHelper tests.

* Migrated DistributedCacheTests.

* Migrated AppCacheTests and derived test classes.
Amended HttpRequestApp underlying dictionary type to match that available in .NET Core HttpContext Items collection.

* Fixed namespace

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-26 14:26:49 +01:00
Mole
9cd752c2f8 Netcore: Align Namespaces in Tests and Web.BackOffice (#9274)
* Align namespaces in integration tests

* Align namespaces in unit tests

* Align namespaces in Backoffice.Filters

* Align namespaces in Backoffice.ActionResults

* Align namespaces in Backoffice.Mapping

* Align namespaces in Backoffice.PorpertyEditors and SignalR

* Align namespaces in Backoffice.Trees

* Align unit tests after migration
2020-10-26 13:34:08 +01:00
Paul Johnson
a99f625f6a Netcore: Alternate approach for MSDI refactor (#9247)
* Doesn't make much sense to have Concrete on IRegister, only on IFactory

* Handle FilesTreeController requires IFileSystem of type PhysicalFileSystem

* Handle registration of default MediaFileSystem without using RegisterUniqueFor

* Remove RegisterFor / RegisterUniqueFor from IRegister

* Switch over from LightInject to wrappers around MSDI

* Made mapper dependencies more explicit

* Remove registration for AngularJsonMediaTypeFormatter

It's dependencies aren't registered so container validation fails

* Resolve lifetime issue for EnsureValidSessionId by service locating

else resolve scoped in singleton

* Make registration more explicit for backoffice UserManager

* Make install step registrations more explicit

* Disable service provider validation so site can launch

Maybe this is a problem maybe not, we build about 8000 service providers so maybe everything is fine later...

* Further cleanup of IFactory interface

* Further cleanup of IRegister interface

* Revert "Make registration more explicit for backoffice UserManager"

This reverts commit 7215fe836103c597cd0873c66737a79b91ed4c49.

* Resolve issue where NewInstallStep would fail to reset password for "SuperUser"

Before MSDI, somehow BackOfficeIdentityOptions would be configured with token provider map from IdentityBuilder.AddDefaultTokenProviders.
After switchover those config actions are lost.

Subclass IdentityBuilder to ensure BackOfficeIdentityOptions doesn't miss config setup upstream.

* Initialize current.

* Add todo to turn container validation back on.

* Migrated ScopeFileSystemsTests to integration tests

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Resolve issue where MediaFileSystem was skipping ShadowFileSystem

* Attempt to fix ScopeFileSystemsTests on azure devops

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Be interesting to know what the actual full path is in pipeline.

* Clarify intent of CreateMediaTest

Doesn't help resolve weird UnauthorizedAccessException but it cuts so much cognitive overhead for the future.

* Use ILoggerfactory rather than mock for the manually constructed file PhysicalFileSystem

* Maybe resolve failing test on azure pipeline.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-26 11:47:14 +01:00
Bjarke Berg
7f9c1bb998 Merge pull request #9259 from umbraco/netcore/feature/migrate-persistance-tests
Netcore: Migrate Persistance Tests
2020-10-23 16:12:46 +02:00