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

Onyxia fails to parse some manifests #241

Open
olevitt opened this issue Jun 19, 2023 · 3 comments
Open

Onyxia fails to parse some manifests #241

olevitt opened this issue Jun 19, 2023 · 3 comments

Comments

@olevitt
Copy link
Contributor

olevitt commented Jun 19, 2023

Since the latest dependencies bump it seems Onyxia fails to parse some manifests.
I'm trying to reproduce

2023-06-19 08:48:26.661 ERROR 7 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [/api] threw exception [Request processing failed; nested exception is java.util.concurrent.ExecutionException: while scanning a block scalar
 in reader, line 150, column 26:
    pre-entrypoint-script: |
                           ^
 the leading empty lines contain more spaces (3) than the first non-empty line.
 in reader, line 151, column 1:
    ---
    ^
] with root cause

org.snakeyaml.engine.v2.exceptions.ScannerException: while scanning a block scalar
 in reader, line 150, column 26:
    pre-entrypoint-script: |
                           ^
 the leading empty lines contain more spaces (3) than the first non-empty line.
 in reader, line 151, column 1:
    ---
    ^

	at org.snakeyaml.engine.v2.scanner.ScannerImpl.scanBlockScalar(ScannerImpl.java:1546) ~[snakeyaml-engine-2.6.
@olevitt
Copy link
Contributor Author

olevitt commented Sep 4, 2023

#247 is just a workaround, preventing crash but failing to retrieve URLs due to not being able to parse some manifests.
This issue is therefore still relevant

@johnksv
Copy link
Contributor

johnksv commented Dec 18, 2023

Do you have some example manifests?

@olevitt
Copy link
Contributor Author

olevitt commented Dec 19, 2023

Not sure what exactly triggers the parsing fail but it seems some manifests that are ok with Helm / Kubernetes are not for the parser Onyxia-API (indirectly) uses.
It seems to be edge cases like this one : InseeFrLab/helm-charts-interactive-services#115

command:
            - sh
            - -c
            - |

This does not make much sense in the real life (it was due to a bug in the package) but it's nonetheless allowed by both Helm and Kubernetes so it can happen in real life.
Not sure we can do much to tweak the parser fabric8's kubernetes client so I'm really not hopeful we can solve this issue but at least I added a workaround so that the request does not fail, only the URL won't be retrieved.

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

No branches or pull requests

2 participants