Skip to content

WIP: Add a view for the visual comparison of the trace results images

... and also add support to store the artifacts images in a local storage or another Django FileManager backend (like Google Cloud Storage)

Screenshot_from_2020-04-24_14-31-28

Changes:

  • dashboard: Adaptations to read a new image results output format in traces proposed in saavedra.pablo/mesa@9acdaeb8

  • django: Add Storage backend (filesystem and Google Storage)

  • dashboard/model: Added expected and actual hashes in the TraceResult model

  • dashboard/model: Added the ImageResult model. This entity modelizes a image generated by a ResultJob, obtained parsing the trace output:

      During the cache prepopulation, for each new trace result
      identified, the Tracie dashboard checks if there is a reference for
      the related hash in the database adding a new instance in negative
      case and storiging the image result in the media storage. The
      hash is used as identifier.
  • util/ci: Added support to extract the images reported by the traces from the Gitlab artifacts.

  • dashboard/cache: Added _image_result_from_ci(). This function preloads the ImageResult object for a particular job id and a trace name

  • dashboard: Added local cache for image results:

      Results images are accessed through the /image/ url. The role
      of this view is mitigate the access to the image storage acting
      as an first-level cache HTTP redirector.
  • templates: Added the trace.html template for the 'trace' view.

  • static/js: Added the rembrandt JS library. This library is used to generate visual diffs

  • urls: Added 'trace' view. Renders a TraceResult related information

  • urls: Added 'image' view. Redirects the real URL to access to a particular image.

  • Tweaks in the CSS. Added style for the diff image comparison

  • Tweaks in templates. Added back navigation links

  • dashboard: Add a WebHook to receive pipeline event updates

      Added Gitlab's Pipelines events WebHook ending-point
      (hooks/<path:project_path>/). Any started, on going or finished pipeline
      or related job will notify its status immediately.

    Others:

    • Added force parameter in pipeline_result_for_id() and pipeline_result_for_id(). With force=True, those functions while retrieve the latest information from Gitlab even if there are already entries in the database for each job or pipeline result in process.
    • Added logger support for views and cache modules
  • Requirements:

    • Added gunicorn as requirement
    • Added psycopg2 as requirement
    • Added goggle-cloud-storage as requirement
  • settings: Added support to read settings from a local_settings module

Merge request reports