fsprojects / FAKE

FAKE - F# Make
https://fake.build
Other
1.28k stars 585 forks source link

Missing github release for 6.1.0 #2800

Closed NogginBops closed 1 week ago

NogginBops commented 1 month ago

Description

The 6.1.0 nuget package has been released without a matching GitHub release tag.

This should probably be fixed, and even if the 6.1.0 nuget package is accidental a matching tag should probably be established anyway.

xperiandri commented 1 month ago

@NogginBops I know Pipeline crashes so it had not completed altogether. I thought ignore_push https://github.com/fsprojects/FAKE/blob/b5856057257c5a5dab38cc0f7875f58442af513e/build.fsx#L480 is --skip-duplicate in dotnet nuget push But it did not work the same.

So now I have 2 release pipelines crashed:

  1. Pushed NuGet but stop on docs publishing
  2. Did not skip pushing a duplicate

If you can help I'll appreciate

xperiandri commented 1 month ago

The other question is will the first release pipeline pick up the changes pushed to main if rerun?

NogginBops commented 1 month ago

I'm not very familiar with the github actions setup in this repo, my guess is that the best course of action is probably to manually add the GitHub release to match the nuget release. Then fixing/understanding the action and the failure can be understood and a new potentially fixed nuget package can be released (and the old nuget package can be unlisted or deprecated if necessary.)

I could potentially look into the GitHub actions tomorrow and see if I can make sense of anything enough to be helpful.

xperiandri commented 1 month ago

No new package needs to be release. Just fix skipping pushing the same version of the package

xperiandri commented 3 weeks ago

So we fixed skipping NuGet now we have issue with authectication to publish docs. @NogginBops can you help? https://github.com/fsprojects/FAKE/actions/runs/10377079510/job/28730466949#step:10:576

Numpsy commented 3 weeks ago

Is it worth trying to publish the docs with a specific github action rather than doing it manually in the fsx script? e.g. https://github.com/fsprojects/fantomas/blob/a4788cbdf856ae6f47b6032f7cb8ecb506ad7733/.github/workflows/main.yml#L39

xperiandri commented 3 weeks ago

I would prefer fixing the pipeline

Numpsy commented 3 weeks ago

Ok, the github pages part has worked now, but it's failed at the next step with

Something failed, trying again: System.MissingMethodException: Method not found: 'Int32 Octokit.Release.get_Id()'.
   at Fake.Api.GitHub.createRelease@235-2.Invoke(Release release)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 528
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112

instead :-(

Numpsy commented 3 weeks ago

Not sure if this is it, but it looks like the Release.Id property was changed from an int to a long in https://github.com/octokit/octokit.net/pull/2941

xperiandri commented 3 weeks ago

Approved PR, waiting for build to complete

Numpsy commented 3 weeks ago

And now it seems to have failed because the previous run successfully pushed a build to Chocolately, and you can't do that twice for the same version :-(

xperiandri commented 3 weeks ago

Skip needed again 😄

Numpsy commented 3 weeks ago

I don't an 'ignore duplicates' type option in the choco push docs at https://docs.chocolatey.org/en-us/create/commands/push/ (I've never pushed anything into chocolately myself)

xperiandri commented 3 weeks ago

For NuGet it just wraps code in try-with. And if skip flag, then ignore exception

xperiandri commented 2 weeks ago

I hope it is the last piece to fix release pipeline

Numpsy commented 2 weeks ago

I can try something like https://github.com/Numpsy/FAKE/commit/07ac9879a6b6354b68bc2a2064f8f17cbae74e5b which might avoid the immediate failure, but the choco docs only list processes exit codes of 0/1 so I don't know how to determine if the error was a conflict or not other than trying to look at the An error has occurred. This package version already exists on the repository and cannot be modified. console output (which I don't think is directly available at this point in the script

Numpsy commented 2 weeks ago

I hope it is the last piece to fix release pipeline

Looks like the latest attempt has failed because it tried to create a 6.1.0 git tag, and one already exists :-(

xperiandri commented 2 weeks ago

Something new now

Numpsy commented 2 weeks ago

Hmm, that's back to what #2808 was intended to fix (The release id is a long instead of Int32 now, and something seems to be getting confused somewhere)

Numpsy commented 2 weeks ago

Could it be that build.fsx is downloading the latest version of Octokit (13), and calling it via the old release of Fake.Api.GitHub rather than the version currently being built (and then the mismatch upsets things)?

Numpsy commented 2 weeks ago

Hurrah, finally a successful release build, and the 6.1.0 release is listed now

xperiandri commented 1 week ago

Yahoo! 🎉🎉🎉 @Numpsy @Thorium do you want 6.1.1 release with what's already merged?

Thorium commented 1 week ago

I would prefer 6.1.1 asap because it would unblock some net8 migration issues. I don't really care "should we include one more PR or not", as the currently merged PRs already solve the issues (as I tested merged version directly locally).

Numpsy commented 1 week ago

Might be useful to do a quick release to fix #2803 if people are trying to use it with the .NET 9 previews and that helps to get that tested

xperiandri commented 1 week ago

Released