View Issue Details

IDProjectCategoryView StatusLast Update
0005903Talerauditorpublic2021-09-02 18:14
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005903: incomprehensible error message "Did not update auditor DB: value existed"
DescriptionThis happens on the automated build for taler-test@gv.

It probably has something to do with the exchange already being in the database of the auditor. However, it is not clear whether this represents an error condition that must cause the build to fail.
TagsNo tags attached.

Activities

Christian Grothoff

2019-09-25 13:14

manager   ~0014957

I'm not sure what is incomprehensible about the message, or how to improve it:

Somebody is running

$ taler-auditor-exchange

to *add* an exchange to the list of audited exchanges. That exchange is _already_ in the list of audited exchanges, and since we can have each exchange at most once (UNIQUE constraint), we return this message. The status code is set to "4", in contrast to other errors (1/2/3) that indicate failures for other reasons (failure to connect to DB, etc.). 0 is returned on success.

Now, I do agree that this is possibly OK for the buildbot (except maybe the DB should have been *reset* to test everything from scratch, but that's a question of what we intend to do/test/deploy here). So for a build of demo/test, I think it's OK to continue if the status code is 0 or 4, while for an integration test that did reset the DB we should check for 0 only.

Florian Dold

2019-09-25 13:26

manager   ~0014958

Last edited: 2019-09-25 13:42

Ah. So the solution is to simply check for the respective exit status code I guess. Still, the error message should be improved. I was confused by "value existed". It's not even grammatically correct. What value?

Also, some programs write their own name before the error message. Otherwise, there is not enough context to diagnose where the problem even came from.

(Just try "cat --foobar" to see an example of this.)

How about something like:

"taler-auditor-exchange: The exchange '%s' is already audited by this auditor. Refusing to update auditor DB."

That's much more user-friendly.

Florian Dold

2019-09-25 13:30

manager   ~0014959

(I'm not saying that we should prefix *all* outputs with the program name, but in this case, it would've added the required context to make the problem easier to diagnose.)

Christian Grothoff

2019-09-25 17:43

manager   ~0014963

I guess then in this context we should simply switch to GNUNET_log() and log at the ERROR level. That'll give us all the information, and not create yet another special case.

Christian Grothoff

2019-09-26 10:32

manager   ~0014965

5e859bae..3b3daa75 fixes the error message by using GNUNET_log () and changing the text a bit.
7d8b8ba..41e0280 documents the return codes of taler-auditor-exchange in docs.git.
3b3daa75..14c7e45e improves the error message in case removal fails.

Christian Grothoff

2021-09-02 18:14

manager   ~0018274

Fix committed to master branch.

Related Changesets

exchange: master 3b3daa75

2019-09-26 12:23

Christian Grothoff


Details Diff
fix 0005903 Affected Issues
0005903
mod - src/auditor/taler-auditor-exchange.c Diff File

Issue History

Date Modified Username Field Change
2019-09-24 09:16 Florian Dold New Issue
2019-09-24 09:16 Florian Dold Status new => assigned
2019-09-24 09:16 Florian Dold Assigned To => Christian Grothoff
2019-09-25 13:14 Christian Grothoff Note Added: 0014957
2019-09-25 13:15 Christian Grothoff Assigned To Christian Grothoff => Florian Dold
2019-09-25 13:26 Florian Dold Note Added: 0014958
2019-09-25 13:26 Florian Dold Assigned To Florian Dold => Christian Grothoff
2019-09-25 13:30 Florian Dold Note Added: 0014959
2019-09-25 13:42 Florian Dold Note Edited: 0014958
2019-09-25 17:43 Christian Grothoff Note Added: 0014963
2019-09-26 10:32 Christian Grothoff Status assigned => resolved
2019-09-26 10:32 Christian Grothoff Resolution open => fixed
2019-09-26 10:32 Christian Grothoff Fixed in Version => 0.6
2019-09-26 10:32 Christian Grothoff Note Added: 0014965
2019-09-26 10:32 Christian Grothoff Product Version => git (master)
2019-09-26 10:32 Christian Grothoff Target Version => 0.6
2019-12-20 19:11 Christian Grothoff Status resolved => closed
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master 3b3daa75
2021-09-02 18:14 Christian Grothoff Note Added: 0018274