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

Upgraded Newtonsoft and added ServiceBus Changes for MSI Auth on NET … #800

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

namanjainv
Copy link

…461 and greater

Copy link
Collaborator

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Hi @namanjainv, can you reduce the scope of this PR to only touch Service Bus-related code? We can't accept the changes for DurableTask.AzureStorage, for example, because those will break existing customers in Azure Functions. We have fewer restrictions on the Service Bus-related projects.

Copy link
Collaborator

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Missing from this PR is a change to the package version. Normally for this package it comes from /tools/DurableTask.props. However, we're trying to instead keep version numbers in the package that we're actually versioning rather than having a common version configuration. Can you add the following markup to DurableTask.ServiceBus.csproj?

  <!-- Version Info -->
  <PropertyGroup>
    <MajorVersion>2</MajorVersion>
    <MinorVersion>7</MinorVersion>
    <PatchVersion>0</PatchVersion>

    <VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
    <FileVersion>$(VersionPrefix).0</FileVersion>
    <!-- FileVersionRevision is expected to be set by the CI. This is useful for distinguishing between multiple builds of the same version. -->
    <FileVersion Condition="'$(FileVersionRevision)' != ''">$(VersionPrefix).$(FileVersionRevision)</FileVersion>
    <!-- The assembly version is only the major/minor pair, making it easier to do in-place upgrades -->
    <AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
    <!-- This version is used as the nuget package version -->
    <Version>$(VersionPrefix)</Version>
  </PropertyGroup>

Note that I suggested this to be v2.7.0, but we may want to consider it to be 3.0.0 since we're making potentially breaking changes by upgrading dependencies. See some of my other comments too, which might impact the final version we go with.

<Version>$(VersionPrefix)</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
Copy link
Collaborator

Choose a reason for hiding this comment

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

With your latest changes, is it possible to only target netstandard2.0 instead of both net462 and netstandard2.0? That would be preferred since it will reduce the size of the package.

Copy link
Author

@namanjainv namanjainv Oct 5, 2022

Choose a reason for hiding this comment

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

I tried to remove net462 dependencies, but this started throwing multiple build-time errors. For example System.Transaction was not available. And I dont think we need to remove net462 from TargetFrameworks right?

Incase I remove, do I need to remove net462 test cases too?

@cgillum
Copy link
Collaborator

cgillum commented Oct 13, 2022

/azp run

@azure-pipelines
Copy link

azure-pipelines bot commented Oct 13, 2022

Azure Pipelines started successfully

Copy link
Collaborator

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

I'm good with these changes now, and the CI is passing.

@cgillum
Copy link
Collaborator

cgillum commented Oct 13, 2022

Actually, it looks like the CI didn't run any of the Service Bus tests due to a filter which is no longer finding them. I'll need to update the CI to account for this.

@namanjainv
Copy link
Author

Actually, it looks like the CI didn't run any of the Service Bus tests due to a filter which is no longer finding them. I'll need to update the CI to account for this.

Sounds good

@namanjainv namanjainv closed this Oct 13, 2022
@cgillum
Copy link
Collaborator

cgillum commented Oct 14, 2022

I assume this was closed accidentally?

@cgillum cgillum reopened this Oct 14, 2022
@namanjainv
Copy link
Author

Yup. My bad

DurableTask.sln Show resolved Hide resolved
@namanjainv namanjainv requested review from cgillum and removed request for cgillum January 19, 2023 21:16
@namanjainv namanjainv requested a review from jviau January 19, 2023 21:16
@jviau
Copy link
Collaborator

jviau commented Jan 19, 2023

@namanjainv to make sure I understand this change correctly: it looks like you are removing the net461 TFM and all of its ifdef logic. Is the end result that the MSI features you want were behind netstandard2.0 ifdefs and thus not available when targeting netfx?

If the above is correct, this is really interesting that you did not have to add any code, just remove that net461 specifics. I am curious if there was a reason this was never added to net461 in the first place? @cgillum do you know why?

@cgillum
Copy link
Collaborator

cgillum commented Jan 19, 2023

@jviau my memory is a bit fuzzy, but I think the main reason we originally had multiple TFMs was because DT.Core, DT.ServiceBus, and some other dependencies were targeting net451, which was not compatible with netstandard2.0. Since then, the older TFMs have been replaced with newer ones, but I think we simply never got around to just collapsing everything to netstandard2.0, like what is being done in this PR.

@cgillum
Copy link
Collaborator

cgillum commented Jan 26, 2023

This change requires us to update our CI pipeline because the location of the test DLLs will change. Unfortunately, this CI was created before it was possible to use YAML files in the repo (and we haven't converted it to YAML yet), so we have to use the ADO UX to make these updates.

@namanjainv can you tell me where I'll be able to find the Service Bus test DLLs in the build output (paths relative to the repo root)?

@namanjainv
Copy link
Author

@cgillum, The DLL is generated at "Test\DurableTask.ServiceBus.Tests\bin\Debug\netcoreapp3.1\DurableTask.ServiceBus.dll"

@cgillum
Copy link
Collaborator

cgillum commented Feb 7, 2023

/azp run

@azure-pipelines
Copy link

azure-pipelines bot commented Feb 7, 2023

EDIT: Test run triggered successfully.

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.

3 participants