Bug 1822437 - Instances tab of a CRD will try to load with an API version that is not served
Summary: Instances tab of a CRD will try to load with an API version that is not served
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.4.z
Assignee: Joe Caiani
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On: 1819028
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-09 01:54 UTC by bpeterse
Modified: 2020-07-06 20:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: used deprecated version api Consequence: caused instances tab of crd to load with a version thats not the latest Fix: use versions array api instead Result: get the latest version instances for a crd
Clone Of: 1819028
Environment:
Last Closed: 2020-07-06 20:47:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5552 0 None closed [release-4.4] Bug 1822437: Fix instances / version issue with crd pages 2020-06-30 01:20:13 UTC
Red Hat Product Errata RHBA-2020:2786 0 None None None 2020-07-06 20:47:33 UTC

Description bpeterse 2020-04-09 01:54:39 UTC
+++ This bug was initially created as a clone of Bug #1819028 +++

Create a CRD with multiple versions, the oldest of which has served:false, and going to the CRD's Instances tab will result in nothing in the tab and dev tools console showing:

kindObj: no model for kind autoscaling.k8s.io~v1beta1~VerticalPodAutoscaler
No model registered for autoscaling.k8s.io~v1beta1~VerticalPodAutoscaler

The error also impacts the CRD UI within the Operator details page. However, if I go to the API Explorer and find one of the versions of the object that is served, I can go to its Instances tab successfully.

Example of a CRD that causes the failure:



---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: verticalpodautoscalers.autoscaling.k8s.io
spec:
  group: autoscaling.k8s.io
  scope: Namespaced
  names:
    plural: verticalpodautoscalers
    singular: verticalpodautoscaler
    kind: VerticalPodAutoscaler
    shortNames:
      - vpa
  version: v1beta1
  versions:
    - name: v1beta1
      served: false
      storage: false
    - name: v1beta2
      served: true
      storage: true
    - name: v1
      served: true
      storage: false
  validation:
    # openAPIV3Schema is the schema for validating custom objects.
    openAPIV3Schema:
      properties:
        spec:
          type: object
          required: []
          properties:
            targetRef:
              type: object
            updatePolicy:
              type: object
              properties:
                updateMode:
                  type: string
            resourcePolicy:
              type: object
              properties:
                containerPolicies:
                  type: array
                  items:
                    type: object

Comment 3 Joe Caiani 2020-05-08 17:01:29 UTC
moving to upcoming sprint: the fix for this is currently in code review for 4.5. that will be merged and cherry picked to the 4.4.z stream in the upcoming sprint.

Comment 8 shahan 2020-06-28 06:40:17 UTC
1. Create CRD using the YAML in description
2. Goes to Instances tab, now it shows 'No VerticalPodAutoscalers Found' and a 'Create VerticalPodAutoscaler' button

loaded autoscaling.k8s.io~v1~VerticalPodAutoscaler is shown in JS console, no warnings

4.4.0-0.nightly-2020-06-27-171816

Comment 10 errata-xmlrpc 2020-07-06 20:47:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2786


Note You need to log in before you can comment on or make changes to this bug.