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

CronTab plugin extensions `flags` are invalidly nested inside `properties`

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 4.20
    • Management Console
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • Done
    • Bug Fix
    • Hide
      Before this update, improperly nested `flags` within `properties` in `console-crontab-plugin.json` caused the plugin to break. This update fixes the nesting in the JSON file, resolving the conflict with OCPBUGS-58858. As a result, the plugin now loads and displays CronTabs correctly. (link:https://issues.redhat.com/browse/OCPBUGS-59418[OCPBUGS-59418])
      Show
      Before this update, improperly nested `flags` within `properties` in `console-crontab-plugin.json` caused the plugin to break. This update fixes the nesting in the JSON file, resolving the conflict with OCPBUGS-58858. As a result, the plugin now loads and displays CronTabs correctly. (link: https://issues.redhat.com/browse/OCPBUGS-59418 [ OCPBUGS-59418 ])
    • None
    • None
    • None
    • None

      Within https://github.com/openshift/console-crontab-plugin/blob/main/console-extensions.json, `flags` is improperly nested within `properties`. The corrected file should look as follows.

      [
        {
          "type": "console.flag/model",
          "properties": {
            "flag": "CRONTAB",
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            }
          }
        },
        {
          "type": "console.navigation/resource-ns",
          "properties": {
            "id": "crontab",
            "name": "%plugin__console-crontab-plugin~CronTabs%",
            "perspective": "admin",
            "section": "workloads",
            "insertAfter": "WorkloadsSeparator",
            "insertBefore": "cronjobs",
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            }
          },
          "flags": {
            "required": ["CRONTAB"]
          }
        },
        {
          "type": "console.page/resource/list",
          "properties": {
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "component": {
              "$codeRef": "CronTabList"
            }
          },
          "flags": {
            "required": ["CRONTAB"]
          }
        },
        {
          "type": "console.yaml-template",
          "properties": {
            "name": "default",
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "template": {
              "$codeRef": "yamlTemplates.defaultCronTabYamlTemplate"
            }
          },
          "flags": {
            "required": ["CRONTAB"]
          }
        },
        {
          "type": "console.resource/create",
          "properties": {
            "name": "default",
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "component": {
              "$codeRef": "CronTabForm"
            }
          },
          "flags": {
            "required": ["CRONTAB"]
          }
        },
        {
          "type": "console.resource/details-item",
          "properties": {
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "id": "cronSpec",
            "column": "right",
            "title": "%plugin__console-crontab-plugin~CronSpec%",
            "path": "spec.cronSpec"
          }
        },
        {
          "type": "console.resource/details-item",
          "properties": {
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "id": "image",
            "column": "right",
            "title": "%plugin__console-crontab-plugin~Image%",
            "path": "spec.image"
          }
        },
        {
          "type": "console.resource/details-item",
          "properties": {
            "model": {
              "group": "stable.example.com",
              "kind": "CronTab",
              "version": "v1"
            },
            "id": "replicas",
            "column": "right",
            "title": "%plugin__console-crontab-plugin~Replicas%",
            "path": "spec.replicas"
          }
        }
      ]
      
      

      But making this fix will result in https://issues.redhat.com/browse/OCPBUGS-58858 surfacing, thus breaking the plugin.  This fix should only be made after https://issues.redhat.com/browse/OCPBUGS-58858 is fixed.

              rhn-engineering-rhamilto Robb Hamilton
              rhn-engineering-rhamilto Robb Hamilton
              None
              None
              YaDan Pei YaDan Pei
              Jocelyn Sese Jocelyn Sese
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: