Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Openshift Helm catalog is unable to pull remote JSON schemas on OpenShift Local #64

Closed
tumido opened this issue Jun 2, 2023 · 8 comments · Fixed by #66
Closed

Openshift Helm catalog is unable to pull remote JSON schemas on OpenShift Local #64

tumido opened this issue Jun 2, 2023 · 8 comments · Fixed by #66
Assignees
Labels
kind/bug Something isn't working

Comments

@tumido
Copy link
Member

tumido commented Jun 2, 2023

Clicking the Install Helm chart button results in different outcomes depending on the cluster location:
image

OpenShift Local

image

Developer Sandbox

image

OpenShift (aka remote cluster, non-restricted)

image

I think we need to inline the remote JSON schema references... Unfortunately. This will expose us to copy-paste errors. It's not a great solution.

@tumido tumido added the kind/bug Something isn't working label Jun 2, 2023
@tumido tumido self-assigned this Jun 2, 2023
@tumido
Copy link
Member Author

tumido commented Jun 2, 2023

I'll try to provide a postprocessing step for values.schema.json via https://github.com/APIDevTools/json-schema-ref-parser or similar tool.

@serenamarie125
Copy link

Launching a 4.9 cluster via cluster-bot is also issue, although it produces different results than a 4.13 cluster

BackstageHelmChart-4 9-ClusterBot

@tumido
Copy link
Member Author

tumido commented Jun 5, 2023

@serenamarie125 wow, that is an especially weird one. 😂

I've created sample helm repo from the PR #66 to see if it works. Can you please try creating new Helm repository in the catalog and installing backstage from it? It works for me now in DevSandbox

apiVersion: helm.openshift.io/v1beta1
kind: ProjectHelmChartRepository
metadata:
  name: test-repo
spec:
  connectionConfig:
    url: 'https://raw.githubusercontent.com/tumido/helm-backstage/test-repo'

@tumido
Copy link
Member Author

tumido commented Jun 5, 2023

I've also noticed a weird issue with the Helm Catalog:

Kapture 2023-06-05 at 16 40 39

It takes me to /k8s/ns/<namespace>/helmchartrepositories/test-repo/edit endpoint. When opening the resource by clicking on the name I can edit via YAML tab (/k8s/ns/<namespace>/helm.openshift.io~v1beta1~ProjectHelmChartRepository/test-repo/yaml endpoint) just fine. 😄

Filed as https://issues.redhat.com/browse/ODC-7323

@tumido
Copy link
Member Author

tumido commented Jun 5, 2023

One more interesting finding to the original issue - if you try installing any other chart and select "YAML view" tap in the installation step, this layout selection is remembered so you can back out and retry the Backstage chart without issues. Only the form layout is broken.

Anyway, filed as https://issues.redhat.com/browse/ODC-7324

@tumido tumido closed this as completed in #66 Jun 8, 2023
@tumido
Copy link
Member Author

tumido commented Jun 12, 2023

Reopening, discovered one new issue with this...

Form view is stuck in endless loading if we reference particular schema version.. I need to investigate further and will follow up with yet another bug report....

image

Traced back to: rjsf-team/react-jsonschema-form#2241 - the library used to validate the chart's schema (totally unnecessary to do on the frontend IMO), doesn't support JSON Schema standard 2019-09 and the current revision 2020-20.

Tracking as: https://issues.redhat.com/browse/OCPBUGS-14874

@tumido tumido reopened this Jun 12, 2023
@tumido
Copy link
Member Author

tumido commented Jun 12, 2023

And another... This is partially due to invalid schema upstream, but OCP should not hang on "In progress" indefinitely.
2023-06-12_21-06

This is related to json-schema-org/json-schema-spec#574

Surprisingly helm CLI schema validation handles this just fine.

Tracking as: https://issues.redhat.com/browse/OCPBUGS-14875

Update: As per JSON Schema standard the "format" keyword should only take an advisory role (like an annotation) and should not affect validation. In OCP helm form view it is somehow used during validation.

@tumido
Copy link
Member Author

tumido commented Jun 12, 2023

Last two comments moved into separate issues. Closing this one.

@tumido tumido closed this as completed Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants