Project

General

Profile

action #1413

Change from JSON-RPC to just REST-like http+json (with tests)

Added by ancorgs about 9 years ago. Updated almost 9 years ago.

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

100%

Estimated time:
15.00 h
Difficulty:

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

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

History

#1 Updated by ancorgs about 9 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

#2 Updated by ancorgs about 9 years ago

  • Priority changed from Immediate to Urgent

#3 Updated by ancorgs about 9 years ago

  • Target version set to Sprint 02

#4 Updated by alarrosa about 9 years ago

  • Assignee set to alarrosa

#5 Updated by alarrosa about 9 years ago

  • Assignee changed from alarrosa to lnussel

#6 Updated by ancorgs almost 9 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.

#7 Updated by ancorgs almost 9 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.

#8 Updated by ancorgs almost 9 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).

#9 Updated by ancorgs almost 9 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.

#10 Updated by ancorgs almost 9 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.

#11 Updated by ancorgs almost 9 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.

#12 Updated by ancorgs almost 9 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.

Also available in: Atom PDF