Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-2572

remove un-used conditional

    XMLWordPrintableJSON

Details

    Description

      look into this conditional:

      if intValue < 0 {
                  return nil, fmt.Errorf("negative resources not permitted: %v", configMap)
      }
      

      This will never be used because regrex defined here. not including "-" as a starting char

      Thus, it will never omit error about negative resource, instead it will raise invalid quantity error at https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L74 .

      Attachments

        Issue Links

          Activity

            People

              ryankert Hsien-Cheng(Ryan) Huang
              ryankert Hsien-Cheng(Ryan) Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: