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

Fix spawner_ui_config.yaml to use correct null values for configurations #361

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

ca-scribner
Copy link
Contributor

Previously, the spawner_ui_config.yaml was rendered with empty strings and lists being rendered as null values in the configuration file. For example if the GPU vendors list was empty and the default vendor was "", the config file would have (shown truncated):

  gpus:
    value:
      vendor: 

      vendors: 

whereas jupyter web app expected:

  gpus:
    value:
      vendor: ""

      vendors: []

This commit updates the template to ensure we always output the correct empty values.

Closes #360

@ca-scribner ca-scribner requested a review from a team as a code owner April 26, 2024 23:58
@ca-scribner ca-scribner force-pushed the KF-5604-fix-spawner-for-empty-tolerations branch from 74f5442 to c9e7ca2 Compare April 27, 2024 00:03
Previously, the spawner_ui_config.yaml was rendered with empty strings and lists being rendered as null values in the configuration file.  For example if the GPU vendors list was empty and the default vendor was `""`,  the config file would have (shown truncated):

```
  gpus:
    value:
      vendor:

      vendors:
```

whereas jupyter web app expected:
```
  gpus:
    value:
      vendor: ""

      vendors: []
```

This commit updates the template to ensure we always output the correct empty values.

Closes #360
@ca-scribner ca-scribner force-pushed the KF-5604-fix-spawner-for-empty-tolerations branch from c9e7ca2 to c29851f Compare April 27, 2024 00:21
Copy link
Contributor

@orfeas-k orfeas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and this works. I tested with the following bundle bundle-minimal.yaml.txt (refreshed to this PR's jupyter-ui after deployment) and created a notebook without any configuration and with a combination of all the different configurations. Good job!

@ca-scribner ca-scribner merged commit 211a37b into main Apr 29, 2024
14 checks passed
@ca-scribner ca-scribner deleted the KF-5604-fix-spawner-for-empty-tolerations branch April 29, 2024 13:29
ca-scribner added a commit that referenced this pull request May 1, 2024
…ons (#361)

Previously, the spawner_ui_config.yaml was rendered with empty strings and lists being rendered as null values in the configuration file.  For example if the GPU vendors list was empty and the default vendor was `""`,  the config file would have (shown truncated):

```
  gpus:
    value:
      vendor:

      vendors:
```

whereas jupyter web app expected:
```
  gpus:
    value:
      vendor: ""

      vendors: []
```

This commit updates the template to ensure we always output the correct empty values.

Closes #360

(cherry picked from commit 211a37b)
kimwnasptd pushed a commit that referenced this pull request May 2, 2024
* Enable configuration of New Notebook UI (#345)

(cherry pick of 3ec71e9 from main)

* Enable configuration of New Notebook UI

This commit adds configuration for:
* the default number of GPUs and the GPUs available
* the default PodDefaults selected
* the Toleration configurations available
* the Affinity configurations available

These configurations are enabled through newly exposed charm configs.  These configs are lightly validated to ensure they're valid yaml, but not validated enough to ensure things like Tolerations or Affinities are proper Kubernetes yaml

(cherry picked from commit 3ec71e9)

* Fix spawner_ui_config.yaml to use correct null values for configurations (#361)

Previously, the spawner_ui_config.yaml was rendered with empty strings and lists being rendered as null values in the configuration file.  For example if the GPU vendors list was empty and the default vendor was `""`,  the config file would have (shown truncated):

```
  gpus:
    value:
      vendor:

      vendors:
```

whereas jupyter web app expected:
```
  gpus:
    value:
      vendor: ""

      vendors: []
```

This commit updates the template to ensure we always output the correct empty values.

Closes #360

(cherry picked from commit 211a37b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jupyter-ui cannot create a new notebook
2 participants