Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4738

Resolve type errors after enabling `strictNullChecks` in console/frontend

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Enable `strictNullChecks` in the console/frontend and fix all build errors. This is mandatory for the i18next >22 version upgrade and might be required for other console dependencies in the future. And in addition, this will further help prevent unexpected runtime errors caused by null or undefined values.

      Total Errors at the start of Spike: 13,448

      Progress so far
      Remaining errors about: 10,500 

      A.C.

      • Create an inventory of effected static plugins.
      • Reach out to the owners to carry out the fix (TBD - lets discuss this item once we have a clear picture how to move forward)
      • This command can be used to get the total number of TypeScript errors when `strictNullChecks` is enabled:

                  `npx tsc --noEmit | wc -l`

      List number of errors for every file in the current directory: npx tsc --noEmit

       

          1.
          Enable strickNullCheck for package/console-app/src/actions Sub-task To Do Undefined Krish Agarwal
          2.
          Enable strictNullChecks: true for frontend/components Sub-task To Do Undefined Unassigned
          3.
          Enable strictNullChecks: true for frontend/dev-console Sub-task To Do Undefined Krish Agarwal
          4.
          Enable strictNullChecks: true for frontend/operator-lifecycle-manager and frontend/operator-lifecycle-manager-v1 Sub-task To Do Undefined Krish Agarwal
          5.
          Enable strictNullChecks: true for frontend/knative-plugin Sub-task To Do Undefined Krish Agarwal
          6.
          Enable strictNullChecks: true for frontend/insights-plugin and frontend/helm-plugin Sub-task To Do Undefined Krish Agarwal
          7.
          Enable strickNullCheck for packages/console-app/src/components/{access-modes | admission-webhook-warnings | packages/console-app/src/components/cluster-configuration } Sub-task To Do Undefined Krish Agarwal
          8.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/console-operator | dashboards-page | detect-namespace} Sub-task To Do Undefined Krish Agarwal
          9.
          packages/console-app/src/components/{packages/console-app/src/components/detect-language| detect-perspective | favorite | flags | guided-tour} Sub-task To Do Undefined Krish Agarwal
          10.
          packages/console-app/src/components/{packages/console-app/src/components/ lightspeed | modals | nav | file-upload} Sub-task To Do Undefined Krish Agarwal
          11.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/ nodes | oauth-config | PDB} Sub-task To Do Undefined Krish Agarwal
          12.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/resource-quota | quick-starts | tour | tabs | vpa | storage} Sub-task To Do Undefined Krish Agarwal
          13.
          packages/console-app/src/components/{packages/console-app/src/components/volume-modes | volume-snapshots |user-preferences } Sub-task To Do Undefined Krish Agarwal
          14.
          Enable strictNullChecks: true for frontend/components Sub-task To Do Undefined Unassigned
          15.
          Enable strictNullChecks: true for frontend/dev-console Sub-task Review Undefined Krish Agarwal
          16.
          Enable strictNullChecks: true for frontend/operator-lifecycle-manager and frontend/operator-lifecycle-manager-v1 Sub-task Review Undefined Krish Agarwal
          17.
          Enable strictNullChecks: true for frontend/knative-plugin Sub-task Review Undefined Krish Agarwal
          18.
          Enable strictNullChecks: true for frontend/insights-plugin and frontend/helm-plugin Sub-task Review Undefined Krish Agarwal
          19.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/ nodes | oauth-config | PDB} Sub-task Review Undefined Krish Agarwal

              rh-ee-kragarwa Krish Agarwal
              rh-ee-kragarwa Krish Agarwal
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: