Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-35196

Insights API - duration attribute validation pattern is not correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.16
    • Insights Operator
    • Moderate
    • No
    • CCXDEV Sprint 130
    • 1
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • Done

      The following Insights APIs use duration attributes:

      • insightsoperator.operator.openshift.io
      • datagathers.insights.openshift.io

      The kubebuilder validation patterns are defined as

      ^0|([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
      

      and

      ^([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
      

      Unfortunately this is not enough and it fails in case of updating the resource e.g with value "2m0s".

      The validation pattern must allow these values.

              tremes1@redhat.com Tomas Remes
              tremes1@redhat.com Tomas Remes
              baiyang zhou baiyang zhou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: