SQLStreamStore / SQLStreamStore.Docker

MIT License
9 stars 5 forks source link

Cannot build when following the development instructions #44

Closed adamralph closed 5 years ago

adamralph commented 5 years ago
  • ./build.sh or ./build.cmd to run the complete dockerized build.

This fails:

output ``` C:\code\.downstream\SQLStreamStore.HAL>docker build . Sending build context to Docker daemon 1.37MB Step 1/26 : FROM microsoft/dotnet:2.1.500-sdk-alpine3.7 AS build ---> 4d4ac1c1c5f3 Step 2/26 : ARG MYGET_API_KEY ---> Running in 7a8b3af2c97c Removing intermediate container 7a8b3af2c97c ---> 178bccc0f5e2 Step 3/26 : WORKDIR /app ---> Running in 7c50e1ba317c Removing intermediate container 7c50e1ba317c ---> b630582e1f0b Step 4/26 : COPY .git ./ ---> a1c5a8c8705e Step 5/26 : RUN apk add --no-cache nodejs yarn libcurl && dotnet tool install -g minver-cli --version 1.0.0-alpha.15 && /root/.dotnet/tools/minver > .version ---> Running in b966f3b292a4 fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz (1/8) Installing libssh2 (1.8.0-r2) (2/8) Installing libcurl (7.61.1-r1) (3/8) Installing nodejs-npm (8.9.3-r1) (4/8) Installing c-ares (1.13.0-r0) (5/8) Installing http-parser (2.7.1-r1) (6/8) Installing libuv (1.17.0-r0) (7/8) Installing nodejs (8.9.3-r1) (8/8) Installing yarn (1.3.2-r0) Executing busybox-1.27.2-r11.trigger OK: 101 MiB in 36 packages Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable. If you are using bash, you can add it to your profile by running the following command: cat << \EOF >> ~/.bash_profile # Add .NET Core SDK tools export PATH="$PATH:/root/.dotnet/tools" EOF You can add it to the current session by running the following command: export PATH="$PATH:/root/.dotnet/tools" You can invoke the tool using the following command: minver Tool 'minver-cli' (version '1.0.0-alpha.15') was successfully installed. MinVer: Using { Commit: b59e533, Tag: '1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 12 }. Removing intermediate container b966f3b292a4 ---> f15030cb02ac Step 6/26 : WORKDIR /app/src ---> Running in 0e77f54f9fc3 Removing intermediate container 0e77f54f9fc3 ---> cd044f20df66 Step 7/26 : COPY ./src/*.sln ./ ---> 0b0bf2b240ef Step 8/26 : COPY ./src/*/*.csproj ./ ---> 64e89d273473 Step 9/26 : RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done ---> Running in ed0b8a596039 Removing intermediate container ed0b8a596039 ---> 571c8f649110 Step 10/26 : COPY ./NuGet.Config ./ ---> 2525110e6f97 Step 11/26 : RUN dotnet restore --runtime=alpine.3.7-x64 ---> Running in 9e222fb70f1c Restoring packages for /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj... Restoring packages for /app/src/LittleHalHost.Example/LittleHalHost.Example.csproj... Installing System.Runtime.CompilerServices.Unsafe 4.4.0. Installing Microsoft.AspNetCore.Http.Features 2.0.0. Installing System.Text.Encodings.Web 4.4.0. Installing Microsoft.Extensions.Primitives 2.0.0. Installing Microsoft.AspNetCore.Connections.Abstractions 2.1.3. Installing System.Collections.NonGeneric 4.0.1. Installing Microsoft.AspNetCore.Hosting.Server.Abstractions 2.0.0. Installing Microsoft.AspNetCore.Http.Abstractions 2.0.0. Installing Microsoft.Extensions.Configuration.Abstractions 2.0.0. Installing Microsoft.Extensions.FileProviders.Abstractions 2.0.0. Installing Microsoft.Extensions.Hosting.Abstractions 2.0.0. Installing Microsoft.Extensions.Options 2.0.0. Installing Microsoft.Extensions.Logging.Abstractions 2.0.0. Installing Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0. Installing Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions 2.1.3. Installing Tavis.UriTemplates 1.1.0. Installing System.IO.Pipelines 4.5.1. Installing Microsoft.AspNetCore.Server.Kestrel 2.1.3. Installing Serilog.Sinks.Console 3.1.1. Installing Serilog.AspNetCore 2.1.1. Installing Halcyon 2.5.1. Installing SqlStreamStore 1.2.0-beta.1.3. Installing Microsoft.AspNetCore.Server.Kestrel.Https 2.1.3. Installing Microsoft.AspNetCore.Server.Kestrel.Core 2.1.3. Installing Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets 2.1.3. Installing Serilog.Extensions.Logging 2.0.0. Installing Microsoft.Extensions.DependencyInjection 2.0.0. Installing Microsoft.Extensions.Logging 2.0.0. Installing Microsoft.AspNetCore.Hosting.Abstractions 2.0.0. Installing Serilog 2.5.0. Installing Microsoft.NETCore.DotNetAppHost 2.1.6. Installing System.Threading.Tasks.Extensions 4.5.0. Installing Microsoft.NETCore.DotNetHostResolver 2.1.6. Installing Npgsql 4.0.2. Installing Microsoft.NETCore.DotNetHostPolicy 2.1.6. Installing Microsoft.NETCore.Targets 2.0.0. Installing Microsoft.NETCore.App 2.1.6. Installing SqlStreamStore.MsSql 1.2.0-build00255. Installing Microsoft.NETCore.Platforms 2.1.2. Installing SqlStreamStore.Postgres 1.2.0-build00255. Installing ILLink.Tasks 0.1.5-preview-1841731. Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost 2.1.0. Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver 2.1.0. Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy 2.1.0. Installing runtime.linux-musl-x64.Microsoft.NETCore.App 2.1.0. Generating MSBuild file /app/src/LittleHalHost.Example/obj/LittleHalHost.Example.csproj.nuget.g.props. Generating MSBuild file /app/src/LittleHalHost.Example/obj/LittleHalHost.Example.csproj.nuget.g.targets. Restore completed in 7.09 sec for /app/src/LittleHalHost.Example/LittleHalHost.Example.csproj. Restoring packages for /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj... Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost 2.1.6. Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver 2.1.6. Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy 2.1.6. Installing runtime.linux-musl-x64.Microsoft.NETCore.App 2.1.6. /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102: Unable to find package SqlStreamStore with version (>= 1.2.0-build00255) [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102: - Found 26 version(s) in nuget.org [ Nearest version: 1.1.3 ] [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102: - Found 3 version(s) in sql-stream-store [ Nearest version: 1.2.0-beta.1.3 ] [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102: - Found 0 version(s) in dotnet-core [/app/src/SqlStreamStore.HAL.sln] Generating MSBuild file /app/src/SqlStreamStore.HAL.ApplicationServer/obj/SqlStreamStore.HAL.ApplicationServer.csproj.nuget.g.props. Generating MSBuild file /app/src/SqlStreamStore.HAL.ApplicationServer/obj/SqlStreamStore.HAL.ApplicationServer.csproj.nuget.g.targets. Restore failed in 13.98 sec for /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj. Restoring packages for /app/src/SqlStreamStore.HAL.Tests/SqlStreamStore.HAL.Tests.csproj... /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102: Unable to find package SqlStreamStore with version (>= 1.2.0-build00255) [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102: - Found 26 version(s) in nuget.org [ Nearest version: 1.1.3 ] [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102: - Found 3 version(s) in sql-stream-store [ Nearest version: 1.2.0-beta.1.3 ] [/app/src/SqlStreamStore.HAL.sln] /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102: - Found 0 version(s) in dotnet-core [/app/src/SqlStreamStore.HAL.sln] Generating MSBuild file /app/src/SqlStreamStore.HAL.DevServer/obj/SqlStreamStore.HAL.DevServer.csproj.nuget.g.props. Generating MSBuild file /app/src/SqlStreamStore.HAL.DevServer/obj/SqlStreamStore.HAL.DevServer.csproj.nuget.g.targets. Restore failed in 11.23 sec for /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj. Restoring packages for /app/src/SqlStreamStore.HAL/SqlStreamStore.HAL.csproj... Installing System.Buffers 4.4.0. Installing System.Numerics.Vectors 4.4.0. Installing Microsoft.CSharp 4.4.0. Installing LibLog 5.0.2. Generating MSBuild file /app/src/SqlStreamStore.HAL/obj/SqlStreamStore.HAL.csproj.nuget.g.props. Generating MSBuild file /app/src/SqlStreamStore.HAL/obj/SqlStreamStore.HAL.csproj.nuget.g.targets. Restore completed in 1.69 sec for /app/src/SqlStreamStore.HAL/SqlStreamStore.HAL.csproj. Installing Microsoft.Win32.Registry 4.0.0. Installing System.Threading.ThreadPool 4.0.10. Installing System.Collections.Immutable 1.2.0. Installing System.ComponentModel.Primitives 4.1.0. Installing System.ComponentModel 4.0.1. Installing System.Collections.Specialized 4.0.1. Installing System.Xml.XPath 4.0.1. Installing System.Diagnostics.Process 4.1.0. Installing System.Reflection.Metadata 1.3.0. Installing System.Diagnostics.TraceSource 4.0.0. Installing System.ComponentModel.TypeConverter 4.1.0. Installing System.Threading.Thread 4.0.0. Installing System.Diagnostics.TextWriterTraceListener 4.0.0. Installing System.Runtime.Loader 4.0.0. Installing System.Xml.XPath.XmlDocument 4.0.1. Installing System.ComponentModel.EventBasedAsync 4.0.11. Installing xunit.runner.visualstudio 2.4.0. Installing Microsoft.DotNet.PlatformAbstractions 1.0.3. Installing Microsoft.AspNetCore.TestHost 2.1.1. Installing Shouldly 3.0.0. Installing xunit 2.4.0. Installing Microsoft.NET.Test.Sdk 15.8.0. Installing xunit.abstractions 2.0.2. Installing xunit.analyzers 0.10.0. Installing xunit.assert 2.4.0. Installing xunit.core 2.4.0. Installing Microsoft.CodeCoverage 15.8.0. Installing Microsoft.TestPlatform.TestHost 15.8.0. Installing xunit.extensibility.execution 2.4.0. Installing xunit.extensibility.core 2.4.0. Installing Microsoft.Extensions.DependencyModel 1.0.3. Installing Microsoft.TestPlatform.ObjectModel 15.8.0. Generating MSBuild file /app/src/SqlStreamStore.HAL.Tests/obj/SqlStreamStore.HAL.Tests.csproj.nuget.g.props. Generating MSBuild file /app/src/SqlStreamStore.HAL.Tests/obj/SqlStreamStore.HAL.Tests.csproj.nuget.g.targets. Restore completed in 17.31 sec for /app/src/SqlStreamStore.HAL.Tests/SqlStreamStore.HAL.Tests.csproj. The command '/bin/sh -c dotnet restore --runtime=alpine.3.7-x64' returned a non-zero code: 1 ```

  • dotnet run --project build/build.csproj to build without using docker.

