View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006945 | Taler | specification | public | 2021-07-23 13:27 | 2021-08-24 16:22 |
Reporter | sebasjm | Assigned To | sebasjm | ||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.8 | ||||
Summary | 0006945: Move instance management API to /management instead of /private | ||||
Description | From this part of the docs https://docs.taler.net/core/api-merchant.html#instance-management Self management API will still be under [/instances/$INSTANCE] but any API that will require access to the default instance will be move into /management path https://docs.taler.net/core/api-merchant.html#post-[-instances-$INSTANCE]-private-instances old: POST [/instances/$INSTANCE]/private/instances new: POST /management/instances https://docs.taler.net/core/api-merchant.html#post--private-instances-$INSTANCE-auth old: POST /private/instances/$INSTANCE/auth new: POST /management/instances/$INSTANCE/auth https://docs.taler.net/core/api-merchant.html#patch--private-instances-$INSTANCE old: PATCH /private/instances/$INSTANCE new: PATCH /management/instances/$INSTANCE https://docs.taler.net/core/api-merchant.html#get--private-instances old: GET /private/instances new: GET /management/instances https://docs.taler.net/core/api-merchant.html#get--private-instances-$INSTANCE old: GET /private/instances/$INSTANCE new: GET /management/instances/$INSTANCE https://docs.taler.net/core/api-merchant.html#delete--private-instances-$INSTANCE old: DELETE /private/instances/$INSTANCE new: DELETE /management/instances/$INSTANCE | ||||
Tags | No tags attached. | ||||
|
Let's do this for 0.8, as it would be an API break. |
|
I've created a new array of handler named 'management_handlers' to handle this APIs. I'm not pushing into master because it will break a lot of usecases and maybe we want to sync before pushin. https://git.taler.net/merchant.git/commit/?h=dev/sebasjm/test-6945&id=5e12b99b43b9b7d2870309709fcf7f00eb879070 |
|
What is mainly missing is updates to merchant's src/lib/ files where you will find /private/ in the URL path construction logic for the libtalermerchant library. Without this, 'make check' test cases will fail. That, plus synchronizing with the SPA is all that should be required. |
|
Right, should running `make check` be enough? I have updated every location I found that is related, ran make check and it works. https://git.taler.net/merchant.git/commit/?h=dev/sebasjm/test-6945&id=b8efb5d32fd104a794cd632ab6504d4d82054925 Two things bugs me: * I have intentionally made a typo in a random file (src/lib/merchant_api_post_instances.c:258) to see if `make check` will complain but it doesn't. it may be pure luck (or unchecked path) or that I'm not checking correctly. * make check also skips some test, is this relevant? attaching log test.result.txt (5,816 bytes)
Making check in . make[1]: Entering directory '/folder' make[1]: Nothing to be done for 'check-am'. make[1]: Leaving directory '/folder' Making check in src make[1]: Entering directory '/folder/src' Making check in include make[2]: Entering directory '/folder/src/include' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/folder/src/include' Making check in mustach make[2]: Entering directory '/folder/src/mustach' make test_mustach_jansson run-original-tests.sh make[3]: Entering directory '/folder/src/mustach' make[3]: 'test_mustach_jansson' is up to date. make[3]: Nothing to be done for 'run-original-tests.sh'. make[3]: Leaving directory '/folder/src/mustach' make check-TESTS make[3]: Entering directory '/folder/src/mustach' make[4]: Entering directory '/folder/src/mustach' SKIP: run-original-tests.sh PASS: test_mustach_jansson ============================================================================ Testsuite summary for taler-merchant 0.8.0 ============================================================================ # TOTAL: 2 # PASS: 1 # SKIP: 1 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[4]: Leaving directory '/folder/src/mustach' make[3]: Leaving directory '/folder/src/mustach' make[2]: Leaving directory '/folder/src/mustach' Making check in backenddb make[2]: Entering directory '/folder/src/backenddb' make test-merchantdb-postgres make[3]: Entering directory '/folder/src/backenddb' make[3]: 'test-merchantdb-postgres' is up to date. make[3]: Leaving directory '/folder/src/backenddb' make check-TESTS make[3]: Entering directory '/folder/src/backenddb' make[4]: Entering directory '/folder/src/backenddb' SKIP: test-merchantdb-postgres ============================================================================ Testsuite summary for taler-merchant 0.8.0 ============================================================================ # TOTAL: 1 # PASS: 0 # SKIP: 1 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[4]: Leaving directory '/folder/src/backenddb' make[3]: Leaving directory '/folder/src/backenddb' make[2]: Leaving directory '/folder/src/backenddb' Making check in backend make[2]: Entering directory '/folder/src/backend' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/folder/src/backend' Making check in lib make[2]: Entering directory '/folder/src/lib' make test_merchant_api_common make[3]: Entering directory '/folder/src/lib' make[3]: 'test_merchant_api_common' is up to date. make[3]: Leaving directory '/folder/src/lib' make check-TESTS make[3]: Entering directory '/folder/src/lib' make[4]: Entering directory '/folder/src/lib' PASS: test_merchant_api_common ============================================================================ Testsuite summary for taler-merchant 0.8.0 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[4]: Leaving directory '/folder/src/lib' make[3]: Leaving directory '/folder/src/lib' make[2]: Leaving directory '/folder/src/lib' Making check in testing make[2]: Entering directory '/folder/src/testing' make test_merchant_api test-merchant-walletharness.sh test_merchant_instance_response.sh test_merchant_product_creation.sh test_merchant_reserve_creation.sh test_merchant_order_creation.sh make[3]: Entering directory '/folder/src/testing' make[3]: 'test_merchant_api' is up to date. make[3]: Nothing to be done for 'test-merchant-walletharness.sh'. make[3]: Nothing to be done for 'test_merchant_instance_response.sh'. make[3]: Nothing to be done for 'test_merchant_product_creation.sh'. make[3]: Nothing to be done for 'test_merchant_reserve_creation.sh'. make[3]: Nothing to be done for 'test_merchant_order_creation.sh'. make[3]: Leaving directory '/folder/src/testing' make check-TESTS make[3]: Entering directory '/folder/src/testing' make[4]: Entering directory '/folder/src/testing' SKIP: test_merchant_api SKIP: test-merchant-walletharness.sh SKIP: test_merchant_instance_response.sh SKIP: test_merchant_product_creation.sh SKIP: test_merchant_reserve_creation.sh SKIP: test_merchant_order_creation.sh ============================================================================ Testsuite summary for taler-merchant 0.8.0 ============================================================================ # TOTAL: 6 # PASS: 0 # SKIP: 6 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[4]: Leaving directory '/folder/src/testing' make[3]: Leaving directory '/folder/src/testing' make[2]: Leaving directory '/folder/src/testing' Making check in merchant-tools make[2]: Entering directory '/folder/src/merchant-tools' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/folder/src/merchant-tools' make[2]: Entering directory '/folder/src' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/folder/src' make[1]: Leaving directory '/folder/src' Making check in contrib make[1]: Entering directory '/folder/contrib' make[1]: Nothing to be done for 'check'. make[1]: Leaving directory '/folder/contrib' Making check in doc make[1]: Entering directory '/folder/doc' Making check in . make[2]: Entering directory '/folder/doc' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/folder/doc' Making check in doxygen make[2]: Entering directory '/folder/doc/doxygen' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/folder/doc/doxygen' make[1]: Leaving directory '/folder/doc' |
|
Well, with the typo it fails for me ('make install check'): Aug 05 09:53:28-686920 test-merchant-api-15054 INFO Running batched command: instance-create-default Aug 05 09:53:28-688104 taler-merchant-httpd-15189(CV5H79KV9PE46J6QC63SRSVGB8) INFO Handling request (POST) for URL '/management2/instances' Aug 05 09:53:28-688209 taler-merchant-httpd-15189(CV5H79KV9PE46J6QC63SRSVGB8) INFO Finished handling request for `/management2/instances' with MHD termination code 0 Aug 05 09:53:28-688326 test-merchant-api-15054 INFO POST /management/instances completed with response code 404 ... now testing without the typo... |
|
After rebasing on master (which was a mess, I solved it by first removing the merchant-backoffice submodule and then squashing commits, very ugly), I still get test_merchant_api failing. Also the walletharness is failing, but simply because it doesn't understand /management/ yet. I don't know why it fails though: Aug 05 10:13:12-292115 test-merchant-api-21874 INFO Running command `auth' Aug 05 10:13:12-292133 test-merchant-api-21874 INFO Running batched command: set-auth-valid-again Aug 05 10:13:12-292184 test-merchant-api-21874 INFO Running command `auth' Aug 05 10:13:12-292195 test-merchant-api-21874 INFO Running batched command: instance-create-i1a-auth-ok-idempotent Aug 05 10:13:12-292794 taler-merchant-httpd-22021(CYT3HGKF8FQJA02ZF8ECM6KPNG) INFO Handling request (POST) for URL '/management/instances/i1a/auth' Aug 05 10:13:12-292851 taler-merchant-httpd-22021(CYT3HGKF8FQJA02ZF8ECM6KPNG) INFO Starting merchant DB transaction `post /instances/$ID/auth' Aug 05 10:13:12-293066 taler-merchant-httpd-22021(CYT3HGKF8FQJA02ZF8ECM6KPNG) INFO Rolling back merchant DB transaction `post /instances/$ID/auth' Aug 05 10:13:12-293159 taler-merchant-httpd-22021(CYT3HGKF8FQJA02ZF8ECM6KPNG) INFO Finished handling request for `/management/instances/i1a/auth' with MHD termination code 0 Aug 05 10:13:12-293194 test-merchant-api-21874 ERROR Unexpected response code 401 (2015) to command auth Aug 05 10:13:12-293213 test-merchant-api-21874 ERROR Failed at command `auth' Aug 05 10:13:12-293219 test-merchant-api-21874 ERROR Batch is at command `instance-create-i1a-auth-ok-idempotent' Aug 05 10:13:12-293243 test-merchant-api-21874 INFO Executing shutdown at `auth' Aug 05 10:13:12-293519 test-merchant-api-21874 INFO Disconnecting from auditor at URL `http://the.auditor/' (0x55c491b36d80). Aug 05 10:13:12-320711 taler-merchant-httpd-22021 INFO Disconnecting from auditor at URL `http://the.auditor/' (0x559d05509fc0). FAIL test_merchant_api (exit status: 1) |
|
Thanks! My problem was with the database and the reason of why the tests were skipped. (also it was failing also for the missing ; in the image URL but I see that you have already fixed in master.... this is moving fast :P ) Now I have the same ERROR than you, will check |
|
Fixed, modulo update of /private/ to /management/ in wallet. |
|
Sebastian/Florian: please coordinate the wallet fix. |
|
note to self: also check documenation |
|
I fixed an unrelated issue in the test harness, you might want to "git pull". However, still 3 of 6 tests are not passing. |
|
Test cases are passing again now. Leaving this open for sebasjm to adjust the API documentation. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-07-23 13:27 | sebasjm | New Issue | |
2021-07-23 13:27 | sebasjm | Status | new => assigned |
2021-07-23 13:27 | sebasjm | Assigned To | => sebasjm |
2021-08-01 12:21 | Christian Grothoff | Priority | normal => urgent |
2021-08-01 12:21 | Christian Grothoff | Target Version | git (master) => 0.8 |
2021-08-01 12:21 | Christian Grothoff | Note Added: 0018042 | |
2021-08-03 18:59 | sebasjm | Note Added: 0018059 | |
2021-08-03 18:59 | sebasjm | Status | assigned => feedback |
2021-08-03 19:24 | Christian Grothoff | Note Added: 0018061 | |
2021-08-03 19:24 | Christian Grothoff | Status | feedback => assigned |
2021-08-04 21:06 | sebasjm | Note Added: 0018069 | |
2021-08-04 21:06 | sebasjm | File Added: test.result.txt | |
2021-08-05 09:57 | Christian Grothoff | Note Added: 0018070 | |
2021-08-05 10:34 | Christian Grothoff | Note Added: 0018071 | |
2021-08-05 18:56 | sebasjm | Note Added: 0018072 | |
2021-08-05 19:02 | Christian Grothoff | Note Added: 0018073 | |
2021-08-05 19:03 | Christian Grothoff | Note Added: 0018074 | |
2021-08-05 19:48 | Florian Dold | Assigned To | sebasjm => Florian Dold |
2021-08-05 19:55 | Florian Dold | Assigned To | Florian Dold => sebasjm |
2021-08-05 19:57 | sebasjm | Note Added: 0018076 | |
2021-08-05 23:05 | Florian Dold | Note Added: 0018077 | |
2021-08-06 11:49 | Florian Dold | Note Added: 0018079 | |
2021-08-06 16:35 | sebasjm | Status | assigned => resolved |
2021-08-06 16:35 | sebasjm | Resolution | open => fixed |
2021-08-24 16:22 | Christian Grothoff | Status | resolved => closed |
2024-01-12 14:02 | Christian Grothoff | Category | merchant backend API (HTTP specification) => specification |