Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
1nf0rmagician committed Nov 23, 2023
2 parents 409b2d7 + 3f0bc8e commit 6388a3e
Show file tree
Hide file tree
Showing 206 changed files with 1,393 additions and 2,911 deletions.
680 changes: 0 additions & 680 deletions .build/BuildToolkit.ps1

This file was deleted.

36 changes: 0 additions & 36 deletions .build/Output.ps1

This file was deleted.

119 changes: 56 additions & 63 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,94 +12,87 @@ on:
branches:
- dev
- future

env:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
dotnet_sdk_version: '8.0.100'
REPOSITORY_NAME: ${{ github.event.repository.name }}
MORYX_PACKAGE_TARGET_DEV: 'https://www.myget.org/F/moryx/api/v2/package'
MORYX_PACKAGE_TARGET_V3_DEV: 'https://www.myget.org/F/moryx/api/v3/index.json'
MORYX_PACKAGE_TARGET_FUTURE: 'https://www.myget.org/F/moryx-future/api/v2/package'
MORYX_PACKAGE_TARGET_V3_FUTURE: 'https://www.myget.org/F/moryx-future/api/v3/index.json'
MORYX_PACKAGE_TARGET_RELEASE: 'https://api.nuget.org/v3/index.json'
MORYX_PACKAGE_TARGET_V3_RELEASE: 'https://api.nuget.org/v3/index.json'

jobs:
EnvVar:
runs-on: ubuntu-latest
steps:
- run: echo ""
outputs:
dotnet_sdk_version: ${{ env.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }}
MORYX_PACKAGE_TARGET_DEV: ${{ env.MORYX_PACKAGE_TARGET_DEV }}
MORYX_PACKAGE_TARGET_V3_DEV: ${{ env.MORYX_PACKAGE_TARGET_V3_DEV }}
MORYX_PACKAGE_TARGET_FUTURE: ${{ env.MORYX_PACKAGE_TARGET_FUTURE }}
MORYX_PACKAGE_TARGET_V3_FUTURE: ${{ env.MORYX_PACKAGE_TARGET_V3_FUTURE }}
MORYX_PACKAGE_TARGET_RELEASE: ${{ env.MORYX_PACKAGE_TARGET_RELEASE }}
MORYX_PACKAGE_TARGET_V3_RELEASE: ${{ env.MORYX_PACKAGE_TARGET_V3_RELEASE }}

Build:
uses: PHOENIXCONTACT/tools/.github/workflows/build-tool.yml@main
needs: [EnvVar]
uses: phoenixcontact/tools/.github/workflows/build-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}

UnitTests:
needs: [Build]
uses: PHOENIXCONTACT/tools/.github/workflows/unittest-tool.yml@main
needs: [EnvVar, Build]
uses: phoenixcontact/tools/.github/workflows/unittest-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}

IntegrationTests:
needs: [Build]
uses: PHOENIXCONTACT/tools/.github/workflows/integrationtest-tool.yml@main
needs: [EnvVar, Build]
uses: phoenixcontact/tools/.github/workflows/integrationtest-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}

ReportGenerator:
needs: [UnitTests, IntegrationTests]
uses: PHOENIXCONTACT/tools/.github/workflows/reportgenerator-tool.yml@main
needs: [EnvVar, UnitTests, IntegrationTests]
uses: phoenixcontact/tools/.github/workflows/reportgenerator-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}

Publish-Test-Coverage:
needs: [ReportGenerator]
uses: PHOENIXCONTACT/tools/.github/workflows/publish-test-coverage-tool.yml@main
needs: [EnvVar, ReportGenerator]
uses: phoenixcontact/tools/.github/workflows/publish-test-coverage-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Documentation:
needs: [UnitTests]
uses: PHOENIXCONTACT/tools/.github/workflows/documentation-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
# currently not working
# Documentation:
# needs: [EnvVar, UnitTests]
# uses: phoenixcontact/tools/.github/workflows/documentation-tool.yml@main
# with:
# REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}

Publish:
needs: [UnitTests]
uses: PHOENIXCONTACT/tools/.github/workflows/publish-tool.yml@main
needs: [EnvVar, UnitTests]
uses: phoenixcontact/tools/.github/workflows/publish-tool.yml@main
with:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '7.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
REPOSITORY_NAME: ${{ github.event.repository.name }}
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
MORYX_PACKAGE_TARGET_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_DEV }}
MORYX_PACKAGE_TARGET_V3_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_DEV }}
MORYX_PACKAGE_TARGET_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_FUTURE }}
MORYX_PACKAGE_TARGET_V3_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_FUTURE }}
MORYX_PACKAGE_TARGET_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_RELEASE }}
MORYX_PACKAGE_TARGET_V3_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_RELEASE }}
secrets:
MYGET_TOKEN: ${{secrets.MYGET_TOKEN}}
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
63 changes: 0 additions & 63 deletions Build.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion Directory.build.props → Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
23 changes: 11 additions & 12 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,30 @@
<Import Project=".build\Common.props" Condition="'$(CreatePackage)' == 'true'" />

