Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
-
Target version:
Start date:
2014-02-06
Due date:
% Done:

100%

Estimated time:
15.00 h

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.


Related issues 1 (0 open1 closed)

Has duplicate openQA Project - action #1307: Evaluate the migration from JSON-RPC to a rest interfaceClosed2014-01-27

Actions
Actions #1

Updated by ancorgs over 10 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
Actions #2

Updated by ancorgs over 10 years ago

  • Priority changed from Immediate to Urgent
Actions #3

Updated by ancorgs over 10 years ago

  • Target version set to Sprint 02
Actions #4

Updated by alarrosa over 10 years ago

  • Assignee set to alarrosa
Actions #5

Updated by alarrosa over 10 years ago

  • Assignee changed from alarrosa to lnussel
Actions #6

Updated by ancorgs over 10 years ago

  • 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.

Actions #7

Updated by ancorgs over 10 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.

Actions #8

Updated by ancorgs over 10 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).

Actions #9

Updated by ancorgs over 10 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.

Actions #10

Updated by ancorgs over 10 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.

Actions #11

Updated by ancorgs over 10 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.

Actions #12

Updated by ancorgs over 10 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.

Actions

Also available in: Atom PDF