ansible-galaxy import --token=$(cat ~/.ansible_galaxy_token) bodsch ansible-glauth --role-name glauth --verbose --branch=1.4.1
Using /home/bodsch/.ansible.cfg as config file
Successfully submitted import request ...
unknown field in galaxy_info
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/api/v1/tasks.py", line 127, in legacy_role_import
result = import_legacy_role(checkout_path, namespace.name, importer_config, logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/legacy_role.py", line 51, in import_legacy_role
return _import_legacy_role(dirname, namespace, cfg, logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/legacy_role.py", line 57, in _import_legacy_role
data = LegacyRoleLoader(dirname, namespace, cfg, logger).load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/loaders/legacy_role.py", line 41, in load
self.metadata = self._load_metadata()
^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/loaders/legacy_role.py", line 77, in _load_metadata
return schema.LegacyMetadata.parse(meta_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/schema.py", line 522, in parse
raise exc.LegacyRoleSchemaError("unknown field in galaxy_info") from e
That field was apparently introduced by ansible-lint, but it could be that galaxy-importer got stricter some time ago (the old community Galaxy used an older version of it) and this now clashes with that field. CC @ssbarnea.
I’m wondering if the “-” in https://github.com/bodsch/ansible-glauth/ is messing you up.
In the galaxy-importer, galaxy-importer/constants.py line 61, there’s a broken regex introduced about 3 months ago:
# Matches role names with any combination of lowercase letters,
# uppercase letters, numbers, underscores, and hyphens with
# a length in the inclusive range [1, 55].
LEGACY_ROLE_NAME_REGEXP = re.compile("^[a-zA-Z0-9-_]{1,55}$")
It’s supposed to accept underscores and hyphens, but it doesn’t. Rather it accepts '9' through '_'. It should be
@utoddl does it make sense to move this point about regexes to a new topic? The original request is solved but I think you might have something worth discussing there…
Hard to say. I was searching “upstream” from the “unknown field” message trying to ferret out what field could be the issue, and frankly I didn’t see justification for that wording. Emphasis on “didn’t see” — it could be spot on, but I’d never looked at that code before and wouldn’t bet dessert on what it’s actually doing. When I spotted that regex issue I quit looking.