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 to .NET 8 + latest LTS of IoT SDKs #7262

Merged
merged 8 commits into from
Apr 12, 2024

Conversation

damonbarry
Copy link
Member

@damonbarry damonbarry commented Apr 9, 2024

In preparation for v1.5, this change updates our C# code to .NET 8.0. It also updates our dependency on the IoT SDKs to the latest LTS versions (Microsoft.Azure.Devices.Client 1.36.10, Microsoft.Azure.Devices 1.31.6).

I had to upgrade our dependency on Azure.Storage.Blobs because the device SDK upgraded theirs. This required that I upgrade the code in Edge Agent and some test modules to use newer storage blob libraries that aren't deprecated. I did local testing of the Edge Agent code to ensure that the new calls work as expected.

I updated the buildBranch.sh and runTests.sh scripts. buildBranch.sh was building two different ways: (1) it was doing a standard build of all .NET components from the repo root (dotnet build -c Release), and (2) it was publishing each "app" in a manner suitable for including in Docker images. I simplified it to just focus on the second scenario. For the first, I updated dotnet.yaml to call dotnet test directly. I simplified runTests.sh to use dotnet test instead of dotnet vstest (which is being deprecated) because dotnet test now supports running pre-built binaries instead of always building the binaries itself. Note that dotnet test apparently doesn't support some of the parallelization features that vstest did, but the time difference is minimal and the script logic is vastly simplified.

I updated EdgeHubTriggerCsharp.csproj to specify its own TargetFramework property, rather than including netcoreappVersion.props, because it has dependedencies that don't yet support .NET 8.

I successfully ran the CI Build pipeline with these changes. To test, I ran the end-to-end tests, nested end-to-end tests, connectivity tests, and ISA-95 smoke tests against the new bits.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

@damonbarry damonbarry changed the title Upgrade to .NET 8 and latest LTS IoT SDKs Upgrade to .NET 8 + latest LTS of IoT SDKs Apr 9, 2024
@yophilav
Copy link
Contributor

FYI, the long haul test still looking good after 25h.

@damonbarry
Copy link
Member Author

damonbarry commented Apr 11, 2024 via email

@kodiakhq kodiakhq bot merged commit 7508ffc into Azure:main Apr 12, 2024
19 checks passed
@damonbarry damonbarry deleted the net8-lts-sdk branch April 12, 2024 00:03
@damonbarry damonbarry mentioned this pull request May 1, 2024
6 tasks
kodiakhq bot pushed a commit that referenced this pull request May 1, 2024
This pipeline should probably have been updated in #7262 but was missed. This change:
- Updates the pipeline to look for test binaries in the net8.0 folder.
- Removes the code that registers packages.microsoft.com. The pipeline runners already have it, and they register it as signed with a specific keyring file, which may clash with the older style of registration found in the tests. With this change, we assume that the caller has registered the repo as a prerequisite.

I've tested that the pipeline passes with this change.

## Azure IoT Edge PR checklist:
damonbarry added a commit to damonbarry/iotedge that referenced this pull request May 1, 2024
This pipeline should probably have been updated in Azure#7262 but was missed. This change:
- Updates the pipeline to look for test binaries in the net8.0 folder.
- Removes the code that registers packages.microsoft.com. The pipeline runners already have it, and they register it as signed with a specific keyring file, which may clash with the older style of registration found in the tests. With this change, we assume that the caller has registered the repo as a prerequisite.

I've tested that the pipeline passes with this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants