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

Point to `dune-release config` if `dune-release opam submit` fails due to erroneous global configuration

Open pitag-ha opened this issue 5 years ago • 5 comments

When dune-release opam submit fails due to wrong global config data, it would be nice to let the user know that now that can be fixed via dune-release config. In my case, the problem was that the path to my opam-repository clone was wrong:

[-] Submitting 
[-] Preparing pull request to ocaml/opam-repository
dune-release: [ERROR] /home/sonja/Documents/Tarides/opam-repository is not a valid Git repository.

That is already helpful. But pointing to dune-release config might be good. If the github user name is wrong, the error message is

dune-release: [ERROR] Could not retrieve pull request URL from response, unexpected Github API error: "Validation Failed"

There, giving the hint that if the error is a validation error, then maybe the user name is wrong and can be corrected through dune-release config could be quite helpful.

I'm not sure what the error is if the opam-repository fork url is erroneous.

pitag-ha avatar Jul 16 '20 12:07 pitag-ha

Is there a dune-relase config command? Not in my version 1.3.3.

lindig avatar Jul 18 '20 10:07 lindig

Hi, it has been added in dune-release.1.4.0, released this week.

gpetiot avatar Jul 18 '20 11:07 gpetiot

@pitag-ha did you copy the output trace by any chance?

gpetiot avatar Jul 23 '20 12:07 gpetiot

No, I haven't. That's a good point, though... I'll do it next time when I run into something I want to file an issue for. Also, it will be easy for me to reproduce, so I can do that tomorrow morning and send the output trace.

pitag-ha avatar Jul 23 '20 14:07 pitag-ha

I didn't remember well what I had in mind could be improved, when I wrote this issue. Sorry for that! There are two things I need to correct:

  1. it's about dune-release submit, not about dune-release publish.
  2. the information given about the error is perfect (it was just confusing to me at the moment why it said it wasn't a valid Git repository, since I was just missing a / at the end of the path):
[-] Submitting 
[-] Preparing pull request to ocaml/opam-repository
dune-release: [ERROR] /home/sonja/Documents/Tarides/opam-repository is not a valid Git repository.

what I think might be nice adding is that now it can be fixed via 'opam config'.

I've corrected the issue message itself.

pitag-ha avatar Jul 24 '20 09:07 pitag-ha