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

Re: RFC: error codes on exit

From
Junio C Hamano <gitster@pobox.com>
Date
May 20, 2021, 02:28 UTC
Message-ID
<xmqqy2cauojm.fsf@gitster.g>
In-Reply-To
<YKXBhDbWMyB6A7z4@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 7 quoted lines
>> I am sympathetic to the cause and I agree that introducing a
>> finer-grained classification might be a solution.  I however am not
>> sure how we can enforce developers to apply such a manually assigned
>> "error code" cosistently.
>
> I think two things you're hinting at are "what about maintainability?"
> and "what is the migration path?"

Not really. There is not much to migrate from, and mislabeling by developers, or more realistically disagreement between developers what label is appropriate for which condition that leads to die(), would be a usability problem and not maintainability that I would be worried about.

Show 5 quoted lines
> However, for analysis in aggregate (for example, to define an SLO[1])
> that would require us to maintain a database that maps
> <filename>:<lineno> to error code.  That database would be essentially
> the same as patches to record the error codes, so what it would really
> amount to is having these deployments using a permanent fork of Git.

Yes, the suggestion was to start from there to gain experience, because ...

Show 6 quoted lines
> If we expect the error codes to not be useful to anyone else, then
> that is the right choice to make (or rather, we'd have to use other
> heuristics, such as having the traces record a collection of offsets
> in the binary and a build-id so we can key off of stack trace
> signatures).  Part of the reason I started this thread is to get a
> sense of whether these can be useful to others.

... others will find it useful if the classification matches _their_ needs, but I suspect the "bin" a single die() location wants to be classfied into would end up to be different depending on what the log collecting entity is after.

Previous: Jonathan NiederNext: Jeff King
Message 19 of 26 in “RFC: error codes on exit”
  1. Jonathan NiederMay 19, 2021
  2. Felipe ContrerasMay 20, 2021
  3. Alex HenrieMay 21, 2021
  4. H. Peter AnvinMay 21, 2021
  5. Bagas SanjayaMay 22, 2021
  6. Junio C HamanoMay 22, 2021
  7. H. Peter AnvinMay 22, 2021
  8. Felipe ContrerasMay 22, 2021
  9. H. Peter AnvinMay 22, 2021
  10. Felipe ContrerasMay 22, 2021
  11. H. Peter AnvinMay 22, 2021
  12. Philip OakleyMay 22, 2021
  13. Felipe ContrerasMay 22, 2021
  14. Alex HenrieMay 25, 2021
  15. Felipe ContrerasMay 25, 2021
  16. Junio C HamanoMay 20, 2021
  17. Felipe ContrerasMay 20, 2021
  18. Jonathan NiederMay 20, 2021
  19. Junio C HamanoMay 20, 2021
  20. Jeff KingMay 20, 2021
  21. Jonathan NiederMay 20, 2021
  22. Jeff KingMay 21, 2021
  23. Jeff HostetlerMay 20, 2021
  24. brian m. carlsonMay 21, 2021
  25. brian m. carlsonMay 21, 2021
  26. Ævar Arnfjörð BjarmasonMay 26, 2021

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.