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

Fake.Api.GitHub not compatible with newest Octokit 0.50? #2601

Closed
MiloszKrajewski opened this issue Aug 13, 2021 · 2 comments
Closed

Fake.Api.GitHub not compatible with newest Octokit 0.50? #2601

MiloszKrajewski opened this issue Aug 13, 2021 · 2 comments

Comments

@MiloszKrajewski
Copy link
Contributor

MiloszKrajewski commented Aug 13, 2021

Description

After deleting build.fsx.lock (was so old it was not handling new MSBuild logs) and allowing FAKE to recreate it - uploading build artifacts to GitHub stopped working.

Repro steps

  1. Delete build.fsx.lock
  2. Run fake and allow it to restore build.fsx.lock
  3. Run task uplading to GitHub, ie:
GitHub.createClientWithToken token
|> GitHub.draftNewRelease user repository productVersion prerelease notes
|> GitHub.uploadFiles files
|> GitHub.publishDraft
|> Async.RunSynchronously
  1. Observe:
Something failed, trying again: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Octokit.ReleaseAsset> Octokit.IReleasesClient.UploadAsset(Octokit.Release, Octokit.ReleaseAssetUpload)'.
   at [email protected](Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at [email protected](AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 577
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105
Something failed, trying again: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Octokit.ReleaseAsset> Octokit.IReleasesClient.UploadAsset(Octokit.Release, Octokit.ReleaseAssetUpload)'.
   at [email protected](Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at [email protected](AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 577
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105
Something failed, trying again: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Octokit.ReleaseAsset> Octokit.IReleasesClient.UploadAsset(Octokit.Release, Octokit.ReleaseAssetUpload)'.
   at [email protected](Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at [email protected](AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 577
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105
Something failed, trying again: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Octokit.ReleaseAsset> Octokit.IReleasesClient.UploadAsset(Octokit.Release, Octokit.ReleaseAssetUpload)'.
   at [email protected](Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at [email protected](AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 577
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105
Something failed, trying again: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Octokit.ReleaseAsset> Octokit.IReleasesClient.UploadAsset(Octokit.Release, Octokit.ReleaseAssetUpload)'.
   at [email protected](Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at [email protected](AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 577
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 105

Expected behavior

Uploading files to github.

Actual behavior

Release is created but files are not updloaded.
Looks like Octokit.IReleasesClient.UploadAsset no longer exists.

Known workarounds

Forcing specific version of Octokit: nuget Octokit 0.48

Related information

  • Operating system: Windows 10
  • .NET Runtime, CoreCLR or Mono Version: .NET 5
  • Fake version: 5.20.4
  • Paket version 6.0.3

build.fsx (without forced Octokit version)

#r "paket:
    nuget Fake.Core.Target
    nuget Fake.Core.ReleaseNotes
    nuget Fake.IO.FileSystem
    nuget Fake.IO.Zip
    nuget Fake.Api.GitHub
    nuget Fake.DotNet.MSBuild
    nuget Fake.DotNet.Cli
    nuget Fake.DotNet.Testing.XUnit2
//"
@yazeedobaid
Copy link
Collaborator

Octokit has been updated to version 0.50 in FAKE and the UploadAsset API has been updated to match with Octokit's new API.
Can you please try one of the alpha releases and see if the issue still exists for you

Thanks

@yazeedobaid
Copy link
Collaborator

The fix for this issue is included in release 5.21.0

Thanks

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