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 6 #1112

Merged
merged 48 commits into from
Feb 17, 2023
Merged

Upgrade to .NET 6 #1112

merged 48 commits into from
Feb 17, 2023

Conversation

AFFogarty
Copy link
Contributor

@AFFogarty AFFogarty commented Oct 20, 2022

This PR addresses #1032 by updating to .NET 6.

@AFFogarty AFFogarty changed the title [WIP] Upgrade to .NET 6 Upgrade to .NET 6 Oct 24, 2022
@AFFogarty AFFogarty marked this pull request as ready for review October 24, 2022 23:02
@@ -112,7 +112,9 @@ internal class RDDCommandExecutor
{
case CommandSerDe.SerializedMode.Byte:
BinaryFormatter formatter = s_binaryFormatter ??= new BinaryFormatter();
#pragma warning disable SYSLIB0011 // Type or member is obsolete

Choose a reason for hiding this comment

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

I worry about the continued use of BinaryFormatter due to https://learn.microsoft.com/en-us/dotnet/standard/serialization/binaryformatter-security-guide. pragma'ing away is necessary to compile...but I worry this needs to be fixed soon.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes we will need to fix this in upcoming PRs

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah... I am worried about it, and we'll get hounded by component governance for this... but if it's a vulnerability, it's already a vulnerability now, so we may as well solve it while on .net 6

Copy link
Contributor

Choose a reason for hiding this comment

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

#1131 to defer

Copy link
Member

Choose a reason for hiding this comment

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

Since it's just a MemoryStream this one is really easy to fix. BinaryFormatter doesn't give any value over just writing the length and bytes.

vibhuic
vibhuic previously approved these changes Oct 25, 2022
@vibhuic
Copy link

vibhuic commented Oct 25, 2022

We are waiting for this release as lot of our applications are in .Net 6.0 and we would like to host them in Azure Databricks, thanks for creating this PR

cmmtchll
cmmtchll previously approved these changes Oct 25, 2022
Copy link
Contributor

@imback82 imback82 left a comment

Choose a reason for hiding this comment

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

Any reason to include src/csharp/upgrade-assistant.clef?

@AFFogarty
Copy link
Contributor Author

Any reason to include src/csharp/upgrade-assistant.clef?

Oops, removed.

@AFFogarty
Copy link
Contributor Author

Need to fix the build pipeline.

@dragorosson
Copy link
Contributor

@AFFogarty Thanks for working on this, can't wait to see it land!

@vibhuic
Copy link

vibhuic commented Nov 2, 2022

@AFFogarty - Would be awesome if you can please merge this PR. My team is waiting for this PR ;)

@AFFogarty
Copy link
Contributor Author

AFFogarty commented Nov 2, 2022

@AFFogarty - Would be awesome if you can please merge this PR. My team is waiting for this PR ;)

@vibhuic: We are blocked by the build failures.

@chaoticsoftware
Copy link

chaoticsoftware commented Nov 3, 2022

@AFFogarty any ETA on fixing the pipeline? I don't have access, but it seems we would just need to make sure the right SDK version is installed on the build machine.

Require the dotnet 6 SDK for development in this repository, to force the build process to download this SDK version.
@alastairs
Copy link

alastairs commented Nov 15, 2022

A bit of debugging indicates that global.json needs to be updated too--I've verified via build.cmd that results in a successful build, and have submitted AFFogarty#1 to fix the issue.

Further testing locally suggests that there may be further changes to make. Emulating the CI build produces the following output:

> .\build.cmd -pack -c Release -ci /p:PublishSparkWorker=true /p:SparkWorkerPublishDir="bin/Microsoft.Spark.Worker"
...
C:\Program Files\dotnet\sdk\7.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(1136,5): error NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used.

This might need an update to the Arcade version, but I don't know enough about this toolchain to know how or where.

cutecycle
cutecycle previously approved these changes Jan 26, 2023
@dragorosson
Copy link
Contributor

@AFFogarty @Niharikadutta @ericstj Is this mergeable?

ericstj
ericstj previously approved these changes Feb 2, 2023
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

Changes look good to me, just a couple non-blocking comments.

@@ -112,7 +112,9 @@ internal class RDDCommandExecutor
{
case CommandSerDe.SerializedMode.Byte:
BinaryFormatter formatter = s_binaryFormatter ??= new BinaryFormatter();
#pragma warning disable SYSLIB0011 // Type or member is obsolete
Copy link
Member

Choose a reason for hiding this comment

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

Since it's just a MemoryStream this one is really easy to fix. BinaryFormatter doesn't give any value over just writing the length and bytes.

eng/AfterSolutionBuild.targets Show resolved Hide resolved
@GeorgeS2019
Copy link

@AFFogarty
@Niharikadutta

Please support the .NET migration to keep this Azure Doc Page VALID!

@dragorosson
Copy link
Contributor

@Niharikadutta @suhsteve @AFFogarty Is there anything left holding this up?

@GeorgeS2019
Copy link

GeorgeS2019 commented Feb 17, 2023

@dragorosson
I check out the .NET6 and it works.
The issue from my side is to get the delta extension to work!

@GeorgeS2019
Copy link

GeorgeS2019 commented Feb 17, 2023

@AFFogarty
@suhsteve

Thanks for your efforts!

The following may be relevant to your Todo list to get UDF working in e.g. Notebook:

We will move away from BinaryFormatter from upcoming releases.

One user has a solution to the ToDo problem. However, I have not looked into it yet.

Additional feedback related to UDF

Copy link
Member

@suhsteve suhsteve left a comment

Choose a reason for hiding this comment

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

LGTM

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.DependencyManager" Version="10.10.0-beta.20254.4" />
<PackageReference Include="System.Memory" Version="4.5.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
Copy link
Member

Choose a reason for hiding this comment

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

I assume this isn't required in net 6?

Copy link
Collaborator

@Niharikadutta Niharikadutta left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @AFFogarty

@AFFogarty AFFogarty merged commit b63c08b into dotnet:main Feb 17, 2023
@chaoticsoftware
Copy link

It's great to see this checked in. Thank you! I would imagine that there would be a release soon [?] @AFFogarty

@GeorgeS2019
Copy link

@chaoticsoftware
It has been a long day for @AFFogarty

Let us wait till next week. Let us feedback to support them to get the .NET6 working RIGHT through nuget release.

@AFFogarty AFFogarty deleted the anfog/20220822_net_6 branch February 17, 2023 22:34
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.