From f913822c03f8e9101554d24760e38a073d1e4f9b Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Thu, 17 Sep 2020 23:39:42 +0000 Subject: [PATCH] initial todo to add ErrorMsg to all -FAILURE responses --- ...orMsg_to_-FAILURE_messages_lacking_it.mdwn | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/todo/external_remotes__58___Add_support_for_ErrorMsg_to_-FAILURE_messages_lacking_it.mdwn diff --git a/doc/todo/external_remotes__58___Add_support_for_ErrorMsg_to_-FAILURE_messages_lacking_it.mdwn b/doc/todo/external_remotes__58___Add_support_for_ErrorMsg_to_-FAILURE_messages_lacking_it.mdwn new file mode 100644 index 0000000000..c51c7ca563 --- /dev/null +++ b/doc/todo/external_remotes__58___Add_support_for_ErrorMsg_to_-FAILURE_messages_lacking_it.mdwn @@ -0,0 +1,30 @@ +ATM + +[[!format sh """ +$> grep -e -FAILURE doc/design/external_special_remote_protocol.mdwn + * `INITREMOTE-FAILURE ErrorMsg` + * `PREPARE-FAILURE ErrorMsg` + * `TRANSFER-FAILURE STORE|RETRIEVE Key ErrorMsg` + * `CHECKPRESENT-FAILURE Key` + * `REMOVE-FAILURE Key ErrorMsg` + * `CLAIMURL-FAILURE` + * `CHECKURL-FAILURE` + * `WHEREIS-FAILURE` +"""]] + +so some commands have a way to report why action failed and some do not. + +I have been running into an error message `CHECKURL failed with no reason given` and I thought our special remote is just not letting know details but apparently I just followed the spec and thus did not provide description of the reason why CHECKURL has failed. That complicates debugging/fixing. + +Unfortunately it seems that adding such support would not be backward compatible, ie older versions of git annex would puke if external remote starts to provide error message, so I guess it would be up to the remote to check annex version (or protocol features?) on either it can report an error: + +[[!format sh """ + external special remote protocol error, unexpectedly received "CLAIMURL-FAILURE IT IS FAILURE" (unable to parse command) +git-annex: unable to use special remote due to protocol error + +$> git annex version +git-annex version: 8.20200810+git143-gdee38c54d-1~ndall+1 +"""]] + +[[!meta author=yoh]] +[[!tag projects/datalad]]