Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Packages
    • Packages
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issues
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #46809

You need to sign in or sign up before continuing.
Closed
Open
Opened May 25, 2018 by Vivek Bhupatiraju@vbhupatiraju
  • Report abuse
  • New issue
Report abuse New issue

Extend artifacts definition to provide `reports:` context

Proposal

Proposal for an extension to our architecture that allows us the maximum flexibility that is gonna be used for Junit reports.

Syntax

We extend artifacts syntax with:

artifacts:
  paths: [....] => artifacts.zip
  junit: junit.xml
  1. The paths: still generates artifacts.zip,

  2. junit defines single file artifact, uncompressed.

Implementation

  1. Rails parses .gitlab-ci.yml and transforms the CI.yml representation into set of artifacts commands to be executed by runner,
  2. Rails verifies if Runner provide a feature: multiple-artifacts send with feature-set when requesting job,
  3. We send to Runner multiple Artifacts specification, with defined Type (archive/junit/codeclimate) / Format (zip, gzip),
  4. Runner sends all artifacts based on specification,
  5. Workhorse if does not receive format generate metadata, if format=gzip is specified we do not generate metadata,
  6. Rails accepts multiple artifact types, stores them separately, we include file_types,
  7. We provide data presenter run in context of Pipeline which accepts and joins multiple archives,
  8. Presenter generates json result to Frontend, probably with results cached via Sidekiq/ReactiveCache mechanism,
  9. We can cache data generated in Redis (easy-way), we can cache in Object Storage (slightly harder),
  10. Rails serve cached data, if data is not present we fire background sidekiq job, data are persisted for limited amount of time (1-2-3 months),

Questions?

  1. Do we lazilly load data or we persist parsed data?
  2. Where we cache data? Redis or Object Storage? (Probably Object Storage is the best, and easy achieveable)

11.1

  1. GitLab-runner: We extend Runner to support multiple-artifacts, some uncompressed,
  2. GitLab-workhorse: We extend Workhorse to support not generating metadata,
  3. GitLab-rails: We provide preliminary structure to send relevant data to Runner.

11.2

  1. We extend .gitlab-ci.yml with junit:,
  2. We send separate artifacts specification to runner,
  3. We create presenter to parse and transform the junit report with API agreed with frontend,
  4. We implement frontend to use the API we provided.

Expected API for junit (or even any other failures), preliminary draft (to verify what junit.xml sends):

{
  "summary": {
     "total": 100, "failed": 10
  },
  "details": [ # includes only failed ones
     {"file": "/file.c", "line": 10, description: "failed test"},
     ...  
  ]
}

Some initial discussion here, https://gitlab.com/gitlab-org/gitlab-ce/issues/35379#note_38923310

Edited Jul 10, 2018 by Kamil Trzciński

Linked issues

  • Discussion
  • Designs
Assignee
Assign to
11.2
Milestone
11.2
Assign milestone
Time tracking
None
Due date
None
4
Labels
Deliverable artifacts devopsverify missed-deliverable
Assign labels
  • View project labels
Reference: gitlab-org/gitlab-foss#46809