This also fails, but I guess it's just a case of stating the prerequisites somewhere:

output ``` Bullseye: Starting... (default) (parallel) Bullseye/Clean: Starting... Bullseye/Init: Starting... Bullseye/Clean: Succeeded. (7.53 ms) Working directory: ./docs cmd /c yarn 'yarn' is not recognized as an internal or external command, operable program or batch file. Bullseye/Init: Failed! The process exited with code 1. (28.5 ms) Bullseye: Failed! (default) (parallel) (54.5 ms) Unhandled Exception: System.Exception: The process exited with code 1. at SimpleExec.ProcessExtensions.Throw(Process process) in C:\projects\simple-exec\SimpleExec\ProcessExtensions.cs:line 36 at SimpleExec.Command.Run(String name, String args, String workingDirectory, Boolean noEcho) in C:\projects\simple-exec\SimpleExec\Command.cs:line 17 at Program.Yarn(String workingDirectory, String args) in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 132 at Program.<>c.<.cctor>b__14_0() in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 73 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at Bullseye.Internal.ActionTarget.RunAsync(Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\ActionTarget.cs:line 25 at Bullseye.Internal.ActionTarget.RunAsync(Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\ActionTarget.cs:line 31 at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 83 at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70 at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70 at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70 at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70 at Bullseye.Internal.TargetCollection.RunAsync(List`1 names, Boolean skipDependencies, Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 34 at Bullseye.Internal.TargetCollection.RunAsync(List`1 names, Boolean skipDependencies, Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 47 at Bullseye.Internal.TargetCollectionExtensions.RunAsync(TargetCollection targets, List`1 args, IConsole console) in C:\projects\bullseye\Bullseye\Internal\TargetCollectionExtensions.cs:line 171 at Bullseye.Targets.RunTargets(IEnumerable`1 args) in C:\projects\bullseye\Bullseye\Targets.Sync.cs:line 26 at Program.Main(String[] args) in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 70 ```
yreynhout commented 5 years ago
  1. Looks like a missing myget configuration or reference to a package that is not pinned / no longer available on myget.

  2. Looks like yarn needs to be pulled down. Probably the build script should pull down node / npm / yarn if not found on path - or at least tell you to do so.

thefringeninja commented 5 years ago

I believe this happened when @damianh delisted several packages after migrating to minver. This should have been fixed by #45.

adamralph commented 5 years ago

Yep, build.cmd now works. I think the only thing left to do here is list the pre-requisites for the dotnet run method.

thefringeninja commented 5 years ago

Cool. I'll send a PR to enhance the readme when I get home

On Sat, Dec 15, 2018, 16:45 Adam Ralph <notifications@github.com wrote:

Yep, build.cmd now works. I think the only thing left to do here is list the pre-requisites for the dotnet run method.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SQLStreamStore/SQLStreamStore.HAL/issues/44#issuecomment-447577413, or mute the thread https://github.com/notifications/unsubscribe-auth/AAePh8n3s1IrqE2vahj6G-FE6T5nihu4ks5u5RjzgaJpZM4ZKEpp .

damianh commented 5 years ago

Because of the circular-ish dependency between the SSS.Http and this HAL lib I am considering folding this repo into the main one and mono-release the lot from there. It's either that or I split up the main repo into many small ones and have the acceptance test suite as a library / submodule. Overhead & maintenance wise I think I'd prefer the single repo.

Thoughts?

thefringeninja commented 5 years ago

I'm also annoyed with the circular dependency. One alternative is to have the http tests use a container like everything else. In fact I've started that work already here. Gave up on it for a bit as all the tests are now failing and I have no idea why :\

The advantages of a mono repo are clear, but there are some disadvantages as well. Unless there are breaking API changes, the HAL server and the SSS libs are not going to change at the same rate.

damianh commented 5 years ago

Yeah there is definitely a trade off. The mssql & postgres impl and SSS core API won't change at the same time either. Life is just easier with mono-repo publishing and... I think people will generally update all package refs at the same time. Maybe when things get really settled then independent shipping of libs could be a thing...