Skip to content

address build version issue and enhance logging #5268

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

Merged
merged 3 commits into from
Jun 30, 2020

Conversation

frank-dong-ms-zz
Copy link
Contributor

@frank-dong-ms-zz frank-dong-ms-zz commented Jun 30, 2020

part of issue #5266

  1. address issue "error CS7035: The specified version string does not conform to the recommended format - major.minor.build.revision", one build definition sample of similar issue: https://dev.azure.com/dnceng/public/_build/results?buildId=656357&view=logs&j=28859320-f5de-51e0-1fd2-7bea8c11cf7a&t=ed8fb6c3-76d9-56ef-25a2-06e3456edf43

This issue looks like a bug in msbuild versioning. This only happens when the build is crossing 2 days as msbuild versioning is generating versioning file each day so when some project starts to build when the system time is crossing to new day, seems msbuild versioning can't handle this case and read empty BuildNumberMajor and BuildNumberMinor sometimes which cause the assembly version number to be a invalid format.

I can repro this issue by set system time to a time very close to midnight, say 11:58 PM then start build from cmd, there is pretty good chance to repro the build version issue. Since we don't have a way to upgrade build tools now I will use default value of BuildNumberMajor and BuildNumberMinor to mitigate this issue.

  1. enhance logging

@frank-dong-ms-zz frank-dong-ms-zz requested a review from a team as a code owner June 30, 2020 06:08
@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #5268 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5268      +/-   ##
==========================================
+ Coverage   73.56%   73.64%   +0.08%     
==========================================
  Files        1022     1022              
  Lines      189690   189690              
  Branches    20441    20441              
==========================================
+ Hits       139539   139698     +159     
+ Misses      44611    44473     -138     
+ Partials     5540     5519      -21     
Flag Coverage Δ
#Debug 73.64% <100.00%> (+0.08%) ⬆️
#production 69.46% <100.00%> (+0.10%) ⬆️
#test 87.51% <ø> (ø)
Impacted Files Coverage Δ
...soft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs 89.45% <100.00%> (ø)
src/Microsoft.ML.Maml/MAML.cs 23.78% <0.00%> (-0.98%) ⬇️
src/Microsoft.ML.Data/Utils/LossFunctions.cs 67.35% <0.00%> (+0.51%) ⬆️
src/Microsoft.ML.AutoML/Sweepers/Parameters.cs 85.16% <0.00%> (+0.84%) ⬆️
...oft.ML.StandardTrainers/Standard/SdcaMulticlass.cs 92.49% <0.00%> (+1.02%) ⬆️
...soft.ML.Transforms/Text/WordEmbeddingsExtractor.cs 86.87% <0.00%> (+1.13%) ⬆️
...crosoft.ML.StandardTrainers/Optimizer/Optimizer.cs 73.12% <0.00%> (+1.15%) ⬆️
src/Microsoft.ML.Sweeper/AsyncSweeper.cs 72.60% <0.00%> (+1.36%) ⬆️
...rosoft.ML.AutoML/ColumnInference/TextFileSample.cs 62.25% <0.00%> (+2.64%) ⬆️
...crosoft.ML.StandardTrainers/Standard/SdcaBinary.cs 88.48% <0.00%> (+3.24%) ⬆️
... and 4 more

@@ -66,6 +66,8 @@
<!-- Version properties -->
<PropertyGroup>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor>
<BuildNumberMinor Condition="'$(BuildNumberMinor)' == ''">0</BuildNumberMinor>
Copy link
Contributor

@harishsk harishsk Jun 30, 2020

Choose a reason for hiding this comment

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

Just curious. Is there a restriction on the format for BuildNumberMajor that it has to have the four leading zeros? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BuildNumberMajor is 5 digit number like 29008 so set default BuildNumberMajor as 00001


In reply to: 447871778 [](ancestors = 447871778)

Copy link
Contributor

@harishsk harishsk left a comment

Choose a reason for hiding this comment

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

:shipit:

@frank-dong-ms-zz frank-dong-ms-zz merged commit 1611f55 into dotnet:master Jun 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants