Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-9999

[Review] Make error detection an array and local setting by repository CR

XMLWordPrintable

    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Global error detection settings now allow multiple error regex patterns.
      Multiple patterns are supported using multi-line YAML format, allowing
      you to detect errors from different tools with various output formats.

      Added error detection settings to the repository CR. By default, error detection
      uses the global pattern. However, you can customize error detection patterns on a
      per-repository basis using the Repository CR.
      You can specify multiple regex patterns to detect different error formats in
      your repository.
      Each pattern must use [named groups](https://www.regular-expressions.info/named.html) to capture:
      - `filename`: The file path where the error occurred
      - `line`: The line number
      - `error`: The error message
      - `column`: (optional) The column number

      **Configuration Options:**
      - `enabled`: **Required** boolean flag to enable or disable error detection for this
        repository. Set to `true` to enable or `false` to disable error detection.
        This field must be explicitly specified when configuring error detection settings.
      - `patterns`: Array of regex patterns. Repository-specific patterns are tried
        first, followed by global patterns. If not specified or empty, only the
        global patterns are used. **Note:** Providing an empty array does not disable
        error detection; it falls back to using only the global patterns defined in
        the `pipelines-as-code` ConfigMap.
      - `max_number_of_lines`: Number of log lines to scan (overrides global
        setting). Default is 50. Use -1 for unlimited.

      You can explicitly disable error detection for a specific repository, even if
      it's enabled globally.
      If you don't need to customize error detection for repository, simply omit the
      entire `error_detection` field and the global settings will be used.
      Show
      Global error detection settings now allow multiple error regex patterns. Multiple patterns are supported using multi-line YAML format, allowing you to detect errors from different tools with various output formats. Added error detection settings to the repository CR. By default, error detection uses the global pattern. However, you can customize error detection patterns on a per-repository basis using the Repository CR. You can specify multiple regex patterns to detect different error formats in your repository. Each pattern must use [named groups]( https://www.regular-expressions.info/named.html ) to capture: - `filename`: The file path where the error occurred - `line`: The line number - `error`: The error message - `column`: (optional) The column number **Configuration Options:** - `enabled`: **Required** boolean flag to enable or disable error detection for this   repository. Set to `true` to enable or `false` to disable error detection.   This field must be explicitly specified when configuring error detection settings. - `patterns`: Array of regex patterns. Repository-specific patterns are tried   first, followed by global patterns. If not specified or empty, only the   global patterns are used. **Note:** Providing an empty array does not disable   error detection; it falls back to using only the global patterns defined in   the `pipelines-as-code` ConfigMap. - `max_number_of_lines`: Number of log lines to scan (overrides global   setting). Default is 50. Use -1 for unlimited. You can explicitly disable error detection for a specific repository, even if it's enabled globally. If you don't need to customize error detection for repository, simply omit the entire `error_detection` field and the global settings will be used.
    • Feature
    • Proposed
    • Pipelines Sprint CrookShank 45, Pipelines Sprint CrookShank 46

      Story (Required)

      As a developer trying to configure error detection for pipelines, I want
      _error detection to be an array of regex patterns and configurable via
      repository CR_, so that _I can define multiple error patterns and manage them
      per repository_.

      Background (Required)

      Currently, error detection in Pipelines as Code is limited to a single global
      regex pattern. This restricts flexibility, as users may need to detect multiple
      types of errors. Additionally, the configuration is not tied to the repository
      CR, making it less modular and harder to manage on a per-repository basis.

      Approach (Required)

      • Update the error detection configuration to support an array of regex patterns.
      • Allow the error detection configuration to be defined in the repository CR.
      • Ensure backward compatibility with the existing single regex pattern setup.

      Dependencies

      • None identified at this time.

      Acceptance Criteria (Mandatory)

      • Error detection supports an array of regex patterns.
      • Error detection configuration can be defined in the repository CR.
      • Existing single regex pattern configurations continue to work without modification.
      • Documentation is updated to reflect the new configuration options.

      INVEST Checklist

      • Dependencies identified: None
      • Blockers noted: None
      • Design is implementable: Yes
      • Acceptance criteria agreed upon: Pending
      • Story estimated: Pending

      Done Checklist

      • Code is completed, reviewed, documented, and checked in.
      • Unit and integration test automation delivered and running cleanly.
      • Continuous Delivery pipeline(s) can proceed with new code.
      • Customer-facing documentation is updated and published.
      • Acceptance criteria are met.

              rh-ee-akpant Akshay Pant
              cboudjna@redhat.com Chmouel Boudjnah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: