git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/6] ci: add a GitHub workflow to submit Coverity scans

From
Jeff King <peff@peff.net>
Date
Sep 25, 2023, 12:09 UTC
Message-ID
<20230925120935.GA1623701@coredump.intra.peff.net>
In-Reply-To
<d4dc96a9-fd5a-8238-e411-edd605d415f3@gmx.de>
On Mon, Sep 25, 2023 at 01:52:34PM +0200, Johannes Schindelin wrote:
Show 16 quoted lines
> > You might want "--fail" or "--fail-with-body" here. I think any
> > server-side errors (like a missing or invalid token or project name)
> > will result in a 401.
> 
> Sadly, https://curl.se/docs/manpage.html#-f says this:
> 
> 	This method is not fail-safe and there are occasions where
> 	non-successful response codes slip through, especially when
> 	authentication is involved (response codes 401 and 407).
> 
> 401 is the precise case we're hitting when the token or the project name
> are incorrect.
>
> Having said that, I just tested with this particular host, and `curl -f`
> does fail with [exit code 22](https://curl.se/docs/manpage.html#22) as one
> would desire. So I will make that change.

The manpage is rather vague about what those "occasions" are, but I think we are probably OK since we are not sending HTTP-level credentials, according to:

  https://github.com/curl/curl/commit/cde5e35d9b046b224c64936c432d67c9de8bcc9e

At any rate, even if this did not catch every failure, I think we are better off catching more rather than fewer.

Show 8 quoted lines
> As to `--fail-with-body`: it is too new to use (it was [introduced in cURL
> v7.76.0](https://curl.se/docs/manpage.html#--fail-with-body) and Ubuntu
> v20.04 [comes with
> v7.68.0](https://packages.ubuntu.com/search?suite=focal&searchon=names&keywords=curl),
> i.e. is missing that option).
> 
> In any case, in my tests, `--fail-with-body` did not show anything more
> than `--fail` in this instance. Maybe for you it is different?

No, I don't think it's worth worrying about here. It could help with debugging if their server returns something generic like a 500 code along with a more detailed reason (we do something similar in git-remote-curl to show failed bodies). But if it's at all more hassle than typing "--with-body" it is not worth the effort.

Show 9 quoted lines
> > I notice you put the "project" variable in the query string. Can it be
> > a --form, too, for symmetry?
> 
> The instructions at https://scan.coverity.com/projects/git/builds/new (in
> the "Automation" section) are very clear that `project` should be passed
> as a GET variable.
> 
> Even if using a POST variable would work, I'd rather stay with the
> officially-documented way.
That seems like good reasoning to me.
-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin via GitGitGadget
Message 17 of 37 in “Add a GitHub workflow to submit builds to Coverity Scan”
  1. 0/6 Add a GitHub workflow to submit builds to Coverity ScanJohannes Schindelin via GitGitGadget, Sep 22, 2023
  2. 3/6 coverity: allow overriding the Coverity projectJohannes Schindelin via GitGitGadget, Sep 22, 2023
  3. Jeff KingSep 23, 2023
  4. Johannes SchindelinSep 25, 2023
  5. Jeff KingSep 25, 2023
  6. Johannes SchindelinSep 26, 2023
  7. Junio C HamanoSep 26, 2023
  8. Jeff KingSep 26, 2023
  9. Junio C HamanoSep 26, 2023
  10. Jeff KingSep 26, 2023
  11. 2/6 coverity: cache the Coverity Build ToolJohannes Schindelin via GitGitGadget, Sep 22, 2023
  12. Jeff KingSep 23, 2023
  13. Johannes SchindelinSep 25, 2023
  14. 1/6 ci: add a GitHub workflow to submit Coverity scansJohannes Schindelin via GitGitGadget, Sep 22, 2023
  15. Jeff KingSep 23, 2023
  16. Johannes SchindelinSep 25, 2023
  17. Jeff KingSep 25, 2023
  18. 4/6 coverity: support building on WindowsJohannes Schindelin via GitGitGadget, Sep 22, 2023
  19. Jeff KingSep 23, 2023
  20. 6/6 coverity: detect and report when the token or project is incorrectJohannes Schindelin via GitGitGadget, Sep 22, 2023
  21. Jeff KingSep 23, 2023
  22. Johannes SchindelinSep 25, 2023
  23. Jeff KingSep 25, 2023
  24. 5/6 coverity: allow running on macOSJohannes Schindelin via GitGitGadget, Sep 22, 2023
  25. Jeff KingSep 23, 2023
  26. Johannes SchindelinSep 25, 2023
  27. Jeff KingSep 25, 2023
  28. 0/6 Add a GitHub workflow to submit builds to Coverity ScanJohannes Schindelin via GitGitGadget, Sep 25, 2023
  29. 3/6 coverity: allow overriding the Coverity projectJohannes Schindelin via GitGitGadget, Sep 25, 2023
  30. 2/6 coverity: cache the Coverity Build ToolJohannes Schindelin via GitGitGadget, Sep 25, 2023
  31. 1/6 ci: add a GitHub workflow to submit Coverity scansJohannes Schindelin via GitGitGadget, Sep 25, 2023
  32. 4/6 coverity: support building on WindowsJohannes Schindelin via GitGitGadget, Sep 25, 2023
  33. 6/6 coverity: detect and report when the token or project is incorrectJohannes Schindelin via GitGitGadget, Sep 25, 2023
  34. 5/6 coverity: allow running on macOSJohannes Schindelin via GitGitGadget, Sep 25, 2023
  35. Jeff KingSep 25, 2023
  36. Junio C HamanoSep 25, 2023
  37. Johannes SchindelinSep 26, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.