action #1413
closed
Change from JSON-RPC to just REST-like http+json (with tests)
Added by ancorgs over 10 years ago.
Updated over 10 years ago.
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.
- 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
- Priority changed from Immediate to Urgent
- Target version set to Sprint 02
- Assignee changed from alarrosa to lnussel
- Status changed from New to In Progress
- Assignee changed from lnussel to ancorgs
Reassigned to me while since I cannot work in #1277 until #1276 is done.
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.
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).
- % 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.
- % 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.
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.
- 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.
Also available in: Atom
PDF