1. 16 Apr, 2020 1 commit
    • Harald Sitter's avatar
      be a bit more verbose on protocol exceptions · b2008aac
      Harald Sitter authored
      the whatstring isn't actually entirely sufficient as it turns out. it is
      derived from errorstring but that seems to sometimes not contain any
      useful information as to what the actual protocol problem was. so, log
      code, text and string when throwing a protocol exception
  2. 12 Jul, 2019 1 commit
    • Harald Sitter's avatar
      always log raw exception data · 68ccdf54
      Harald Sitter authored
      a UI representation of the error may lack all the data. specifically the
      json blobs could be fairly long if perl hits a server-side exception
      (e.g. bug in bugzilla itself). by logging it we have a way to get to
      the raw data should it be necessary
      Test Plan: builds and warns when appropriate
      Reviewers: #plasma, apol
      Reviewed By: apol
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D22398
  3. 09 Jul, 2019 1 commit
  4. 28 Jun, 2019 1 commit
    • Harald Sitter's avatar
      port to bugzilla REST API · a4330e62
      Harald Sitter authored
      the old API is deprecated. the new API is RESTy and much easier to use
      plus also has some efficiency boosts.
      this commit introduces a new supporting library to wrap the REST API
      for easy consumption in drkonqi.
      - new internal lib wrapping the REST API
      - unit testing of the lib
      - xmlrpc use gone
      - BugzillaManager continues to be a singleton manager for the API
      - ancient cookie system for login is entirely gone, this has been
        deprecated (or perhaps even removed?) for years
      - duplicate querying is pretty inefficient, needs porting to
        pagination, but is not worse than what it was before. in fact,
        it's faster than before out of the box!
      the lib api is split in three pieces:
      1. the connection containing protocol logic
      2. the clients containing routing logic
      2.1. command models that are basically POSIX-style argument structs which can serialize into json
      3. the models deserializing the json API replies back into cpp
      clients get a request, give back a job and the intended use is for
      the consumer to then connect to the finished signal of the job to then
      ask the clients for the final return value of the job.
      this is a bit 'meh'. what I really wanted was a Future to be returned
      and the caller to connect to the future. unfortunately qfuture is fairly
      limited and since qtbase has no Promise implementation I'm rather opting
      for the double-function-approach than doing it like we did in the previous
      decade and have a gazillion signals.
      this way the handling of the job is always uniform and all specific
      "handling code" is inside the connected slot rather than the actual
      error handling has been put entirely into exceptions which get raised
      when trying to access a finished job. in BugzillaManager they get rescued
      and turned into the already existing signals. this simplifies error
      handling a fair amount and also makes the error handling code
      look uniform across the various API calls we have.
      the uniform representation of errors on the REST side thus always has
      uniform representation on the c++ side.
      Reviewers: apol
      Reviewed By: apol
      Subscribers: apol, plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D19612