Skip to content

Commit

Permalink
Downgrade to .NET 9.0 preview 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ondfisk committed Aug 25, 2024
1 parent e3ad299 commit 0e8a8db
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/linters/.checkov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ skip-check:
- CKV_AZURE_27 # Ensure that 'Email service and co-administrators' is 'Enabled' for MSSQL servers
- CKV_AZURE_35 # Ensure default network access rule for Storage Accounts is set to deny
- CKV_AZURE_59 # Ensure that Storage Accounts disallow public access
- CKV_AZURE_63 # Ensure that App service enables HTTP logging
- CKV_AZURE_65 # Ensure that App service enables detailed error messages
- CKV_AZURE_66 # Ensure that App service enables failed request tracing
# - CKV_AZURE_63 # Ensure that App service enables HTTP logging
# - CKV_AZURE_65 # Ensure that App service enables detailed error messages
# - CKV_AZURE_66 # Ensure that App service enables failed request tracing
- CKV_AZURE_80 # Ensure that 'Net Framework' version is the latest, if used as a part of the web app
- CKV_AZURE_88 # Ensure that App Services use Azure Files
- CKV_AZURE_109 # Ensure that Key Vault allows firewall rules settings
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.100-preview.7.24407.12
dotnet-version: 9.0.0-preview.6.24327.4

- name: .NET Restore
run: dotnet restore
Expand All @@ -49,7 +49,7 @@ jobs:
run: dotnet publish src/MyApp/MyApp.csproj --no-build --configuration ${{ env.configuration }} --output app

- name: Zip Artifact
run: zip -r app.zip app
run: pushd app && zip -r ../app.zip . && popd

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -111,14 +111,12 @@ jobs:
chmod +x ./efbundle
# ./efbundle --connection "$CONNECTION_STRING"
- name: Deploy
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
- name: Deploy Web App
uses: azure/cli@v2
with:
resource-group-name: ${{ vars.RESOURCE_GROUP }}
app-name: ${{ vars.WEBAPP }}
slot-name: ${{ vars.DEPLOYMENT_SLOT }}
package: app.zip
azcliversion: latest
inlineScript: |
az webapp deploy --resource-group ${{ vars.RESOURCE_GROUP }} --name ${{ vars.WEBAPP }} --slot ${{ vars.DEPLOYMENT_SLOT }} --src-path app.zip --clean
production:
name: Deploy to Production
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"healthz",
"MSSQL",
"outfile",
"popd",
"pushd",
"pwsh",
"resourcegroup",
"serverfarms",
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "9.0.0-preview.6.24327.4",
"rollForward": "latestFeature"
}
}
22 changes: 21 additions & 1 deletion infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ resource webApp 'Microsoft.Web/sites@2023-12-01' = {
reserved: true
hyperV: false
siteConfig: {
linuxFxVersion: 'DOTNETCORE|8.0'
linuxFxVersion: 'DOTNETCORE|9.0'
alwaysOn: true
http20Enabled: true
minTlsVersion: '1.2'
scmMinTlsVersion: '1.2'
ftpsState: 'Disabled'
healthCheckPath: '/healthz'
httpLoggingEnabled: true
detailedErrorLoggingEnabled: true
}
httpsOnly: true
publicNetworkAccess: 'Enabled'
Expand All @@ -71,12 +73,30 @@ resource deploymentSlot 'Microsoft.Web/sites/slots@2023-12-01' = {
scmMinTlsVersion: '1.2'
ftpsState: 'Disabled'
healthCheckPath: '/healthz'
httpLoggingEnabled: true
detailedErrorLoggingEnabled: true
}
httpsOnly: true
publicNetworkAccess: 'Enabled'
}
}

resource webAppBasicPublishingCredentialsFtp 'Microsoft.Web/sites/basicPublishingCredentialsPolicies@2023-12-01' = {
name: 'ftp'
parent: webApp
properties: {
allow: false
}
}

resource slotBasicPublishingCredentialsFtp 'Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies@2023-12-01' = {
name: 'ftp'
parent: deploymentSlot
properties: {
allow: false
}
}

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: logAnalyticsWorkspaceName
location: location
Expand Down
2 changes: 1 addition & 1 deletion src/MyApp/Migrations/20240824184034_Initial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/MyApp/Migrations/AppDbContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0-preview.7.24405.3")
.HasAnnotation("ProductVersion", "9.0.0-preview.6.24327.4")
.HasAnnotation("Relational:MaxIdentifierLength", 128);

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
Expand Down
5 changes: 3 additions & 2 deletions src/MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.2.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.1" />
<PackageReference Include="Microsoft.EntityframeworkCore.Design" Version="9.0.0-preview.7.24405.3">
<PackageReference Include="Microsoft.EntityframeworkCore.Design" Version="9.0.0-preview.6.24327.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityframeworkCore.SqlServer" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityframeworkCore.SqlServer" Version="9.0.0-preview.6.24327.4" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.64.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
Expand Down
5 changes: 5 additions & 0 deletions src/MyApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Azure.Monitor.OpenTelemetry.AspNetCore;
using Microsoft.EntityFrameworkCore;
using MyApp.Features;
using MyApp.Features.Movies;
Expand All @@ -6,6 +7,10 @@
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
if (!builder.Environment.IsDevelopment())
{
builder.Services.AddOpenTelemetry().UseAzureMonitor();
}
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddHealthChecks();
Expand Down
2 changes: 1 addition & 1 deletion tests/MyApp.Tests/MyApp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.6.24327.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Testcontainers.MsSql" Version="3.9.0" />
<PackageReference Include="xunit" Version="2.9.0" />
Expand Down

0 comments on commit 0e8a8db

Please sign in to comment.