-
Notifications
You must be signed in to change notification settings - Fork 539
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
Consolidate .csproj files #317
Conversation
I realized while doing this.. Random ramblingedit: It seems to switch per build platform..? maybe. edit: Wait is that why there is a QEMU in docker CI/CD.. edit: nope, they specify arch final edit: Restoring original path behavior now that I found the Azure CI responsible for NuGet pushes. I'll leave RID tinkering for the future to keep the PR focused |
* Investigate whether I need to "fix" RID usage in this PR too
This reverts commit cc9f943.
* For some reason tests will run in different level and than the artifact OutputPath
This PR goes deep and has wide reaching affect as we have private Azure Dev Ops pipelines that we connect to this repo to do security checks, releases etc. It might be a few days before I can approve this. |
Assuming no problems here, the changes look good |
Take all the time that is needed to evaluate this as I'm not familiar with the AzDO parts of the infrastructure 👍 If the PR is too complex and warrants it, I can atleast split it into two; general .csproj consolidation & NuGet CPM (The SDK package upgrades can be split too). |
Per #324, please add |
Nice reorganization! Need to make sure none of the pipelines (e.g., garnet-internal-release) or GitHub Actions will be impacted, in case paths have changed. |
Can you see where the garnet/.azure/pipelines/azure-pipelines-internal-release.yml Lines 45 to 49 in df2a3c3
step is currently placing the built .dll s? Is it somehow ignoring the Directory.Build.props? Is it because it's been explicitly given to only build **/Garnet.*.csproj ?
|
Also I fear that the
So I'm interested how the pipeline worked in the first place 🤔 The .NET Cli step should have built the binaries respecting the |
The copy step never copied any files, but that did not prevent the run from succeeding. we did not get to removing that step yet, but that step can be ignored. the subsequent pack operated in the source path, i think. |
I was thinking about this more. The only pipeline that fails is the external pipeline so I am thinking it would just be easier \ better to merge this and then I will have a separate PR that adapts \ cleans up the ADO release pipeline. It would just be easier that way since @PaulusParssinen doesn't have access to running our ADO pipelines. |
Do you want me to close this PR or will your fixes be merged to this? Sounds good to me either way 👍 edit: Just adding here that I quickly tried to locally pack the NuGet using
This seems to work and not work as the |
Keep this PR as is and I will work on my private branch. After I figure things out, we can merge this and I can do a separate PR (or just add my changes to this PR). For now, don't do anything with this PR. Thanks. |
What error do you get? |
Possibly related: NuGet/Home#4254 Wrote about this earlier on Garnet Discord but here's error in CLI and MSBuild Log viewer: Essentially MSBuild is trying to pack them in parallel? But it still succeeds even if it errors 😄 If anyone is interested, does the error reproduce? |
Ok ... figured it out. Nuget.exe pack works for us and it is part of an ADO task that is "blessed" to use, so I think we should just stay with that. The fix to get this PR in is quite simple. You just need to update the Garnet.nuspec. Update the paths for each one from AnyCPU\Release to Release. For example "src="libs\server\bin\AnyCPU\Release\net6.0\Garnet.server.pdb" For extra credit ... :) In the file: "azure-pipelines-external-release.yml", the "Copy Files for Nuget package ..." task and the "$(BuildConfiguration)" setting in the pack task are not needed and can be remove. If you want to see what I did, check out my branch darrenge/consolidate-csproj |
Alright, awesome! Thanks for investigating on your end. So we are okay with removing the "Platform" i.e. edit: I think there isn't, trying that now 👍 |
I only modified the nupsec file and the azure-pipelines-external-release.yml file and it was based on your fork from yesterday, so I can't confirm any other changes will be ok. |
Also - this was the only pipeline that was failing on your PR. |
* Also align Garnet.nuspec
Can you now test if any of the AzDO pipelines fail for this? This change makes all the output paths be consistent and the NuGet.exe in the AzDO shouldn't be putting stuff into different path than local |
Looks good. Will merge once the checks are finished. |
There's still $(Platform) in the DocumentationFile path, and a couple of Tsavorite csprojs |
* GenerateDocumentationFile=True will place the .xml next to other build output correctly
Good catch! I removed the explicit paths so the xmldoc files are now placed automatically next to the build artifacts. I'll leave the potential AzDO touches that @darrenge described as follow-up as I don't have good view what actually happens there. |
Cool - once the CIs finish (assuming they pass), I will merge this PR. |
I am seeing this GitHub Action Docker Image for Linux is now failing. https://github.com/microsoft/garnet/actions/runs/8854384439 |
FYI ... Badrish and I worked out a fix for this in a separate PR - #335 |
Oh, completely forgot about Docker and thought that the Docker CI had already been run during the time this PR was under review.. my bad! Good job figuring it out, seems like it wasn't too complex this time fortunately 👍 |
This PR consolidates some common properties from the
.csproj
files to commonDirectory.Build.props
file. The build output directory is changed from formbin\$(Platform)\$(Configuration)\$(TFM)
to the dotnet CLI default, e.g.bin\AnyCPU\Release\net8.0\
tobin\Release\net8.0\
.This PR also changes all NuGet package versioning to use Central Package Management to allow easier management of 3rd party dependencies in
Directory.Packages.props
This PR also updated the
Microsoft.*
NuGet dependencies to match the latest SDK release batch that is8.0.0
There's still more consolidation possible, e.g. moving from .nuspec to new SDK style NuGet configuration and combining various properties under flags such as
IsTestProject
/IsPackable
etc. I'll leave that for future.