Skip to content

Commit

Permalink
Upgrade to .NET 9 and Azure Linux 3.0 (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstairs authored Nov 26, 2024
1 parent 6700701 commit fc27d78
Show file tree
Hide file tree
Showing 31 changed files with 963 additions and 1,607 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN umask 0002 \
&& VERSION=1.28.3 HELM=3.13.1 MINIKUBE=none bash install.sh \
# DOTNET
&& cd /opt/features/src/dotnet \
&& VERSION=8.0.302 bash install.sh \
&& VERSION=9.0.100 bash install.sh \
# GO
&& cd /opt/features/src/go \
&& VERSION=1.23.1 bash install.sh \
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ dotnet_diagnostic.IDE0170.severity = warning # SimplifyPropertyPattern
dotnet_diagnostic.IDE0180.severity = warning # UseTupleSwap
dotnet_diagnostic.IDE0190.severity = warning # UseParameterNullCheckingId
dotnet_diagnostic.IDE0200.severity = warning # RemoveUnnecessaryLambdaExpression
dotnet_diagnostic.IDE0290.severity = none # PreferPrimaryConstructors
dotnet_diagnostic.IDE1001.severity = warning # AnalyzerChangedId
dotnet_diagnostic.IDE1002.severity = warning # AnalyzerDependencyConflictId
dotnet_diagnostic.IDE1003.severity = warning # MissingAnalyzerReferenceId
Expand Down
6 changes: 3 additions & 3 deletions .notice-metadata.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1e2a80a6c0bbc4591f902da90005b5953c0a3cf84787ed9540732a033ee0f054 cli/go.sum
b716447b65f80ed77210551bd2c8a69cea1774d64c63bfb392b9b496ded5aa9d server/ControlPlane/packages.lock.json
83e9d72c489371ac10d1509e640c5daaafe4bef2be498456b4342a0700fe6608 server/DataPlane/packages.lock.json
33d7431ce175376b59e4634781746a75f1599aef8251b1153dc4d7484e67b745 server/ControlPlane/packages.lock.json
a25dbcbbf4137b6c2a0e2140b940cbb68a8f9624af487a38934918088795b7bd server/DataPlane/packages.lock.json
e518c00c2e96699b9cf588fe7504950aa2ca33a0ed1d7e53e0bb2b5b0dbce2c4 scripts/generate-notice.sh
47be51966f2c830f24d28f44e51bf6e098582cb8891a0d971b83b8aaddc8d728 NOTICE.txt
766290325e77198a54e095b2e76092258af8bb0bbaf541623b8bbfa7573a5055 NOTICE.txt
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/server/ControlPlane/bin/Debug/net8.0/tyger-server",
"program": "${workspaceFolder}/server/ControlPlane/bin/Debug/net9.0/tyger-server",
"args": [],
"cwd": "${workspaceFolder}/server/ControlPlane",
"stopAtEntry": false,
Expand All @@ -21,7 +21,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/server/DataPlane/bin/Debug/net8.0/tyger-data-plane-server",
"program": "${workspaceFolder}/server/DataPlane/bin/Debug/net9.0/tyger-data-plane-server",
"args": [],
"cwd": "${workspaceFolder}/server/DataPlane",
"stopAtEntry": false,
Expand Down
1,400 changes: 364 additions & 1,036 deletions NOTICE.txt

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=${BUILDOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w -X main.version=${TYGER_VERSION}" -v -o /go/bin/dist/${BUILDOS}/${TARGETARCH}/ ./cmd/buffer-sidecar ./cmd/tyger ./cmd/buffer-copier

FROM mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0-nonroot.20240112 as buffer-sidecar
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20241101 as buffer-sidecar
ARG TARGETARCH BUILDOS

COPY --from=go-build /go/bin/dist/${BUILDOS}/${TARGETARCH}/buffer-sidecar /
USER nonroot:nonroot
ENTRYPOINT ["/buffer-sidecar"]

FROM mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0-nonroot.20240112 as tyger-cli
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20241101 as tyger-cli
ARG TARGETARCH BUILDOS

WORKDIR /app
COPY --from=go-build /go/bin/dist/${BUILDOS}/${TARGETARCH}/tyger .
USER nonroot:nonroot
ENTRYPOINT ["/app/tyger"]

FROM mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0-nonroot.20240112 as buffer-copier
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20241101 as buffer-copier
ARG TARGETARCH BUILDOS

WORKDIR /app
COPY --from=go-build /go/bin/dist/${BUILDOS}/${TARGETARCH}/buffer-copier .
USER nonroot:nonroot
ENTRYPOINT ["/app/buffer-copier"]
4 changes: 2 additions & 2 deletions cli/integrationtest/controlplane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

const (
BasicImage = "mcr.microsoft.com/cbl-mariner/base/core:2.0"
BasicImage = "mcr.microsoft.com/azurelinux/base/core:3.0"
GpuImage = "nvidia/cuda:11.0.3-base-ubuntu20.04"
AzCliImage = "mcr.microsoft.com/azure-cli:2.64.0"
)
Expand Down Expand Up @@ -822,7 +822,7 @@ func TestInvalidCodespecMissingRequiredFieldsRejected(t *testing.T) {
codespec := model.Codespec{}
requestBody := map[string]string{"kind": "job"}
_, err := controlplane.InvokeRequest(context.Background(), http.MethodPut, "v1/codespecs/tcs", requestBody, &codespec)
require.ErrorContains(err, "missing required properties, including the following: image")
require.ErrorContains(err, "missing required properties including: 'image'")
}

func TestResponseContainsRequestIdHeader(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion cli/integrationtest/expected_openapi_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,6 @@ components:
additionalProperties:
type: integer
format: int32
nullable: true
description: The name and port of the endpoints that the worker exposes.
nullable: true
additionalProperties: { }
Expand Down
2 changes: 1 addition & 1 deletion cli/integrationtest/testconnectivity/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=${BUILDOS} GOARCH=${TARGETARCH} go build -tags integrationtest -ldflags="-s -w" -o /go/bin/testconnectivity ./integrationtest/testconnectivity/

FROM mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0-nonroot.20240112 as testconnectivity
FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20241101 as testconnectivity
COPY --from=go-build /go/bin/testconnectivity /
ENTRYPOINT ["/testconnectivity"]
2 changes: 1 addition & 1 deletion cli/internal/install/dockerinstall/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (

DefaultEnvironmentName = "local"
DefaultPostgresImage = "postgres:16.2"
DefaultMarinerImage = "mcr.microsoft.com/cbl-mariner/base/core:2.0"
DefaultMarinerImage = "mcr.microsoft.com/azurelinux/base/core:3.0"
)

func (inst *Installer) QuickValidateConfig() bool {
Expand Down
2 changes: 1 addition & 1 deletion deploy/images/worker-waiter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /opt/download
RUN curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" && chmod +x kubectl


FROM mcr.microsoft.com/cbl-mariner/base/core:2.0-nonroot.20240112 AS worker-waiter
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS worker-waiter
USER root
COPY --from=build /opt/download/kubectl /usr/local/bin/kubectl
USER nonroot
2 changes: 1 addition & 1 deletion server/Common/Tyger.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion server/Common/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"dependencies": {
"net8.0": {}
"net9.0": {}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading

0 comments on commit fc27d78

Please sign in to comment.