-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix build break by bumping DependencyModel package version #36285
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
Conversation
|
Tagging subscribers to this area: @ViktorHofer |
| "InboxOn": {}, | ||
| "AssemblyVersionInPackageVersion": { | ||
| "3.1.3.0": "5.0.0", | ||
| "3.1.4.0": "5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure about this one but I understand you didn’t do this manually so I’m ok with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did do this manually. 😄
The assembly version in DependencyModel got updated to 3.1.4.0, so I updated this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I do it automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not update this. This is meant to indicate the first package version an assembly version appeared in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the break in the build error should tell you the command you have to run in order to fix this automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually do use it to determine which package dependency version other packages will get if they depend on DependencyModel. For example: say you have a library B which depends on DependencyModel, and more specifically they depend on assembly version 3.1.4.0. Our package infrastructure will then come to this table, and check which package version is the one where that assembly version first appeared, (the table above actually looks incorrect as I would assume that it should have something like "3.1.4.0": "3.1.4") and then determine that package B should depend on at least DependencyModel package version 3.1.4. Assuming there is no BaselineVersion for DependencyModel (which in this case we do have one, but let's pretend we don't) then B would depend on 3.1.4 DependencyModel. In this case we do have a BaselineVersion, so even if our package infrastructure chooses package version 3.1.4 for the dependency, it will then baseline up to 5.0.0 because BaselineVersion > InitialChoosenPackageVersion.
Does that sort of make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I believe that the right contents of that dictionary for DependencyModel should look something like:
"AssemblyVersionInPackageVersion": {
"3.1.3.0": "3.1.3",
"3.1.4.0": "3.1.4",
"5.0.0.0": "5.0.0"
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are so far in the CI now, I want to wait for it to finish and merge this to unblock the build. I can put up another change for the above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with that as long as we take care of it 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
All configurations is green so I'll go ahead and merge to unblock other PR/CI builds. |
|
I'm seeing a very similar looking issue in my latest PR run: F:\workspace\_work\1\s\src\libraries\pkg\test\testPackages.proj(217,5): error : Validation Failed: Microsoft.Extensions.DependencyModel is harvesting assets from package version 3.1.3 which is not the latest for that package release. Latest package version from that release is 3.1.4. In order to fix this, run `dotnet msbuild Microsoft.Extensions.DependencyModel.pkgproj /t:UpdateHarvestVersionOnPackageIndex /p:UpdateStablePackageInfo=true` ##[error]src\libraries\pkg\test\testPackages.proj(217,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Validation Failed: Microsoft.Extensions.DependencyModel is harvesting assets from package version 3.1.3 which is not the latest for that package release. Latest package version from that release is 3.1.4. In order to fix this, run `dotnet msbuild Microsoft.Extensions.DependencyModel.pkgproj /t:UpdateHarvestVersionOnPackageIndex /p:UpdateStablePackageInfo=true` Build FAILED. Has it somehow regressed again or am I hitting an unrelated issue that just has similar manifestations? Thanks Tomas |
|
This symptom can only really be caused by one thing which is your local packageIndex.json is not up to date, but that shouldn’t happen unless you reverted the changes @eerhardt made or you are building an old branch that doesn’t have his change. |
|
From looking at the link you attached, looks like your PR was against a different branch, dev/infrastructure, so it is very possible that his change isn’t present on that branch. In order to fix this, just port his change over there which should fox the issue |
|
Ahh, of course you're right, thanks @joperezr for reminding me, it's been a while since I last worked in a feature branch and I completely forgot that. I guess I should follow up with @jashook though as I was under the impression that the |
|
Seeing something similar in #34948, as well as on one of the newest PR #37662 in repo as of now : |
Fixes build errors like the following:
See https://dev.azure.com/dnceng/public/_build/results?buildId=641411&view=logs&j=423ae147-26a3-5a4d-a4d3-4b3fc1dd598e&t=98a4dd5a-baea-5dc4-484b-ccbd315f07c8 for an example.