Skip to content
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

Paket 5.207.4 broke the FAKE release process and creates empty packages #3599

Closed
matthid opened this issue Jun 22, 2019 · 9 comments
Closed

Comments

@matthid
Copy link
Member

matthid commented Jun 22, 2019

Description

You can see how I managed to pin it to that particular Paket release: fsprojects/FAKE#2341

In fact, I cannot even reproduce this locally, this only seems to happen in CI and in particular only Azure DevOps and sometimes in GitLab, but only Azure DevOps reproduces 100%

The diff is quite small and only a single PR was involved: 5.207.3...5.207.4

/cc @enricosada

What's really bad is that the packaging process works but creates corrupt packages. The release process did catch the issue, because we bootstrap some of the packages.

You can download and inspect the packages from the build: https://dev.azure.com/fakebuild/FSProjects/_build/results?buildId=1123&view=results

image

I tried to figure out what the problem is as only a single line changed, for example with this commit, but I couldn't figure it out.

So I boiled it down to a single line change in the targets file but I have no clue why or how it leads to broken packages.

Repro steps

Update to 5.207.4 (or newer), see this commit

Expected behavior

Release process should work as it did before

Actual behavior

Paket-change leads to broken packages, which might be detected only after the package has been released without proper validation.

Known workarounds

  • Stay on 5.207.3 or lower
  • Use previous targets file (and force paket to use it, by not calling paket restore or by checking out the old targets afterwards)
@matthid
Copy link
Member Author

matthid commented Jun 22, 2019

It seems like the change leads to paket fix-nuspec not being called anymore in the dotnet pack Fake.sln command

@matthid
Copy link
Member Author

matthid commented Jun 22, 2019

Oh my god I figured it out, it took a bit longer because paket was restoring the targets file within the process so all my attempts to add logging failed miserably.

I added the following warning message:
<Warning Text='TEST: OutputPath: $(AdjustedNuspecOutputPath), All: "@(MyPaketNuspecFiles)", Version: "$(PackageVersion)", Command: $(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' />

This is the result:

TEST: OutputPath: obj\Release, All: "obj\Release\Fake.Api.Slack.5.15.1-alpha.1129.nuspec", Version: "5.15.1-alpha.1129 vsts.2fdb5b21981edf02be1fe6bf2b748197d9ead56d", Command: "d:\a\1\s\.paket\paket.exe" fix-nuspecs files "" project-file "d:\a\1\s\src\app\Fake.Api.Slack/Fake.Api.Slack.fsproj"

So the problem is that PackageVersion includes the Semver "Build metadata" while the file doesn't...

@enricosada Any idea how to fix? Is there another msbuild variable we could use?

@matthid
Copy link
Member Author

matthid commented Jun 22, 2019

I think we need at least:

  • Error out if we cannot found a nuspec at all
  • Fix the issue at hand and add a test ...

@forki
Copy link
Member

forki commented Jun 23, 2019 via email

@matthid
Copy link
Member Author

matthid commented Jun 23, 2019

@forki I'd like to but I don't know how to fix, the only thing that probably works is reverting that PR :/

@forki
Copy link
Member

forki commented Jun 23, 2019

Ok. Please send me a pr with the revert and then we need to talk to @enricosada to find a new approach

@forki
Copy link
Member

forki commented Jun 23, 2019

Or never mind. I'll do the revert myself

@matthid
Copy link
Member Author

matthid commented Jun 23, 2019

Give me a bit, I might find another solution

@matthid
Copy link
Member Author

matthid commented Jun 23, 2019

See #3600, it is a bit of a hack so we probably should let the CI test it

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

No branches or pull requests

2 participants