Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade people-service to .NET 8 #111

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Conversation

ztanczos
Copy link
Contributor

@ztanczos ztanczos commented Feb 5, 2024

  • Update TargetFramework to net8.0
  • Update NuGet dependencies
  • Update Docker image version to dotnet:8.0

--
THIS MATERIAL IS CONTRIBUTED SUBJECT TO THE TERMS OF THE FINOS Corporate Contributor License Agreement.

THIS MATERIAL IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS MATERIAL MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.

- Update NuGet dependencies
- Update Docker image version to dotnet:8.0
Copy link

linux-foundation-easycla bot commented Feb 5, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ztanczos / name: Zoltan Tanczos (f0a43c5)

@bingenito
Copy link
Member

/easycla

@DovOps DovOps self-requested a review February 6, 2024 12:19
@DovOps
Copy link
Contributor

DovOps commented Feb 6, 2024

@ztanczos I tried to build this directly in a codespace for this branch using 'dotnet build' and it seems the microsoft devcontainer image by default has the CLI using DotNet 7.0, so it can't build targeting net8. That said, while running dotnet --installed-runtimes I do see the .net 8 runtime present. I'm not an expert with .net but this CLI build used to work fine before. Do we need a new feature added to the devcontainer so the CLI builds the projects by default?
Or are we waiting for devcontainers/images#855 to be ready so the universal image is updated ?

Copy link
Contributor

@DovOps DovOps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comment added on the main PR - what needs to be done so the projects can be built by default in the codespace? (right now it seems dotnet --version returns 7.x and complains when trying to build)

@ztanczos
Copy link
Contributor Author

ztanczos commented Feb 6, 2024

@ztanczos I tried to build this directly in a codespace for this branch using 'dotnet build' and it seems the microsoft devcontainer image by default has the CLI using DotNet 7.0, so it can't build targeting net8. That said, while running dotnet --installed-runtimes I do see the .net 8 runtime present. I'm not an expert with .net but this CLI build used to work fine before. Do we need a new feature added to the devcontainer so the CLI builds the projects by default? Or are we waiting for devcontainers/images#855 to be ready so the universal image is updated ?

@DovOps If I try using the 'dev' version of universal devcontainer then it works fine since that release already has .NET 8. Based on the conversation on the PR I believe the best would be to wait until Monday when they release to prod.

@ztanczos
Copy link
Contributor Author

The universal image now has .NET 8:

@ztanczos ➜ /workspaces/traderX (update_net80) $ dotnet --info
.NET SDK:
 Version:           8.0.101
 Commit:            6eceda187b
 Workload version:  8.0.100-manifests.69afb982

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.101/

.NET workloads installed:
 Workload version: 8.0.100-manifests.69afb982
There are no installed workloads to display.

Host:
  Version:      8.0.1
  Architecture: x64
  Commit:       bf5e279d92

.NET SDKs installed:
  8.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.101 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.101 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

@ztanczos ztanczos requested a review from DovOps February 13, 2024 07:13
@DovOps
Copy link
Contributor

DovOps commented Feb 13, 2024

I fully rebuilt the codespaces container, and re-ran the build and ran the services and this now works. I also ran the service via Docker-Compose to confirm that works as well.

@DovOps DovOps merged commit 3463ef1 into finos:main Feb 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants