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

Could not determine a constructor for the tag '!reference' #229

Open
kokorin opened this issue May 28, 2024 · 0 comments
Open

Could not determine a constructor for the tag '!reference' #229

kokorin opened this issue May 28, 2024 · 0 comments

Comments

@kokorin
Copy link

kokorin commented May 28, 2024

We changed Gitlab CI Yaml file and added !reference tag like this:

deploy-dev:
   script:
    - !reference [.deploy, script]
    - other commands

pre-commit run gives the following output:

check yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1

could not determine a constructor for the tag '!reference'
  in ".gitlab-ci.yml", line 194, column 7

I found a recommendation to update ruamel version and added dependencies:

default_install_hook_types: [pre-commit, pre-push]
repos:
  # other repos removed
  - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
    rev: v2.13.0
    hooks:
      - id: pretty-format-yaml
        args: [--autofix, --indent, '2', --offset, '2', --preserve-quotes]
        stages: [commit]
        additional_dependencies:
          - 'ruamel.yaml==0.18.6'
          - 'ruamel.yaml.clib==0.2.8'

Unfortunately that didn't help

Python version 3.9.7

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

No branches or pull requests

1 participant