Skip to content
Snippets Groups Projects

Reproduce Repository X-Ray functionality - Introduce lock file classes

Merged Leaminn Ma requested to merge introduce-lock-file-classes into master

What does this MR do and why?

Context

In #474306 (comment 2025085630), we decided to migrate the Repository X-Ray functionality into the GitLab Rails monolith. This gives us two main benefits: (i) it will eventually allow us to run the service outside of the CI pipeline, and (ii) we can maintain the parsing logic centrally so that other domains can utilize it.

This MR

This MR is the first step in the migration progress. It introduces the LockFiles::Base class where the intention is for each lock file type to be represented by a child class. The RubyGems child class serves as an example of the implementation.

Next Steps: Eventually we will add all the languages/lock files currently supported in Repository X-Ray. Then we will introduce a lock file parser class that utilizes these LockFiles::Base child classes.

POC: For a more complete picture of the overall implementation, see: Draft: POC - Reproduce base functionality of Re... (!162125 - closed)

Resolves part of #476177 (closed).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #476177 (closed)

Edited by Leaminn Ma

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Leaminn Ma requested review from @emeraldjayde

    requested review from @emeraldjayde

  • Leaminn Ma
  • Leaminn Ma added 1 commit

    added 1 commit

    • 1b400eae - Update Gemfile.lock version spec

    Compare with previous version

  • Leaminn Ma
  • Emerald-Jayde Henao
  • Emerald-Jayde Henao
  • Emerald-Jayde Henao
  • Emerald-Jayde Henao
  • Leaminn Ma added 527 commits

    added 527 commits

    Compare with previous version

  • Leaminn Ma requested review from @emeraldjayde

    requested review from @emeraldjayde

  • Leaminn Ma added 1 commit

    added 1 commit

    • 4ce248ec - Add comment with Gemfile.lock example

    Compare with previous version

  • Emerald-Jayde Henao approved this merge request

    approved this merge request

  • Can we get a maintainer review please @mikolaj_wawrzyniak ?

  • Emerald-Jayde Henao requested review from @mikolaj_wawrzyniak and removed review request for @emeraldjayde

    requested review from @mikolaj_wawrzyniak and removed review request for @emeraldjayde

  • 1 # frozen_string_literal: true
    2
    3 module Ai
    4 module Context
    5 module Dependencies
    6 module LockFiles
    7 class RubyGems < Base
    8 def self.file_name_glob
    9 'Gemfile.lock'
    10 end
    11
    12 def self.lang
    13 'ruby'
  • mentioned in issue #479148

  • Mikołaj Wawrzyniak approved this merge request

    approved this merge request

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • Mikołaj Wawrzyniak enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 7402a6ee

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Plan        | 70     | 0      | 0       | 0     | 70    | ✅     |
    | Verify      | 44     | 0      | 2       | 0     | 46    | ✅     |
    | Create      | 127    | 0      | 12      | 0     | 139   | ✅     |
    | Govern      | 71     | 0      | 0       | 0     | 71    | ✅     |
    | Fulfillment | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Data Stores | 31     | 0      | 1       | 0     | 32    | ✅     |
    | Package     | 16     | 0      | 12      | 0     | 28    | ✅     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    | Manage      | 1      | 0      | 1       | 0     | 2     | ✅     |
    | Secure      | 2      | 0      | 0       | 0     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 379    | 0      | 28      | 0     | 407   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :white_check_mark: test report for 4ce248ec

    expand test summary
    +-------------------------------------------------------------+
    |                       suites summary                        |
    +--------+--------+--------+---------+-------+-------+--------+
    |        | passed | failed | skipped | flaky | total | result |
    +--------+--------+--------+---------+-------+-------+--------+
    | Create | 417    | 0      | 51      | 0     | 468   | ✅     |
    +--------+--------+--------+---------+-------+-------+--------+
    | Total  | 417    | 0      | 51      | 0     | 468   | ✅     |
    +--------+--------+--------+---------+-------+-------+--------+
  • mentioned in issue #479185 (closed)

  • Leaminn Ma aborted automatic add to merge train because the source branch was updated. Learn more.

    aborted automatic add to merge train because the source branch was updated. Learn more.

  • Leaminn Ma added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading