Skip to content

Add CLI to known-good #418

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 9 commits into from
Apr 16, 2018
Merged

Add CLI to known-good #418

merged 9 commits into from
Apr 16, 2018

Conversation

dagood
Copy link
Member

@dagood dagood commented Apr 11, 2018

No description provided.

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

NuGet.Protocol 4.7.0-preview3.4324 depends on NuGet.Configuration (>= 4.7.0-preview3.4324) but NuGet.Configuration 4.7.0-preview3.4324 was not found. An approximate best match of NuGet.Configuration 4.7.0-preview3.5032 was resolved.
Detected package downgrade: NuGet.Common from 4.7.0-preview4.5065 to 4.7.0-preview3.4324. Reference the package directly from the project to select a different version. \n dotnet -> Microsoft.DotNet.Configurer -> NuGet.Configuration 4.7.0-preview4.5065 -> NuGet.Common (>= 4.7.0-preview4.5065) \n dotnet -> Microsoft.DotNet.Configurer -> NuGet.Common (>= 4.7.0-preview3.4324)
Detected package downgrade: NuGet.Frameworks from 4.7.0-preview3.5032 to 4.7.0-preview3.4324. Reference the package directly from the project to select a different version. \n dotnet -> Microsoft.DotNet.Cli.Utils -> NuGet.ProjectModel 4.7.0-preview3.4324 -> NuGet.DependencyResolver.Core 4.7.0-preview3.4324 -> NuGet.Protocol 4.7.0-preview3.4324 -> NuGet.Configuration 4.7.0-preview3.5032 -> NuGet.Common 4.7.0-preview3.5032 -> NuGet.Frameworks (>= 4.7.0-preview3.5032) \n dotnet -> Microsoft.DotNet.Cli.Utils -> NuGet.Frameworks (>= 4.7.0-preview3.4324)

NuGet.Configuration isn't in the blob feed, which would explain all these. Either it wasn't built, or it isn't copied to the blob feed correctly. Looking into it.

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

Enabling the NuGet.Configuration package build worked, next up:

Detected package downgrade: System.Collections.Immutable from 1.5.0-preview2-26401-03 to 1.3.1. Reference the package directly from the project to select a different version.
tool_fsc -> Microsoft.FSharp.Compiler 10.1.1-rc-171107-0 -> Microsoft.DiaSymReader.PortablePdb 1.5.0-dev -> System.Collections.Immutable (>= 1.5.0-preview2-26401-03)
tool_fsc -> Microsoft.FSharp.Compiler 10.1.1-rc-171107-0 -> System.Collections.Immutable (>= 1.3.1)

Detected package downgrade: System.Reflection.Metadata from 1.6.0-preview2-26401-03 to 1.4.2. Reference the package directly from the project to select a different version.
tool_fsc -> Microsoft.FSharp.Compiler 10.1.1-rc-171107-0 -> Microsoft.DiaSymReader.PortablePdb 1.5.0-dev -> System.Reflection.Metadata (>= 1.6.0-preview2-26401-03)
tool_fsc -> Microsoft.FSharp.Compiler 10.1.1-rc-171107-0 -> System.Reflection.Metadata (>= 1.4.2)

I'm going to try adding a package reference in CLI to force the source-built versions to be used.
@dseefeld can you look at why it looks like fsharp didn't uptake System.Reflection.Metadata and System.Collections.Immutable?

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

Looking again, that's an internet version, not source-built--I think these packages aren't being produced by CoreFX when they should be.

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

Wes pointed me to #210, which tracks adding the type of CoreFX build that produces those packages. (Apparently not trivial.)

Tomas pointed me to some commits I can revert to bring symreader and symreader-portable back to depending on 1.3.1 and 1.4.2, so the mismatch will go away. I'm going to add patches to revert: dotnet/symreader@ac20b8b dotnet/symreader-portable@58d468a

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

Info on the MSBuild fix this PR needed: the source-built Microsoft.Build.Runtime package didn't mark the included contentFiles/any/netcoreapp2.0/* as Content, so they were being passed to CSC as Compile. Building MSBuild.dll fails because it's not text, and the MSBuild xml files cause even more errors after that. The fix marks these properly as Content in the package.

@dagood
Copy link
Member Author

dagood commented Apr 12, 2018

The last commit has successful first-stage CI legs, but @dseefeld locally saw the tarball fail in MSBuild because I had the MSBuild commit change without the repos/msbuild.proj change. Added that to this PR temporarily. (I expect to rebase on dev/release/2.1 at some point after the MSBuild fix is merged.)

