Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add yaml.constructor.ConstructorError capture #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jianzhangbjz
Copy link
Contributor

To solve issue #84

jiazha-mac:o-must-gather jiazha$ omg use ~/must-gather/must-gather-tp3 
WARNING Resource loaded from /Users/jiazha/must-gather/must-gather-tp3/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-2a156a46709ac22dc63b1231c7450db73a2d90aff74d96e2a42cf040f2f8c78f/cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/alertmanagerconfigs.monitoring.rhobs.yaml is not valid
WARNING Resource loaded from /Users/jiazha/must-gather/must-gather-tp3/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-2a156a46709ac22dc63b1231c7450db73a2d90aff74d96e2a42cf040f2f8c78f/cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/alertmanagerconfigs.monitoring.coreos.com.yaml is not valid
Selected must-gather: /Users/jiazha/must-gather/must-gather-tp3/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256*
            Projects: 79
             API URL: ['https://api.qe-daily-417-0906.qe.devcluster.openshift.com:6443']
            Platform: ['AWS']
          Cluster ID: ['e640061f-6221-4c53-a21c-e40da567c34c']
     Desired Version: ['4.17.0-0.nightly-2024-09-05-082755']

     Current Project: openshift-catalogd

jiazha-mac:o-must-gather jiazha$ omg get clustercatalog
No resources found

@jianzhangbjz
Copy link
Contributor Author

             # yaml load/parse failed
             # try skipping lines from the bottom
             # Until we are able to load the yaml file
             # We will try until > 1 lines are left

I commented the above code since it runs slow and is not much help. It's better to skip the whole file and pop a waring.

ERROR lines_skipped 6637, lines_total 6800
ERROR Skipped 6638/6800 lines from the end of /Users/jiazha/must-gather/must-gather-tp3/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-2a156a46709ac22dc63b1231c7450db73a2d90aff74d96e2a42cf040f2f8c78f/cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/alertmanagerconfigs.monitoring.rhobs.yaml to the load the yaml file properly
...
ERROR lines_skipped 6601, lines_total 13288
ERROR lines_skipped 6602, lines_total 13288
ERROR lines_skipped 6603, lines_total 13288
^C
Aborted!

@jianzhangbjz
Copy link
Contributor Author

Hi @kxr , could you help have a review when you get a chance? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant