nebari-dev / nebari

🪴 Nebari - your open source data science platform
https://nebari.dev
BSD 3-Clause "New" or "Revised" License
279 stars 93 forks source link

[BUG] - Validation error while reading generated config file for Digital Ocean #1972

Open fangchenli opened 1 year ago

fangchenli commented 1 year ago

Describe the bug

The generated config file for Digital Ocean causes a model validation error.

nebari init do --project projectname \
      --domain domain \
      --auth-provider password

The generated config file looks like this:

provider: do
namespace: dev
nebari_version: 2023.7.2.dev28+gf4ab2ac5
project_name: projectname
domain: domain
ci_cd:
  type: none
terraform_state:
  type: remote
security:
  keycloak:
    initial_root_password: yelnf3345fiu51srhu17ytb3a8bh6bx7
  authentication:
    type: password
theme:
  jupyterhub:
    hub_title: Nebari - projectname
    welcome: Welcome! Learn about Nebari's features and configurations in <a href="https://www.nebari.dev/docs">the
      documentation</a>. If you have any questions or feedback, reach the team on
      <a href="https://www.nebari.dev/docs/community#getting-support">Nebari's support
      forums</a>.
    hub_subtitle: Your open source data science platform, hosted on Digital Ocean

Expected behavior

There should be no validation error.

OS and architecture in which you are running Nebari

m1 mac

How to Reproduce the problem?

from ruamel.yaml import YAML

from nebari.plugins import nebari_plugin_manager

yaml = YAML()

config_schema = nebari_plugin_manager.config_schema

with open("nebari-config.yaml") as fp:
    data = yaml.load(fp)
    config = config_schema(**data)

Command output

(nebari-dev) fangchenli@Fangchens-MacBook-Pro-2 nebari-do % python test.py
Traceback (most recent call last):
  File "/Users/fangchenli/Workspace/nebari-do/test.py", line 23, in <module>
    config = config_schema(**data)
  File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ConfigSchema
__root__ -> __root__
  'latin-1' codec can't encode character '\u201c' in position 7: ordinal not in range(256) (type=value_error.unicodeencode)

Versions and dependencies used.

conda 23.7.3

Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3

2023.7.2.dev28+gf4ab2ac5

Compute environment

Digital Ocean

Integrations

No response

Anything else?

No response

iameskild commented 1 year ago

Thanks @fangchenli! I will try to recreate this and follow up.

Adam-D-Lewis commented 4 months ago

We are planning on deprecating Digital Ocean support due to low usage. It could still be deployed on Digital Ocean via an existing cluster deployment. Please comment on the issue if you think we should keep it - https://github.com/nebari-dev/nebari/issues/2542