dune-release icon indicating copy to clipboard operation
dune-release copied to clipboard

unexpected Github API error: "Validation Failed"

Open mimoo opened this issue 4 years ago • 4 comments

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 [email protected]:mimoo/opam-repository
[?] Open PR to ocaml/opam-repository? [Y/n]

[-] Opening pull request to merge branch release-hexstring-0.1 of [email protected]: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 avatar May 14 '21 07:05 mimoo

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 avatar May 14 '21 07:05 mimoo

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

[-] Pushing tag 0.1 to [email protected]:mimoo/hexstring.git
[?] Create release 0.1 on [email protected]:mimoo/hexstring.git? [Y/n]

[-] Creating release 0.1 on [email protected]: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 avatar May 14 '21 07:05 mimoo

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 [email protected]:mimoo/opam-repository
dune-release: [ERROR] run ['git' '--git-dir' '.git' 'push' '--force'
       '[email protected]: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 avatar May 14 '21 07:05 mimoo

it worked!

mimoo avatar May 14 '21 07:05 mimoo