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

Ensure proper Git URL formatting for gitlab

XMLWordPrintable

    • 1

      Here's the Jira ticket following the requested format:

      Story

      As a Konflux user trying to create a component via the UI, I want proper validation of Git URLs so that I don't encounter cryptic errors from Pipelines as Code later.

      When users create components in Konflux UI, they can enter Git repository URLs without proper protocol schemes (like "https://"). This leads to confusing errors in Pipelines as Code when trying to interact with the repository. We should validate URLs at input time to prevent malformed URLs from being stored.

      Background

      • User encountered error "unsupported protocol scheme" when trying to run pipelines
      • Root cause was missing "https://" in Git URL when creating component
      • PAC fails with cryptic error when processing these URLs
      • Konflux UI PR #125 already implements automatic https prefixing, but we need proper validation
      • Related build-service PR #384 exists but is stalled

      Out of scope

      • Changes to PAC error messaging (handled in separate issue)
      • Changes to how PAC processes URLs

      Approach

      1. Add URL validation to Konflux UI component creation form:

      • Must include protocol (http:// or https://)
      • Must be parseable by standard URL parser
      • Show clear error message if invalid
        2. Ensure validation happens both:
      • During input (onChange)
      • Before submission (onSubmit)
        3. Update backend validation in build-service to match

      Dependencies

      • KONFLUX-7692 - Related UI bug
      • konflux-ci/konflux-ui#125 - Existing PR for URL handling
      • konflux-ci/build-service#384 - Related build-service PR

      Acceptance Criteria

      1. UI shows clear error when:

      • URL has no protocol
      • URL is malformed (e.g., contains spaces)
      • URL cannot be parsed
        2. Form cannot be submitted with invalid URL
        3. Valid URLs (http://, https://) are accepted
        4. Backend validation rejects invalid URLs with appropriate error
        5. Existing components with invalid URLs are handled gracefully

      INVEST Checklist

      [x] Dependencies identified
      [x] Blockers noted and expected delivery timelines set
      [x] Design is implementable
      [x] Acceptance criteria agreed upon
      [ ] Story estimated

              cboudjna@redhat.com Chmouel Boudjnah
              cboudjna@redhat.com Chmouel Boudjnah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 minute
                  1m
                  Remaining:
                  Remaining Estimate - 1 minute
                  1m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified