Commit Graph

54 Commits

Author SHA1 Message Date
Paul Johnson
95aa143db0 v10 make migration from v9 less painful WRT IScope (#12293)
* Restore IEventDispatcher

* Fix breaking changes WRT IScopeProvider and IScope

* Update internal usage.

* Update src/Umbraco.Core/Services/UserService.cs

* Better obsolete message

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-26 10:22:37 +01:00
Nikolaj Geisle
060e0181a7 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Core/Telemetry/Models/TelemetryReportData.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTypeTreeController.cs
#	src/Umbraco.Web.Common/ModelsBuilder/InMemoryModelFactory.cs
#	src/Umbraco.Web.Common/Security/MemberManager.cs
#	src/Umbraco.Web.Website/Routing/ControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/IControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs
2022-04-21 10:26:51 +02:00
Robert Foster
bef052ad3a V9/tmp nucache lock (#12149)
* wrapping SetAllFastSortedLocked in try catch

* Potential issue mitigation by retrieving all data from the database at once instead of one at a time while populating the NuCache file.

* Moved content retrieval to within the try-catch block.

* using InGroupsOf() to retrieve content without loading absolutely everything into memory.

* added "old" method signatures to prevent breaking change in ContentStore

* Revert code style cleanups for clarity

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-04-19 13:01:38 +02:00
Nikolaj Geisle
05a08bef63 Add nullability to nucache & lucene projects 2022-03-30 13:34:56 +02:00
Nikolaj Geisle
b52c4e50cf Add nullability to web.common 2022-03-29 13:44:21 +02:00
Shannon Deminick
c77dc5dc00 Migrating tests that depend on Published Cache from the old test project (#11242)
* starts cleaning up old test project, removing ones we'll never convert, moves new test to where it should be.

* Makes ContentNodeKit immutable properties, moves first nucache tests over

* Gets the Nucache unit tests working and refactors a bit to use builder pattern for models.

* Migrates first xml based cache test to use nucache.

* Migrates a bunch more

* Migrates remaining tests for PublishedContentTests

* Moves PublishedRouterTests

* Moves PublishedContentExtensionTests

* Moves more tests.

* committing wip

* committing wip

* Gets PublishedContentLanguageVariantTests converted and working.

* Fixes DataTable ext method and moves PublishedContentDataTableTests

* Moves PublishedMediaTests

* wip - moving EntityXmlSerializerTests

* Moves more tests

* moves more tests

* moves more tests

* Move another test

* Moves more tests

* Fix test

* move another test

* Moves more tests

* Moves more tests

* Moves more tests

* wip before merge

* More tests

* More tests

* More tests

* More tests

* More tests

* More tests

* Cleanup and moving classes.

* Remove unused code

* Fixed failing tests, due to new null checks, that did not exist in v8

* Avoid breaking changes

* Unbreak more things, even that it the old solution was crazy..

* Fixed bug where ordering of stream readings was changed..

* cleanup

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-10-19 14:11:54 +02:00
Bjarke Berg
794cddffd4 Merge pull request #10846 from umbraco/v9/bugfix/resolve-issues-adding-content-on-startup
Resolve issues adding content on startup for #10774
2021-08-17 14:29:57 +02:00
Elitsa Marinovska
81ea232ecb Merge remote-tracking branch 'origin/v9/dev' into v9/bugfix/Refractor_UmbracoContextAccessor 2021-08-17 13:11:45 +02:00
Elitsa Marinovska
e9b697b0c2 Cleanup 2021-08-17 13:10:13 +02:00
Chad Currie
9457d73499 Avoid mixing using of string interpolation and string formatting. MessageFormat parameter is cached and should be a constant string. 2021-08-15 18:51:26 +12:00
Paul Johnson
2c0761346c Resolve issues adding content on startup for #10774
Call EnsureCaches on all notify handlers in PublishedSnapshotService.
No need to delete NuCache database files.
2021-08-12 18:30:57 +01:00
Zeegaan
5d264fefdb Added a null check to IUmbracoHelperAccessor & IPublishedSnapshotAccessor 2021-08-10 10:55:29 +02:00
Shannon
72671dbca8 Merge commit '94d525d88f713b36419f28bfda4d82ee68637d83' into v9/dev
# Conflicts:
#	build/NuSpecs/UmbracoCms.Web.nuspec
#	src/Umbraco.Core/Composing/Current.cs
#	src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs
#	src/Umbraco.Core/Runtime/CoreRuntime.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions.cs
#	src/Umbraco.Infrastructure/Persistence/UmbracoDatabase.cs
#	src/Umbraco.Persistence.SqlCe/SqlCeSyntaxProvider.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/ContentCacheDataModel.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/ContentCacheDataSerializationResult.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/ContentCacheDataSerializerEntityType.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/ContentData.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/ContentNestedData.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/CultureVariation.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/IContentCacheDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/IContentCacheDataSerializerFactory.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/IDictionaryOfPropertyDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/JsonContentNestedDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/JsonContentNestedDataSerializerFactory.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/LazyCompressedString.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/MsgPackContentNestedDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/MsgPackContentNestedDataSerializerFactory.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/PropertyData.cs
#	src/Umbraco.PublishedCache.NuCache/NuCacheSerializerComponent.cs
#	src/Umbraco.PublishedCache.NuCache/NuCacheSerializerComposer.cs
#	src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs
#	src/Umbraco.Tests/App.config
#	src/Umbraco.Tests/PublishedContent/NuCacheChildrenTests.cs
#	src/Umbraco.Tests/PublishedContent/NuCacheTests.cs
#	src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI/web.Template.Debug.config
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/Composing/ModuleInjector.cs
#	src/Umbraco.Web/Editors/NuCacheStatusController.cs
#	src/Umbraco.Web/PublishedCache/NuCache/DataSource/ContentNestedData.cs
#	src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs
#	src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs
#	src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
#	src/Umbraco.Web/Runtime/WebRuntime.cs
2021-06-24 09:43:57 -06:00
Callum Whyte
b07f6519e7 Rename models builder modes (#10272)
* Renaming AppData Models Builder mode

* Renaming PureLive Models Builder mode to Runtime

* ModelsBuilderAssembly attribute flags if models are "Live" or not

* Updated ModelsMode names

* Only add tag if it is not a pull request. Apparently this is not allowed when it is from a fork.

* Revert "Only add tag if it is not a pull request. Apparently this is not allowed when it is from a fork."

This reverts commit 92b33f3c

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-05-26 08:36:21 +02:00
Shannon Deminick
eba6373a12 Examine 2.0 integration (#10241)
* Init commit for examine 2.0 work, most old umb examine tests working, probably a lot that doesn't

* Gets Umbraco Examine tests passing and makes some sense out of them, fixes some underlying issues.

* Large refactor, remove TaskHelper, rename Notifications to be consistent, Gets all examine/lucene indexes building and startup ordered in the correct way, removes old files, creates new IUmbracoIndexingHandler for abstracting out all index operations for umbraco data, abstracts out IIndexRebuilder, Fixes Stack overflow with LiveModelsProvider and loading assemblies, ports some changes from v8 for startup handling with cold boots, refactors out LastSyncedFileManager

* fix up issues with rebuilding and management dashboard.

* removes old files, removes NetworkHelper, fixes LastSyncedFileManager implementation to ensure the machine name is used, fix up logging with cold boot state.

* Makes MainDom safer to use and makes PublishedSnapshotService lazily register with MainDom

* lazily acquire application id (fix unit tests)

* Fixes resource casing and missing test file

* Ensures caches when requiring internal services for PublishedSnapshotService, UseNuCache is a separate call, shouldn't be buried in AddWebComponents, was also causing issues in integration tests since nucache was being used for the Id2Key service.

* For UmbracoTestServerTestBase enable nucache services

* Fixing tests

* Fix another test

* Fixes tests, use TestHostingEnvironment, make Tests.Common use net5, remove old Lucene.Net.Contrib ref.

* Fixes up some review notes

* Fixes issue with doubly registering PublishedSnapshotService meanig there could be 2x instances of it

* Checks for parseexception when executing the query

* Use application root instead of duplicating functionality.

* Added Examine project to netcore only solution file

* Fixed casing issue with LazyLoad, that is not lowercase.

* uses cancellationToken instead of bool flag, fixes always reading lastId from the LastSyncedFileManager, fixes RecurringHostedServiceBase so that there isn't an overlapping thread for the same task type

* Fix tests

* remove legacy test project from solution file

* Fix test

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-05-18 10:31:38 +02:00
Shannon Deminick
3792cafb9f Published members cleanup (#10159)
* Getting new netcore PublicAccessChecker in place

* Adds full test coverage for PublicAccessChecker

* remove PublicAccessComposer

* adjust namespaces, ensure RoleManager works, separate public access controller, reduce content controller

* Implements the required methods on IMemberManager, removes old migrated code

* Updates routing to be able to re-route, Fixes middleware ordering ensuring endpoints are last, refactors pipeline options, adds public access middleware, ensures public access follows all hops

* adds note

* adds note

* Cleans up ext methods, ensures that members identity is added on both front-end and back ends. updates how UmbracoApplicationBuilder works in that it explicitly starts endpoints at the time of calling.

* Changes name to IUmbracoEndpointBuilder

* adds note

* Fixing tests, fixing error describers so there's 2x one for back office, one for members, fixes TryConvertTo, fixes login redirect

* fixing build

* Updates user manager to correctly validate password hashing and injects the IBackOfficeUserPasswordChecker

* Merges PR

* Fixes up build and notes

* Implements security stamp and email confirmed for members, cleans up a bunch of repo/service level member groups stuff, shares user store code between members and users and fixes the user identity object so we arent' tracking both groups and roles.

* Security stamp for members is now working

* Fixes keepalive, fixes PublicAccessMiddleware to not throw, updates startup code to be more clear and removes magic that registers middleware.

* adds note

* removes unused filter, fixes build

* fixes WebPath and tests

* Looks up entities in one query

* remove usings

* Fix test, remove stylesheet

* Set status code before we write to response to avoid error

* Ensures that users and members are validated when logging in. Shares more code between users and members.

* merge changes

* oops

* Reducing and removing published member cache

* Fixes RepositoryCacheKeys to ensure the keys are normalized

* oops didn't mean to commit this

* Fix casing issues with caching, stop boxing value types for all cache operations, stop re-creating string keys in DefaultRepositoryCachePolicy

* oops didn't mean to comit this

* bah, far out this keeps getting recommitted. sorry

* cannot inject IPublishedMemberCache and cannot have IPublishedMember

* splits out files, fixes build

* fix tests

* removes membership provider classes

* removes membership provider classes

* updates the identity map definition

* reverts commented out lines

* reverts commented out lines

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-04-22 13:21:43 +02:00
Mole
48e1ba2127 Align namespaces in Scoping to Umbraco.Cms.Core 2021-02-15 11:41:12 +01:00
Mole
161f01bc1e Change namespace of PublishedContentTypeCache to Umbraco.Cms.Core.PublishedCache 2021-02-15 10:48:14 +01:00
Mole
737b471647 Adjust namespace in Umbraco.PublishedCache.NuCache 2021-02-10 10:46:52 +01:00
Mole
dd488a15f4 Move extension methods in core project to Umbraco.Extensions 2021-02-09 13:21:17 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Shannon
5f9447fc2a Got a POC working with dynamic recompilation 2021-01-15 18:17:13 +11:00
Shannon
bd4006c577 Fixes the custom RequestCultureProvider to dynamically add cultures to the supported cultures list, changes the request/builder to not reference a ICultureInfo and instead just a string to avoid allocations and confusion since the handlers will end up as a string anyways. Removes the unnecessary cultureinfo concurrentdictionary because CultureInfo.GetCultureInfo does the same thing. 2021-01-11 13:39:09 +11:00
Shannon
74d253a88f Removes IPublishedSnapshotService.EnsureEnvironment 2020-12-22 11:22:29 +11:00
Shannon
c761fa0506 New IPublishedSnapshotStatus, reduces IPublishedSnapshotService 2020-12-21 17:41:12 +11:00
Shannon
e8f5aa8ebc removes PublishedSnapshotServiceBase, shrinks interface 2020-12-21 17:04:29 +11:00
Shannon
cc1404747b Changes PublishedSnapshotService to lazily load it's caches on demand when they are required instead of relying on an external initializer to load them. 2020-12-17 16:27:28 +11:00
Shannon
827bf80d1d Removes EnterPreview, RefreshPreview, ExitPreview 2020-12-14 17:04:02 +11:00
Shannon
4b85f8eb20 Big refactor or PublishedSnapshotService to split up so that there's a service and repository responsible for the data querying and persistence 2020-12-09 22:43:49 +11:00
Shannon
f16b8e705a reduce dependencies in PublishedSnapshotService, more linting 2020-12-08 10:20:03 +11:00
Paul Johnson
667c00ccd4 Hotfix for PublishedSnapshotService initialization 2020-11-25 10:53:38 +00:00
Mole
a91f6f6a29 Clean PublishedSnapshotService a bit 2020-09-22 13:22:44 +02:00
Mole
5c9a681566 Use typed logger for XmlPublishedSnapshotService 2020-09-21 15:11:40 +02:00
Mole
894abdd183 Remove a bunch of references to the old logger 2020-09-21 09:41:18 +02:00
Mole
d61b9f54fa Merge options 2020-09-18 12:53:06 +02:00
Nikolaj
0238d6eb02 Start using LoggerFactory 2020-09-15 12:40:35 +02:00
Nikolaj
02828db8fd Add work on PublishedSnapshotService 2020-09-15 08:45:40 +02:00
Nikolaj
a1ecc4a5c9 Change Warn to LogWarning 2020-09-14 10:17:32 +02:00
Andy Butland
64f8752587 Removed introduced second constructors for IOptions based depenedencies and used Options.Create instead. 2020-08-26 11:58:44 +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
Andy Butland
510bd92e78 Amended injection of further settings to use IOptionsSnapshot. 2020-08-21 14:52:47 +01:00
Bjarke Berg
dca04b3dd7 Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs
#	src/Umbraco.Web.UI.Client/src/views/users/user.controller.js
#	src/Umbraco.Web/Models/Trees/MenuItemList.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
#	src/Umbraco.Web/Trees/RelationTypeTreeController.cs
#	src/Umbraco.Web/UmbracoApplication.cs
2020-05-29 12:59:42 +02:00
Bjarke Berg
d83cef5f3d Fix for tests failing 2020-05-04 09:35:48 +02:00
Bjarke Berg
aa31a8b5dd Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
#	src/Umbraco.Core/PublishedCache/PublishedSnapshotServiceBase.cs
#	src/Umbraco.Core/PublishedModelFactoryExtensions.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js
#	src/Umbraco.Web.UI.Client/src/views/users/user.controller.js
#	src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
2020-05-01 14:13:15 +02:00
Bjarke Berg
56b94b53b1 Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Core/Services/UserServiceExtensions.cs
#	src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Infrastructure/Search/ExamineComposer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/DatabaseDataSource.cs
#	src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs
2020-04-24 08:34:48 +02:00
Bjarke Berg
f84798322c AB3671 - Moved WebRuntime into infrastracutre, and removed typefinder reference in AppCaches (Replaced with string input with Type)..
- Move initialized of Current.Factory out of webruntime
2020-03-19 08:53:18 +01:00
Bjarke Berg
53953338d8 Merged Umbraco.Abstractions into Umbraco.Core 2020-03-03 13:42:07 +01:00
cyberdot
efd8e37f34 Merge branch 'netcore/dev' into temp-7667 2020-03-03 12:05:31 +00:00
cyberdot
01362d0dd0 NetCore: Abstract ConfigurationManager references 2020-03-03 11:18:54 +00:00
Bjarke Berg
1ea39f2762 Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
#	src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs
#	src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
#	src/Umbraco.Core/Packaging/ConflictingPackageData.cs
#	src/Umbraco.Core/Packaging/PackagesRepository.cs
#	src/Umbraco.Core/PublishedCache/PublishedMember.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs
#	src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs
#	src/Umbraco.PublishedCache.NuCache/PublishedContent.cs
#	src/Umbraco.Tests/Persistence/Repositories/MacroRepositoryTest.cs
#	src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
#	src/Umbraco.Web/Macros/PublishedContentHashtableConverter.cs
#	src/Umbraco.Web/PublishedContentExtensions.cs
#	src/Umbraco.Web/Trees/MediaTypeTreeController.cs
2020-03-02 08:34:52 +01:00