1728 Commits

Author SHA1 Message Date
Ronald Barendse
c511f19cc8 Merge branch 'v9/feature/move-templates-to-root' into v9/feature/projecttemplate-cleanup 2022-03-24 13:57:38 +01:00
Ronald Barendse
f5d0abc28b Move templates to root 2022-03-24 13:48:43 +01:00
Mole
c1552cf7fc Bump versions 2022-03-23 11:36:34 +01:00
Paul Johnson
3961c4c233 v10 SQLite support + distributed locking abstractions (#11922)
* Created Persistence.SQLite project skeleton.

* SQLite database initialization

* Various changes and hacks to make things work.

* WIP integration tests

* Fix thread safety tests

* Fix tests that relied on tie breaker sorting.

Spent a fair amount of time looking for a less lazy fix but gave up.

* Convert right join to left join ContentTypeRepository.PerformGetByQuery
SQLite doesn't support right join

* Fix test Can_Generate_Delete_SubQuery_Statement

Worth noting that NPoco.DatabaseTypes.SQLiteDatabaseType doesn't override
EscapeSqlIdentifier so NPoco will escape with [].

SQLite docs say > "A keyword enclosed in square brackets is an identifier.
This is not standard SQL.
This quoting mechanism is used by MS Access and SQL Server and is
included in SQLite for compatibility."

Also could have updated SqliteSyntaxProvider to match npoco but
decided against it.

* Fixes for paginated custom order by

* Fix tests broken by lack of unique indexes.

* Fix SqlServerTableByTableTest tests.

These tests didn't actually do anything as the tables already exist so schema creator just returned.

Did however point out that the default implementation for DoesTableExist just returns false so added a default naive implementation.

* Fix ValidateLoginSession - SelectTop must come later

* dry up database cleanup

* Fix up db migration tests.
We can't drop pk in sqlite without recreating table.
Test looks to be testing that add column works as intended which we can test.

* Prevent schema creation errors.

* SQLite ignore lock tests, WAL back on.

* Fix package schema tests

* Fix NPocoFetchTests - case sensitivity not under test

* Fix AdvancedMigrationTests (where possible)

Migrations probably need a good look later.
Maybe nuke old migrations and only support moving to v10 from v9.

If we do that can do some cleanup.

* Cleanup test database configuration

* Run integration tests against SQLite on build agent.

* Drop MS.Data.SQLite
System.Data.SQLite was quicker to roll out due to more CLR type mapping

* YAML

* Skip Umbraco.Tests.Integration.SqlCe

* Drop SqlServerTableByTable tests.

Until this week they did nothing anyway as they with NewSchemaPerTest
so the tests all passed as CreateTable was no op (already exists).

Also all of the tables are created in an empty database by SchemaValidationTest.cs
DatabaseSchemaCreation_Produces_DatabaseSchemaResult_With_Zero_Errors

* Might aswell run against macOS also.

* Copy azure pipelines task header layout

* Delete SQLCe projects

* Remove SQL CE specific code.

* Remove SQL CE NuSpec, template params, build script setup

* Delete umbraco-netcore-only.sln

* Add SkipTests solution configuration and use for codeql

* Remove reference to deleted nuspec file.

* Refactor ConnectionStrings WRT DataDirectory placeholder & ProviderName.

At this point you can try out SQLite support by setting the following
in appsettings.json and then completing the install process.

"ConnectionStrings": {
  "umbracoDbDSN": "Data Source=|DataDirectory|/umbraco.sqlite",
  "umbracoDbDSN_ProviderName": "System.Data.SQLite"
},

Not currently possible via installer UI without provider name pre-set in
configuration.

* Switch to Microsoft.Data.Sqlite

Some gross hacks but will be good to find out if this works
with apple silicon.

* Enable selection of SQLite via installer UI (also quick install)

* Remove SqlServerDbProviderFactoryCreator to cleanup a TODO

* Move SQL Server support to its own class library

* Add persistence dependencies to Umbraco.CMS metapackage

* Bugfix packages delete query

Created invalid query for SQLite.

* Try out cypress tests Linux + SQLite

* Prevent cypress test artifact upload failure on attempt 2+

* LocalDb bugfixes

* Drop redundant enum

* Move SqlClient constant

* Misc whitespace

* Remove IsSqlCe extension (TODO: drop non 9->10 migrations later).

* Umbraco.Persistence.* -> Umbraco.Cms.Persistence.*

* Display quick install defaults and per provider default database name.

* Misc remove old comment

* little re-arrange

* Remove almost all usages of IsSqlite extension.

* visual adjustments

* Custom Database Configuration is last step and should then say Install.

* use text instead of disabled inputs

* move legend, rename to Install

* Update SqlMainDomLock to work without distributed locks.

* Added IDistributedLockingMechanism interface and in memory impl.

* Drop locking from ISqlSyntaxProvider & wire up scope to abstraction.

* Added SqlServerDistributedLockingMechanism

* Move distributed locking interfaces and exceptions to Core + xmldocs.

* Fix tests, Misc cleanup, Add SQL distributed locking integration tests

* Provide mechanism to specify DistributedLockingMechanism in config
(even if added by composer)

* Nomplementation -> NoImplementation

* Fix misleading comment

* Integration tests use SqlServerDistributedLockingMechanism when possible

* Handle up-gradable locks SqlServerDistributedLockingMechanism.
TODO: InMemoryDistributedLockingMechanism.

Note: Nuked SqlServerDistributedLockingMechanismTests, will still sleep
at night.
Is covered by Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.LockTests

* Make tests pass for InMemoryDistributedLockingMechanism, pretty hacky.

* Tweak constraints on WithCollectionBuilder so i can drop bad constructor

* Added SqliteDistributedLockingMechanism

* Dropped InMemoryDistributedMechanism + magic

InMemoryDistributedMechanism was pretty rubbish and now we have
a decent implementation for SQLite as we no longer block readers
see 8d1f42b.

Also drop the CollectionBuilder setup, instead do the same as we do
for syntax providers etc, it's more automagical so we never require an
explicit selection although we are allowing for it.

However keeping the optional IUmbracoBuilder constructor param for
CollectionBuilders as it's extremely useful.

* Fix quick install "" database name.

* Hide Database Configuration section when a connection string is pre-set.

Doesn't seem worth it to extract db name from connection string.

* Ensure wal test 2+

* Fix logging inconsistencies.

* Ensure in transaction when obtaining locks + no-op the SQLite read lock.

There's no point in running the query just to make a single test pass.

* Fix installer database display names

* Allow SQLite shared cache without losing deferred transactions

* Opt into shared cache for new SQLite databases + fix filename

* Fix misc inconsistency in .gitignore

* Prefer our interceptor interface

* Restore DEBUG_DATABASES code OnConnectionOpened in case it's used.

* Back to private cache.

* Added retry strategy for SQLite + refactor out SQL server specific stuff

* Fix SQL server tests.

* Misc - Orphaned comment, incorrect casing.

* InMemory SQLite test database & turn shared cache back on everywhere.

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-03-11 17:14:20 +01:00
Bjarke Berg
981e66a673 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DashboardController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ScheduledPublishingTests.cs
2022-03-10 14:36:30 +01:00
vsilvar
3c40c20d27 Made sure Umbraco files aren't included twice
This fixes CS8785 RazorSourceGenerator failures due to repeated files in .Net 6
2022-03-09 17:10:53 +01:00
Ronald Barendse
8d82f86c29 Re-use DefaultItemExcludes from StaticAssets 2022-03-09 15:40:24 +01:00
Ronald Barendse
ee3f7520b3 Conditionally update Umbraco version in templates 2022-02-24 11:41:31 +01:00
Ronald Barendse
5a3578eca9 Fix updating default Umbraco version in templates 2022-02-24 11:37:22 +01:00
Bjarke Berg
366d7c0fce Update docfx dependency (#12046)
* Update docfx

* temp commit to test out azure pipeline

* Rollback temp fix
2022-02-24 11:30:20 +01:00
Ronald Barendse
05d606d6a7 Fix artifact build and ensure the version of future templates are also updated 2022-02-24 10:42:59 +01:00
Ronald Barendse
4c037774de Move templates to root 2022-02-23 22:45:35 +01:00
Sebastiaan Janssen
ab870347ed Merge branch 'v9/dev' into v9/contrib
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/less/pages/login.less
2022-02-21 10:06:08 +01:00
Jeavon
8b6c844a55 Exclude the Umbraco Log files from UmbracoProject template gitignore 2022-02-16 07:57:06 +10:00
Bjarke Berg
a228f4e941 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTaskTests.cs
2022-02-13 13:39:13 +01:00
Paul Johnson
cf410ab91e Attempt to make app local icu setup less problematic. (#11961)
* Attempt to make app local icu setup less problematic.

Prevents issues for windows build agent -> linux app server.

On Windows version is split at first '.' e.g. 68.2.0.9 ->  icuuc68.dll
https://github.com/dotnet/runtime/blob/205f70e/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Windows.cs

On Linux we are looking for libicuuc.so.68.2.0.9
https://github.com/dotnet/runtime/blob/205f70e/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Unix.cs

On macos we don't have a native library in a shiny nuget package so hope
folks are building on their macs or setting the rid until we have a
better solution.

* Combine elements
2022-02-10 12:03:35 +00:00
Bjarke Berg
158f4d29f6 Bump version to 9.4.0-rc 2022-02-04 13:02:19 +01:00
Mole
3ade2b6de3 Add RC to version 2022-01-26 08:43:43 +01:00
Bjarke Berg
b7d8b7923d Merge remote-tracking branch 'origin/v9/9.2' into v9/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
2022-01-23 13:34:39 +01:00
Mole
bbfa975096 Bump versions to non-rc 2022-01-03 15:36:52 +01:00
Mole
a69499a136 Bump versions 2021-12-16 09:10:55 +01:00
Bjarke Berg
47c1058195 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
2021-12-15 14:41:49 +01:00
Mole
cd022af2d7 Merge pull request #11759 from PerplexDaniel/bugfix/11758_umbraco-cshtml-compilation
Ensure Umbraco Razor files are compiled into <project>.Views.dll
2021-12-14 15:47:37 +01:00
Daniël Knippers
95efeeabcf Ensure Umbraco Razor files are compiled into <project>.Views.dll
It worked properly if the Umbraco files are on disk before a build
but when the files are not there yet or a dotnet clean is done first the
files are not compiled. This is often the case on build servers that start
with a clean working directory for each build.

Using this target we simply ensure the files are included as "Content"
which Razor will scan for .cshtml files in their "ResolveRazorGenerateInputs"
target.
2021-12-14 12:25:25 +01:00
Bjarke Berg
0b39741309 Bump version 2021-12-07 08:22:29 +01:00
Bjarke Berg
78dc2d5721 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
#	src/Umbraco.Core/Routing/UrlProviderExtensions.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs
#	src/Umbraco.Infrastructure/Services/Implement/ContentService.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs
2021-11-22 19:43:20 +01:00
Bjarke Berg
579613c83c Revert version 2021-11-22 17:45:49 +01:00
Paul Johnson
b58a0cf0a5 Ensure Umbraco static assets included when publish --no-build (#11665)
* Ensure Umbraco static assets included when publish --no-build

Closes #11662

* Bump version to 9.1.1
2021-11-22 09:30:54 +01:00
Elitsa Marinovska
61f459670c Update to .NET6 and ASP.NET Core 6 (#11652)
* Changed targetFramework in nuspec file & project files + updated NuGet dependencies

* Updated .net version in pipelines

* Updated .net version in templates

* Update more dependencies

* Fixed ambiguous call to DistinctBy() - part of Umbraco.Extensions and System.Linq

* Disabling the Razor source generators in .NET 6 due to error: "Cannot find the fallback endpoint specified by route values..."

* Fixed unit tests

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-11-18 15:35:42 +01:00
Nikolaj Geisle
32d8e0bb96 v9: Fix tests on Linux (#11586)
* downgraded cypress, updated package

* Fixed language test

* Fix language test

* Fixed routing tests to wait for popup

* Publish test artifacts

* Added better element to wait on

* Fix routing tests for linux

* Fix language tests on linux

* Stablize tabs tests

* Implement waiting for inner tree like in content tests

* Assert that we are in settings section so we dont click an element that doesnt exist

* Fixed rollback by not doing cy.reload()

* Fix language test with correct wait

* Stabilize dataTypes by moving API Call, and stabilize systemInformation.ts test by waiting for success notification

* Fix dataTypes, tabs and template tests

* Update node to newer version in package-lock.json and fix template test

* Implemented cy.wait to test if it is because we are too fast

* Added comments

* Bigger wait

* Try another wait instead of magic numbers

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-11-15 14:20:10 +01:00
Patrick de Mooij
baaed139c3 Updated version to 9.1.0 2021-11-12 14:55:12 +01:00
Bjarke Berg
fa96ba1e82 Bump version to 9.2.0-rc 2021-11-04 12:36:10 +01:00
Bjarke Berg
a64c58d68e Merge branch 'v9/9.1' into v9/dev 2021-11-04 12:34:21 +01:00
Nikolaj Geisle
fca16859fd v9: 11419 Remove Azure gallery from build.ps1 (#11540)
* Fix build.ps1 & change order of itemgroup in csproj

* Fix merge conflict

* Update package version

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2021-11-04 11:05:39 +01:00
Bjarke Berg
7ffa46d4f2 Use specific version of docfx 2021-11-04 07:55:51 +01:00
Bjarke Berg
b4d00cc695 Bump version to 9.1.0-rc 2021-11-03 15:05:12 +01:00
Bjarke Berg
be65f12ed7 Updated nuget dependencies 2021-11-03 14:29:59 +01:00
Bjarke Berg
109487f117 Merge pull request #11568 from umbraco/v9/feature/merge_v8_03-11-2021
V9: Merge v8: 03-11-2021
2021-11-03 12:56:23 +01:00
Bjarke Berg
c3ebbe23fd Merge remote-tracking branch 'origin/v8/dev' into v9/feature/merge_v8_03-11-2021
# Conflicts:
#	src/Umbraco.Core/Configuration/GlobalSettings.cs
#	src/Umbraco.Core/Configuration/IGlobalSettings.cs
#	src/Umbraco.Core/Constants-AppSettings.cs
#	src/Umbraco.Tests/Umbraco.Tests.csproj
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/Editors/ContentTypeController.cs
#	src/Umbraco.Web/HealthCheck/Checks/Security/BaseHttpHeaderCheck.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Configurations/LanguageXmlTests.cs
2021-11-03 08:44:12 +01:00
Bjarke Berg
0c3c88609e New projects starts with history cleanup enabled by default 2021-11-02 10:19:41 +01:00
Paul Johnson
b375d28bdb Use powershell / bash tasks instead of npm for acceptance tests 2021-10-26 14:08:11 +01:00
Paul Johnson
7a929765cd Fix build required before initial publish 2021-10-21 02:05:08 +01:00
Paul Johnson
0f3b24496a Restore BelleBuild target (for back-office assets) and use npm ci (#11364)
Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-10-19 10:16:08 +01:00
Paul Johnson
7020793235 Restore BelleBuild target (for back-office assets) and use npm ci (#11364)
Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-10-19 10:15:07 +01:00
Paul Johnson
00133e880d Move test projects from src/ to tests/ (#11357)
* Update gitignore

* Move csproj

* Update project references

* Update solutions

* Update build scripts

* Tests used to share editorconfig with projects in src

* Fix broken tests.

* Stop copying around .editorconfig

merged root one with linting

* csharp_style_expression_bodied -> suggestion

* Move StyleCop rulesets to matching directories and update shared build properties

* Remove legacy build files, update NuGet.cofig and solution files

* Restore myget source

* Clean up .gitignore

* Update .gitignore

* Move new test classes to tests after merge

* Gitignore + nuget config

* Move new test

Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-10-18 08:14:04 +01:00
Bjarke Berg
9d4a0573d0 Merge remote-tracking branch 'origin/v9/9.0' into v9/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Infrastructure/Runtime/CoreRuntime.cs
2021-10-07 07:16:32 +02:00
Bjarke Berg
e786491a0c Added CopyRazorGenerateFilesToPublishDirectory to the template (#11301) 2021-10-06 14:38:50 +02:00
Mole
83e79f9bfa Merge pull request #11276 from umbraco/v9/bugfix/force_icu_on_windows_in_template
Force ICU usage on windows.
2021-10-06 10:28:00 +02:00
Blake Irwin
1bd827cbba Execute CopyUmbracoAssets @ BeforeBuild to prevent Rebuild failures 2021-10-06 10:25:05 +02:00
Bjarke Berg
931e91760d Force ICU usage on windows. 2021-10-05 12:34:39 +02:00