(I forgot to change the fork back to Microsoft/MSBuild as part of my last commit, which would match the PR better: #410. The MSBuild commits are identical, though.)

@dagood
Copy link
Member Author

dagood commented Apr 13, 2018

@dotnet-bot test ci please
Offline tarball build regularly hits the 2-hour timeout, doubling it.

https://ci.dot.net/job/dotnet_source-build/job/dev_release_2.1/job/GenPRTest/job/RHEL7.2_Unshared_Release_prtest/1/

@mmitche
Copy link
Member

mmitche commented Apr 13, 2018

@dotnet-bot test ci please
@dotnet-bot test this please

dagood added 7 commits April 13, 2018 11:40
Fix cli/run-build.sh's argsnotargets.

Fix CLI's NuGet.Config generation with source-build directory inputs.

Disable crossgen until we figure out the dll load error.

Disable bundled tools until we figure out the best solution for dotnet-dev-certs, dotnet-ef, etc.

Use existing GitInfo* properties if provided.
@dagood dagood changed the title (WIP) Add CLI to known-good Add CLI to known-good Apr 13, 2018

if [ $BUILD -eq 1 ]; then
- (set -x; dotnet msbuild build.proj /bl:msbuild.generatepropsfile.binlog /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles $argsnotargets)
+ (set -x; dotnet msbuild build.proj /bl:msbuild.generatepropsfile.binlog /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles ${argsnotargets[@]})
Copy link

@peterhuene peterhuene Apr 13, 2018

Choose a reason for hiding this comment

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

I'm going to guess the intention of using $argsnotargets here is to pass the entire array through.

Perhaps this is meant to be $(IFS=' '; echo "${argsnotargets[*]}")?

@johnbeisner is that right? This is a patch in source-build that we'll eventually take into CLI, so I'd like to get it right.

Copy link
Member Author

Choose a reason for hiding this comment

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

That would make sense to me. I borrowed the syntax I used from for arg in ${args[@]}. (That for loop strongly indicates to me that all the non-targets args are meant to be passed, but this usage was bugged.)

@@ -0,0 +1,100 @@
From cd96ec40e18bf5cdce6cb3aad8b699051da7bf34 Mon Sep 17 00:00:00 2001
Copy link

@peterhuene peterhuene Apr 13, 2018

Choose a reason for hiding this comment

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

I think we should also patch this:

        private bool ShouldGenerateAspNetCertificate()
        {
#if DOTNET_BUILD_FROM_SOURCE
            return false;
#else
            var generateAspNetCertificate =
                _environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", true);

            return ShouldRunFirstRunExperience() &&
                generateAspNetCertificate &&
                !_aspNetCertificateSentinel.Exists();
#endif
        }

to prevent the first run experience from telling users a certificate was created when one wasn't.

Copy link
Member Author

Choose a reason for hiding this comment

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

Filed #434 to get this in.

@peterhuene
Copy link

Over than the additional patch, I think this looks good. Looking over the CLI patches, I think I should be able to get those all in upstream.

standardJobSetup sets the 120-minute default that we need to override.
@dagood
Copy link
Member Author

dagood commented Apr 13, 2018

I queued this unshared RHEL with the extended timeout: https://ci.dot.net/job/dotnet_source-build/job/dev_release_2.1/job/GenPRTest/job/RHEL7.2_Unshared_Release_prtest/6/. (Expect the automatically triggered one to fail due to timeout.)

@dagood
Copy link
Member Author

dagood commented Apr 13, 2018

OSX failed to "download" a local file:

Target "DownloadHostAndSharedFxArtifacts" in file "/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/build/Prepare.targets" from project "/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/build.proj" (target "Prepare" depends on it):
Set Property: OverwriteExtractionDestination=
Set Property: OverwriteExtractionDestination=True
Using "DownloadFile" task from assembly "/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll".
Task "DownloadFile"
  Task Parameter:Uri=file:///Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/bin/obj/x64/Release/blobs/Runtime/2.1.0-preview2-26411-0/dotnet-runtime-2.1.0-preview2-26411-0-osx-x64.tar.gz
  Task Parameter:DestinationPath=/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/bin/2/osx-x64/intermediate/coreSetupDownload/2.1.0-preview2-26411-0/combinedSharedHostAndFrameworkArchive.tar.gz
  Copying '/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/bin/obj/x64/Release/blobs/Runtime/2.1.0-preview2-26411-0/dotnet-runtime-2.1.0-preview2-26411-0-osx-x64.tar.gz' to '/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/bin/2/osx-x64/intermediate/coreSetupDownload/2.1.0-preview2-26411-0/combinedSharedHostAndFrameworkArchive.tar.gz'

/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/build/Prepare.targets(43,5): error MSB4018: The "DownloadFile" task failed unexpectedly. [/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/src/cli/build.proj] [/Users/dotnet-bot/j/workspace/dotnet_source-build/dev_release_2.1/OSX10.12_Release_prtest/repos/cli.proj]

Building locally for repro. My first thought is that the filename Core-Setup produced could be wrong.


Fixed with next commit, see #438.

This makes the Core-Setup filename match what CLI expects.
@dagood
Copy link
Member Author

dagood commented Apr 15, 2018

Filed https://github.com/dotnet/core-eng/issues/3291 for the CI infra failures on the legs that use Ubuntu.

@dagood
Copy link
Member Author

dagood commented Apr 16, 2018

@dotnet-bot
test RHEL7.2 Unshared Release
test Ubuntu16.04 Release
(In case we get lucky with the choice of machines. (Looks like we did.))

@dagood
Copy link
Member Author

dagood commented Apr 16, 2018

Merging: RHEL7.2 leg is expected to time out, and with everything else green it seems unlikely the OSX change broke it since I tested with the extended timeout on the previous commit.

@dagood dagood merged commit b964970 into dotnet:dev/release/2.1 Apr 16, 2018
@dseefeld dseefeld mentioned this pull request Apr 16, 2018
26 tasks
@dagood dagood deleted the add-cli branch May 4, 2018 15:25
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