nebari
nebari copied to clipboard
[BUG] - Nebari init fails when using a GitLab repo for the GitOps approach
Describe the bug
When running nebari init
and specifying a GitLab repo, the command fails with the following error:
ââââââââââââââââââââââââââââââââ Traceback (most recent call last) âââââââââââââââââââââââââââââââââŪ
â /usr/local/bin/nebari:8 in <module> â
â â
â 5 from nebari.__main__ import main â
â 6 if __name__ == '__main__': â
â 7 â sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) â
â âą 8 â sys.exit(main()) â
â 9 â
â â
â /usr/local/lib/python3.11/site-packages/nebari/__main__.py:8 in main â
â â
â 5 â
â 6 def main(): â
â 7 â cli = create_cli() â
â âą 8 â cli() â
â 9 â
â 10 â
â 11 # get the click object from the typer app so that we can autodoc the cli â
â â
â /usr/local/lib/python3.11/site-packages/typer/main.py:328 in __call__ â
â â
â /usr/local/lib/python3.11/site-packages/typer/main.py:311 in __call__ â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:1130 in __call__ â
â â
â /usr/local/lib/python3.11/site-packages/typer/core.py:778 in main â
â â
â /usr/local/lib/python3.11/site-packages/typer/core.py:216 in _main â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:1655 in invoke â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:920 in make_context â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:1378 in parse_args â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:2360 in handle_parse_result â
â â
â /usr/local/lib/python3.11/site-packages/click/core.py:2322 in process_value â
â â
â /usr/local/lib/python3.11/site-packages/typer/main.py:994 in wrapper â
â â
â /usr/local/lib/python3.11/site-packages/_nebari/subcommands/init.py:797 in guided_init_wizard â
â â
â 794 â â â â qmark=qmark, â
â 795 â â â ).unsafe_ask() â
â 796 â â â â
â âą 797 â â â inputs.repository = repo_url.format( â
â 798 â â â â git_provider=git_provider, org_name=org_name, repo_name=repo_name â
â 799 â â â ) â
â 800 â
â â
â in pydantic.main.BaseModel.__setattr__:384 â
â°âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŊ
ValidationError: 1 validation error for InitInputs
repository
string does not match regex "^(https://)?github.com/([^/]+)/([^/]+)/?$" (type=value_error.str.regex; pattern=^(https://)?github.com/([^/]+)/([^/]+)/?$)
Expected behavior
I expect nebari init
to work properly and create the configuration file according to the options I selected.
OS and architecture in which you are running Nebari
Linux ip-172-31-3-104 6.2.0-1017-aws #17~22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
How to Reproduce the problem?
Go over the nebari init --guided-init
and in the GitOps section try the following:
ðŠī This next section is optional but recommended. If you wish to adopt a GitOps approach to managing this platform, we will walk you through a set of questions to get that
setup. With this setup, Nebari will use GitHub Actions workflows (or GitLab equivalent) to automatically handle the future deployments of your infrastructure.
Would you like to adopt a GitOps approach to managing Nebari? Yes
Which git provider would you like to use? gitlab.com
Which user or organization will this repository live under? (https://gitlab.com/<org-name>/) some-org
And what will the name of this repository be? (https://gitlab.com/some-org/<repo-name>) some-repo
Command output
No response
Versions and dependencies used.
nebari==2024.1.1
Compute environment
None
Integrations
No response
Anything else?
@kalpanachinnappan originally found about this issue