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
Mole
c02e1c261d
Merge pull request #9175 from umbraco/netcore/bugfix/smidge-nuglify
...
Update and fix Umbraco's SmidgeRuntimeMinifier implementation and update to latest Smidge
2020-10-19 09:35:39 +02:00
Shannon
ca9fab6b48
Latest version of smidge, new custom NuglifyJs processor with custom settings, fixes some JS that Nuglify throws on because it's not formatted correctly, ensures nuglify is used for the minifier
2020-10-16 12:35:53 +11:00
Mole
6664076976
Use default timeout in default session registration
2020-10-14 11:40:20 +02:00
Mole
d9b5aedca4
Register session service and middleware
2020-10-14 11:35:38 +02:00
Mole
96f6f9cede
Fix logging for now
...
The service provider is built before logging is registered as a service, meaning that the loggerFactory was empty, rebuilding fixes the issue for now, but it's not very pretty, would be better if we could move logger registration out of CreateCompositionRoot
2020-10-13 08:46:52 +02:00
Bjarke Berg
3551d6e65e
Clean up and fixed todos
...
Signed-off-by: Bjarke Berg <mail@bergmania.dk >
2020-10-06 21:23:15 +02:00
Mole
b5aedde616
Do some ILogger cleaning
2020-09-28 08:48:49 +02:00
Mole
25f13629cb
Register logging before trying to use ILoggerFactory in UmbracoCoreServiceCollectionExtensions
...
Before we used serviceProvider.GetService<ILoggerFactory>() with a service provider that were build before logging was configured, therefore the loggerfactory was empty and a lot of logs were missing
2020-09-24 09:39:48 +02:00
Bjarke Berg
f413f279eb
Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
...
Signed-off-by: Bjarke Berg <mail@bergmania.dk >
# Conflicts:
# src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs
# src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs
# src/Umbraco.Tests.Integration/Implementations/TestHelper.cs
# src/Umbraco.Tests.Integration/Persistence/Repositories/TemplateRepositoryTest.cs
# src/Umbraco.Tests.Integration/RuntimeTests.cs
# src/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/ColorListValidatorTest.cs
# src/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/EnsureUniqueValuesValidatorTest.cs
# src/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/MultiValuePropertyEditorTests.cs
# src/Umbraco.Tests.UnitTests/Umbraco.Core/Published/NestedContentTests.cs
# src/Umbraco.Tests.UnitTests/Umbraco.Core/Published/PropertyCacheLevelTests.cs
# src/Umbraco.Tests/Components/ComponentTests.cs
# src/Umbraco.Tests/IO/ShadowFileSystemTests.cs
# src/Umbraco.Tests/Models/VariationTests.cs
# src/Umbraco.Tests/Packaging/PackageDataInstallationTests.cs
# src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
# src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs
# src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
# src/Umbraco.Tests/Persistence/SqlCeTableByTableTest.cs
# src/Umbraco.Tests/Published/ConvertersTests.cs
# src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
# src/Umbraco.Tests/Routing/ContentFinderByIdTests.cs
# src/Umbraco.Tests/Routing/ContentFinderByUrlAndTemplateTests.cs
# src/Umbraco.Tests/Routing/DomainsAndCulturesTests.cs
# src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
# src/Umbraco.Tests/Scoping/ScopeEventDispatcherTests.cs
# src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
# src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs
# src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs
2020-09-23 07:59:10 +02:00
Mole
4b5fbf83e1
Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
...
# Conflicts:
# src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs
# src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
2020-09-22 15:24:01 +02:00
Mole
438515fa66
Merge Netcore: Use serilog to log all messages and use appsettings as config into Netcore/feature/migrate logging
2020-09-22 15:09:16 +02:00
Bjarke Berg
6fdf7082a0
Fixed issue models builder config and changed default mode to nothing
...
Signed-off-by: Bjarke Berg <mail@bergmania.dk >
2020-09-22 14:16:00 +02:00
Mole
9dc17b0873
Use serviceProvider instead of Current when creating TypeFinder in CollectionExtensions
...
Current hasn't been initialized at this point
2020-09-22 10:16:38 +02:00
Andy Butland
fe158ec7d9
Removed custom validation of configuration enum values, reverting to framework based validation when binding direct to the enum values.
2020-09-21 21:20:46 +02:00
Andy Butland
1a59d6a978
Created constants for all configuration sections and used this and nameof expressions for building up configuration validation error messages.
2020-09-21 16:23:12 +02:00
Andy Butland
d55b54ce49
Added unit tests for introduced unit test configuration setting builders.
2020-09-21 08:54:03 +02:00
Andy Butland
8aadbe02d6
Added unit tests for configuration validators.
2020-09-21 08:54:03 +02:00
Andy Butland
b9e67dde55
Added configuration validation for models builder and hosting settings.
...
Renamed models builder config class suffix to match others.
2020-09-18 12:53:10 +02:00
Mole
d61b9f54fa
Merge options
2020-09-18 12:53:06 +02:00
Andy Butland
1f8d7f18be
Added configuration validation for content and request handler settings.
2020-09-18 11:30:26 +02:00
berg
a2a5e25713
Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/use-serilog-to-log-all-messages
...
Signed-off-by: berg <mail@bergmania.dk >
2020-09-18 08:34:20 +02:00
berg
f11391961f
Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/use-serilog-to-log-all-messages
...
# Conflicts:
# src/Umbraco.Tests.Integration/TestServerTest/UmbracoBuilderExtensions.cs
# src/Umbraco.Web.Common/Extensions/UmbracoCoreServiceCollectionExtensions.cs
# src/Umbraco.Web/UmbracoApplicationBase.cs
2020-09-18 08:31:09 +02:00
Bjarke Berg
d7ab7d3d2e
Removed test code
...
Signed-off-by: Bjarke Berg <mail@bergmania.dk >
2020-09-18 08:30:48 +02:00
Bjarke Berg
a7c3b2dab8
Clear default log providers
2020-09-17 09:59:13 +02:00
Bjarke Berg
7d3bc9be1c
Moved serilog config to appsettings and configured it to also catch MS logging messages.
...
Added Console log for Development
2020-09-17 09:01:10 +02:00
Nikolaj
611276a5eb
Fake SiriLogger for now and start using MSLogger more places
2020-09-16 14:29:33 +02:00
Nikolaj
120e163682
Begin trying to replace logger in Current
2020-09-16 13:46:45 +02:00
Nikolaj
633d42039e
Fix a whole bunch of other errors
2020-09-15 15:14:44 +02:00
Bjarke Berg
b7a48686f0
Updates based on review feedback
2020-09-15 13:18:01 +02:00
Bjarke Berg
dc8933b6b9
Removed test code
2020-09-14 15:05:32 +02:00
Nikolaj
b8c60d1666
Refactor Fatal with simple message
2020-09-14 11:23:17 +02:00
Bjarke Berg
5b90a469e9
More clean up of old configs
2020-09-14 09:01:57 +02:00
Bjarke Berg
e079bd5a50
Cleanup usages of Configs
2020-09-08 13:03:43 +02:00
Bjarke Berg
3efee8284a
Post merge fixes
2020-09-07 15:28:58 +02:00
Bjarke Berg
c8669b18c2
Merge remote-tracking branch 'origin/netcore/netcore' into feature/8651-config-options-patten
...
Signed-off-by: Bjarke Berg <mail@bergmania.dk >
2020-09-04 14:30:48 +02:00
Shannon
1c83c68862
Fixes integration tests localization text
2020-09-04 01:30:47 +10:00
Shannon
7c78b5b34f
Updates CoreRuntime with better dependencies so we can disable caches, fixes integration test to run multiple callbacks registered for TearDown, ensure we TearDown the runtime.
2020-09-04 00:27:43 +10:00
Andy Butland
885c8d2371
Merge branch 'feature/8651-config-options-patten' of https://github.com/AndyButland/Umbraco-CMS into feature/8651-config-options-patten
2020-09-03 12:57:35 +02:00
Andy Butland
14404f2720
Changed singleton created dependencies in composition root to use IOptionsMonitor.
2020-09-03 12:52:47 +02:00
Andy Butland
b87630250b
Removed unused private field and constructor variable for configuration global settings from UmbracoVersion.
...
Updated singleton created instances in CreateCompositionRoot to accept IOptions based parameters for configuration.
2020-09-03 11:36:57 +02:00
Shannon
f84a93ae20
Adds IUmbracoBuilder to build the config so it's easier to split apart, ensures background tasks don't run in integration tests, uses a custom CoreRuntime to ensure we use SimpleMainDom, re-wires the UmbracoWebApplicationFactory so that duplicate Hosts are not running at the same time, fixes issues with overriding/shadowing, uses RAMDirectory in lucene for tests, fixes CoreRuntime's events that we're moved incorrectly and not backwards compat, adds new real non static events which we can use in integration tests to install the DB before the runtime state is calculated
2020-09-02 18:10:29 +10:00
Bjarke Berg
90d14158ee
Clean up - Removed duplicate ctor in UmbracoVersion
2020-09-02 09:05:55 +02:00
Andy Butland
4e222f103e
Reintroduced legacy config into CoreRuntime to support remaining use of Current.Configs (e.g. in UserInvite)
2020-08-26 18:21:09 +02:00
Andy Butland
8666547cf1
Updated configuration models used within Umbraco.ModelsBuilder.Embedded project.
2020-08-25 14:19:33 +02:00
Andy Butland
8241643183
Resolved various failing tests.
2020-08-25 12:30:43 +02:00
Andy Butland
b4e01392d9
Removed registration of old-style configuration in Netcore executable.
2020-08-25 11:00:11 +02:00
Andy Butland
967f0be705
Aligned property names in code with those in configuration.
2020-08-25 10:45:54 +02:00
Andy Butland
7884e4ca17
Resolved issues such that application boots and back-office is navigable.
2020-08-24 09:29:40 +02:00
Andy Butland
2cd91a5a54
Converted to IOptions over IOptionsSnapshot due to the latter only working in scoped services.
...
Further amends to return to booting application.
2020-08-23 23:36:48 +02:00