<PropertyGroup>
<dotnetVersion>6.0.0</dotnetVersion>
<efCoreVersion>6.0.0</efCoreVersion>
<dotnetVersion>8.0.0</dotnetVersion>
<efCoreVersion>8.0.0</efCoreVersion>

<LangVersion>latest</LangVersion>
</PropertyGroup>

<!-- Package refereces for all projects if CreatePackage=true -->
<ItemGroup Condition="'$(CreatePackage)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<!-- Package versions for package references across all projects -->
<ItemGroup>
<!--3rd party dependencies-->
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Update="Moq" Version="4.17.2" />
<PackageReference Update="NUnit" Version="3.13.3" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Update="Moq" Version="4.20.69" />
<PackageReference Update="NUnit" Version="3.14.0" />
<PackageReference Update="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Update="coverlet.collector" Version="3.2.0" >
<PackageReference Update="coverlet.collector" Version="6.0.0" >
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Update="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Update="CommandLineParser" Version="2.9.1" />

<FrameworkReference Update="Microsoft.AspNetCore.App" Version="$(dotnetVersion)"/>
Expand All @@ -43,12 +44,10 @@
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="$(efCoreVersion)" />
<PackageReference Update="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(efCoreVersion)" />

<PackageReference Update="System.IO.Ports" Version="6.0.0" />
<PackageReference Update="System.IO.Ports" Version="$(dotnetVersion)" />
<PackageReference Update="System.ComponentModel.Annotations" Version="5.0.0" />

<PackageReference Update="Castle.Windsor" Version="5.1.1" />
<PackageReference Update="Castle.WcfIntegrationFacility" Version="5.1.1" />
<PackageReference Update="Castle.Windsor.Extensions.DependencyInjection" Version="5.1.1" />
<PackageReference Update="Castle.Windsor" Version="6.0.0" />

</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0
8.0.0
25 changes: 25 additions & 0 deletions docs/migrations/v6_to_v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Migration from MORYX Framework v6 to v8


## Local Container Refactoring
The DI container within modules based on Castle Windsor was refactored and simplified. The most changes are caused by removing the historic split between local and global container, which was obsolete after switching the global container to ServiceCollection. We also removed the concept of installers and registrators and replaced everything with API on `IContainer` and extensions inspired by the `IServiceCollection`.

- **Attribute changes:** The base attributes for registration were removed, use `ComponentAttribute`, `PluginAttribute` and `PluginFactory` instead.
- **Installers removed** The concept of installes was removed and with it their implementations `AutoInstaller` and `DependencyInstaller`. They were replaced by the extensions `LoadFromAssembly` with different signature options for `DependencyRegistrationAttribute` and `Predicate<Type>`
- **LoadComponents** was removed as a dedicate feature and is now an extension on `IContainer`. It has also been restricted to public/exported types.
- **IContainerHost** was removed. The seperate interface for accessing a modules container just caused unnecessary casts and the risk of invalid type. The property `Container` was added to `IServerModule` instead.
- **Extend** The flexible method for passing facilities to Castle was removed as it was only added and used by WCF.
- **MoryxFacility** All MORYX specific behavior like strategies and `Named` import overrides were refactored to follow Castle best practises and are now isolated in the `MoryxFacility`. This enables everyone to achieve the MORYX DI behavior with a Castle Container without the MORYX wrapper.
- **Installers** As previously mentioned installers were removed, but since the API on `IContainer` now supports everything previously reserved for installers and registrators, just migrate the registration onto the container like the [DbContextContainerExtension](https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/future/src/Moryx.Model/DbContextContainerExtension.cs) or the [BasicInterceptorInstaller](https://github.com/PHOENIXCONTACT/MORYX-Framework/blob/future/src/Moryx.TestTools.UnitTest/BasicInterceptorInstaller.cs)

## ServerModuleBase

To simplify development and prepare easier integration of the Moryx.Cli we merged the `ServerModuleFacadeControllerBase` into the `ServerModuleBase`. Just replace the base type if your module is affected by this.

## GetObjectData(SerializationInfo info, StreamingContext context)

Removed all overrides of the obsolete method `Exception.GetObjectData(SerializationInfo info, StreamingContext context)` as well as all constructors which were calling the base class constructor `Exception(SerializationInfo info, StreamingContext context)`
The following classes are affected by this change
- MissingFacadeException
- HealthStateException
- InvalidConfigException
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>Endpoints for the Product Facade</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;IIoT;IoT;</PackageTags>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ static PartialSerialization()
_serialization = new EntrySerializeSerialization();
}

/// <summary>
/// Creates a new <see cref="PartialSerialization{T}"/> instance
/// </summary>
public PartialSerialization() : base(null, new EmptyValueProvider())
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public ActionResult<ProductModel> GetTypeById(long id)
{
productType = _productManagement.LoadType(id);
}
catch (ProductNotFoundException e)
catch (ProductNotFoundException)
{
}
if (productType == null)
Expand Down
Loading

0 comments on commit 6388a3e

Please sign in to comment.