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 broken gitlab updates #11

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Fix broken gitlab updates #11

merged 1 commit into from
Jan 28, 2025

Conversation

marcelldls
Copy link
Collaborator

This fixes a cryptic error that is raised when gitlab repos attempt a copier update:

[esq51579@pc0146 MY_REPO_NAME]$ copier update .
Updating to template version 4.2.0
Traceback (most recent call last):
  File "/home/esq51579/.local/bin/copier", line 8, in <module>
    sys.exit(copier_app_run())
             ^^^^^^^^^^^^^^^^
  File "/home/esq51579/.local/lib/python3.11/site-packages/plumbum/cli/application.py", line 638, in run
    inst, retcode = subapp.run(argv, exit=False)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esq51579/.local/lib/python3.11/site-packages/plumbum/cli/application.py", line 633, in run
    retcode = inst.main(*tailargs)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/cli.py", line 425, in main
    return _handle_exceptions(inner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/cli.py", line 70, in _handle_exceptions
    method()
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/cli.py", line 415, in inner
    with self._worker(
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 237, in __exit__
    raise value
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/cli.py", line 423, in inner
    worker.run_update()
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 914, in run_update
    self._apply_update()
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 935, in _apply_update
    with replace(
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 237, in __exit__
    raise value
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 944, in _apply_update
    old_worker.run_copy()
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 833, in run_copy
    self._ask()
  File "/home/esq51579/.local/lib/python3.11/site-packages/copier/main.py", line 497, in _ask
    raise ValueError(f"Validation error for question '{var_name}': {err_msg}")
ValueError: Validation error for question 'dls_technical_area': expected string or bytes-like object, got 'Undefined'

I test this locally with the 4.2.1b1 release using copier copy gh:epics-containers/deployment-template-argocd MY_REPO_NAME_2 -r 4.2.1b1 and then copier update . -r 4.2.1b1

Why the validator passes at copier copy time seems like a bug?

@marcelldls marcelldls requested a review from gilesknap January 27, 2025 16:31
Copy link
Member

@gilesknap gilesknap left a comment

Choose a reason for hiding this comment

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

looks good. Thanks. Merging.

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

Successfully merging this pull request may close these issues.

2 participants