-
Notifications
You must be signed in to change notification settings - Fork 383
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
ci: indentation failure - why!? #1701
Comments
It's fine on main |
I think so, it mayyyyyy be related to rebuilding the image if its failing there, which makes chartpress do things it otherwise may not do. |
Okay this is what goes wrong: binderhub/testing/local-binder-k8s-hub/install-jupyterhub-chart Lines 38 to 39 in 2b824a5
Apparently this file dump doesn't represent the original YAML content. |
From the binderhub repo's folder, this returns correct indentation (with non-critical indentation mistakes in the original python code) - so reading data is fine. import os
from ruamel import yaml
with open(os.path.join("helm-chart", "binderhub", "values.yaml")) as values_in:
read_values = yaml.safe_load(values_in)
print(read_values["jupyterhub"]["singleuser"]["cmd"][2]) import os
import sys
try:
import jupyterlab
import jupyterlab.labapp
major = int(jupyterlab.__version__.split(".", 1)[0])
except Exception as e:
print("Failed to import jupyterlab: {e}", file=sys.stderr)
have_lab = False
else:
have_lab = major >= 3
if have_lab:
# technically, we could accept another jupyter-server-based frontend
print("Launching jupyter-lab", file=sys.stderr)
exe = "jupyter-lab"
else:
print("jupyter-lab not found, launching jupyter-notebook", file=sys.stderr)
exe = "jupyter-notebook"
# launch the notebook server
os.execvp(exe, sys.argv) |
Reading, writing, and then makes it reproduce the issue. Since import os
from ruamel import yaml
with open(os.path.join("helm-chart", "binderhub", "values.yaml")) as values_in:
read_values = yaml.safe_load(values_in)
print(read_values["jupyterhub"]["singleuser"]["cmd"][2])
with open("dump.yaml", "w") as values_out:
yaml.safe_dump(read_values["jupyterhub"], values_out)
with open("dump.yaml") as values_in_again:
read_values = yaml.safe_load(values_in_again)
print(read_values["singleuser"]["cmd"][2]) |
We error in the k8s 1.26 / main test, because the built pod can fail to startup because of an indentation error in
singleuser.cmd
.But we don't have an indentation error in the provided config:
binderhub/helm-chart/binderhub/values.yaml
Lines 213 to 231 in 9cdae11
Yet we have it in the pod based on k8s namespace report:
![image](https://private-user-images.githubusercontent.com/3837114/239833891-933226ea-5fc5-4c72-aed9-cdc4e85b5d9e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMjU3OTMsIm5iZiI6MTcyMTEyNTQ5MywicGF0aCI6Ii8zODM3MTE0LzIzOTgzMzg5MS05MzMyMjZlYS01ZmM1LTRjNzItYWVkOS1jZGM0ZTg1YjVkOWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTZUMTAyNDUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjY2NTdmOGMzZDM4NTQwYjAzZDUyMzhjNWQ5OTViZDgzZDllYjJhMzVhYjhiY2JhZjE3NGY4NTdjYzU4ZDdlMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.T5B6HaQpUwwaGJuCb2fWINOs8uEWOZlhdsQonZJY1EY)
Is the singleuser.cmd processed in any way by us or
helm
making this happen? Is variable expansion involved adding a space or similar?The text was updated successfully, but these errors were encountered: