tarides / dune-release

Streamlining the release of dune packages to opam
ISC License
116 stars 37 forks source link

unexpected Github API error: "Validation Failed" #367

Open mimoo opened 3 years ago

mimoo commented 3 years ago

Hopefully this thread gives an idea of issues that arise when trying to use dune-release for a typical flow

I'm getting this error when trying to dune-release a library:

[-] Submitting 
[-] Preparing pull request to ocaml/opam-repository
[-] Fetching https://github.com/ocaml/opam-repository.git#master
[-] Checking out a local release-hexstring-0.1 branch
[-] Pushing release-hexstring-0.1 to git@github.com:mimoo/opam-repository
[?] Open PR to ocaml/opam-repository? [Y/n]

[-] Opening pull request to merge branch release-hexstring-0.1 of git@github.com:mimoo/opam-repository into ocaml/opam-repository
dune-release: [ERROR] Could not retrieve pull request URL from response, unexpected Github API error: "Validation Failed"

not sure how to investigate as the error is not really telling.

Also I always get this error and I can never figure out how to get rid of it:

[FAIL] lint opam file hexstring.opam:
       opam lint -s messages:
       /Users/davidwong/Perso/hexstring/hexstring.opam: Warnings.
                  warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
mimoo commented 3 years ago

OK I think I know what's happening... I already have a repository opam-repository which is a fork of a custom opam repository. So I guess there is some collision here? Not sure what I can do about it (the custom opam repository I use is also called opam-repository on Github and I can't change that).

I deleted my fork on Github. Let's see if this works.

mimoo commented 3 years ago

Now I'm getting an error at an earlier step:

[-] Pushing tag 0.1 to git@github.com:mimoo/hexstring.git
[?] Create release 0.1 on git@github.com:mimoo/hexstring.git? [Y/n]

[-] Creating release 0.1 on git@github.com:mimoo/hexstring.git via github's API
dune-release: [ERROR] Could not retrieve release ID from response, unexpected Github API error: "Validation Failed"

I think this is perhaps because I already tried to dune-release previously?

I'm bumping the version from 0.1 to 0.1.1 to see if it works (not sure you can do this in opam)

mimoo commented 3 years ago

It seems like it worked, until I got this:

[-] Preparing pull request to ocaml/opam-repository
[-] Fetching https://github.com/ocaml/opam-repository.git#master
[-] Checking out a local release-hexstring-0.1.1 branch
[-] Pushing release-hexstring-0.1.1 to git@github.com:mimoo/opam-repository
dune-release: [ERROR] run ['git' '--git-dir' '.git' 'push' '--force'
       'git@github.com:mimoo/opam-repository' 'release-hexstring-0.1.1']: exited with 128

I'm guessing I need to fork the official opam-repository manually first?

mimoo commented 3 years ago

it worked!