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

.NET 8.0 upgrade and additions from original project #82

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

LuizMacedo
Copy link
Collaborator

This pull request includes significant changes to the eShopOnWeb project, primarily aimed at upgrading the project from ASP.NET Core 7.0 to ASP.NET Core 8.0, and adding new functionality and configurations for Azure deployment, testing, and CI/CD.

The most important changes include:

  • Upgrading the project from ASP.NET Core 7.0 to ASP.NET Core 8.0 [1] [2] [3] [4] [5] [6]
  • Removing the old Dockerfile and related configuration in devcontainer.json [1] [2] [3]
  • Adding new configurations for Azure Developer CLI deployment
  • Adding new GitHub Actions workflows for CI/CD and code indexing [1] [2]
  • Adding a Dependabot configuration for automatic NuGet package updates
  • Updating .editorconfig, .gitattributes, and Visual Studio Code settings [1] [2] [3]
  • Updating the README with new instructions and information about the changes [1] [2] [3] [4]

Changes by theme:

Upgrading to ASP.NET Core 8.0:

Docker and Azure Developer CLI configurations:

GitHub Actions workflows:

Other changes:

@LuizMacedo
Copy link
Collaborator Author

@yashints @rob-foulkrod @unaihuete93 @petender I would love to have your validation to this upgrade. For sure, I'm not asking to check file by file since it's huge but let me know if it's working fine for you thinking on AZ-400. The same project will be used in the new course DevOps Foundations.

This pulls request includes changes to the eShopOnWeb project to upgrade it from .NET 7.0 to .NET 8.0. The most significant changes include updating the Docker configurations, modifying the GitHub workflows, and updating the project's dependencies.

cc @lauraAlvEl

@rob-foulkrod
Copy link
Collaborator

Starting the review process now. There is a lot to go thru. :) I am getting a build warning due to an obsolete overload in 'src/ApplicationCore/Exceptions/EmptyBasketOnCheckoutException.cs'. Near as I can tell, the following method is old boilerplate and can be deleted.

protected EmptyBasketOnCheckoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { }

Once delete, everything builds, and test run without warnings.

@LuizMacedo
Copy link
Collaborator Author

@rob-foulkrod @yashints all fixed. I planning to approve this PR on Friday, so it fixes issues from AZ-400 and AZ-2008 new labs. Please, let me know if you see any issues and approve if possible! Thanks!

Copy link
Contributor

@yashints yashints left a comment

Choose a reason for hiding this comment

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

Runs and tests are all good

@LuizMacedo LuizMacedo merged commit a417fee into main Feb 16, 2024
@LuizMacedo LuizMacedo deleted the project-update-and-adds branch February 16, 2024 15:16
@theDiverDK
Copy link

Hi there

I was just doing the LABS for AZ-400 since I am going to teach it in a few weeks as MCT.

In this lab:
https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M09_L16_Monitoring_Application_Performance_with_Application_Insights.html

When I have deployed the app for the first time and try to access it (according to the lab guide), i get a
HTTP Error 500.30 - ASP.NET Core app failed to start

When i look in the log files i found this error:

<EventData>
            <Data>Application '/LM/W3SVC/857545966/ROOT' with physical root 'C:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
Unhandled exception. System.UriFormatException: Invalid URI: The URI is empty.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions&amp; creationOptions)
   at System.Uri..ctor(String uriString)
   at Program.&lt;Main&gt;$(String[] args) in /home/vsts/work/1/s/src/Web/Program.cs:line 32
   at Program.&lt;Main&gt;(String[] args)
</Data>
            <Data>Process Id: 6940.</Data>
            <Data>File Version: 18.0.23334.1. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: </Data>
        </EventData>

Which did make me loot at the source for Program.cs at line 32, where i see this:
builder.Configuration.AddAzureKeyVault(new Uri(builder.Configuration["AZURE_KEY_VAULT_ENDPOINT"] ?? ""), credential);

This code was added in the this commit: c656d9b

Since there is no AZURE_KEY_VAULT_ENDPOINT in the configuration it ends up being "" (Empty), and we get this error.

So the 'Updating dotnet to 8.0 and sync project' commit seems to have broken a lot of LABS. :-(

A few days ago I tried another AZ-400 lab, and had the same error.

@theDiverDK theDiverDK mentioned this pull request Feb 23, 2024
@lauraAlvEl
Copy link
Collaborator

Hi @theDiverDK,

Can you confirm if this has already been addressed in the following thread?

#108 (comment)

You need to follow the lab instructions from GitHub if your lab provider hasn't updated theirs.

@theDiverDK
Copy link

Hi @lauraAlvEl

I can confirm, adding:

UseOnlyInMemoryDatabase = true
ASPNETCORE_ENVIRONMENT = Development

To configuration did solve the issue.

In 5 minutes, I am going through the whole lab, from:
https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M09_L16_Monitoring_Application_Performance_with_Application_Insights.html

To check it again :)

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.

5 participants