action #1413
closedChange from JSON-RPC to just REST-like http+json (with tests)
Description
There is no need to keep using json-rpc. We are not doing anything that could not be done with just plain http+json, which is more simple, perfectly supported by Mojolicious without addons, natively understood by browsers, easier to authenticate (especially using iChain)... and so on.
rpc.pl, worker, and clone_job.pl should be adapted. Most likely using Mojolicious::UserAgent.
We need proper tests (or adapt the already existing ones), of course.
Updated by ancorgs almost 11 years ago
- Subject changed from Change from JSON-RPC to just REST-like http+json to Change from JSON-RPC to just REST-like http+json (with tests)
- Description updated (diff)
- Estimated time changed from 10.00 h to 15.00 h
Updated by ancorgs almost 11 years ago
- Priority changed from Immediate to Urgent
Updated by alarrosa almost 11 years ago
- Assignee changed from alarrosa to lnussel
Updated by ancorgs almost 11 years ago
I have already implemented a working equivalent to list_jobs both in server (http+json route in Mojo) and client (a replacement for rpc.pl) side.
Updated by ancorgs almost 11 years ago
Everything related to jobs is already migrated to the new API, with a new "client" script replacing rpc.pl. The rest of the API is designed but not implemented. Nothing committed yet (WIP).
Updated by ancorgs almost 11 years ago
- % Done changed from 0 to 20
Some refactoring of the format of the responses. /workers and /isos already implemented. Only /commands left... and adapting the code in worker and webUI, of course.
Updated by ancorgs almost 11 years ago
- % Done changed from 20 to 70
Everything is migrated now. Issue still open because I cannot prove it works due to (a) some bugs in the new DBIx::Class code, (b) our test suite still lacks features. I will spend some time fixing (a) before committing and closing the issue.
Updated by ancorgs almost 11 years ago
My lack of Perl knowledge resulted in me loosing the whole morning just to modify the tests in order to prove the bug in DBIx::Class. The bug is fixed now and the code is synced with the changes introduced in the devel branch. The worker still have some issues, so WIP.
Updated by ancorgs almost 11 years ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
New REST-Like interface already working and being used in client, worker and javascript. We still lack proper tests for the workers, the UI and the old JSON-RPC interface. Closing this issue to focus all the tests writing in #1272.