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

unable to specify tags in execution-environment.yml #620

Closed
mwtrigg opened this issue Oct 11, 2023 · 2 comments
Closed

unable to specify tags in execution-environment.yml #620

mwtrigg opened this issue Oct 11, 2023 · 2 comments

Comments

@mwtrigg
Copy link

mwtrigg commented Oct 11, 2023

When specifying the following in my yml file

options:
  tags:
    - environment:latest

The command immediately fails and spits out this return:

jsonschema.exceptions.ValidationError: Additional properties are not allowed ('tags' was unexpected)

Failed validating 'additionalProperties' in schema['properties']['options']:
    {'additionalProperties': False,
     'description': 'Options that effect runtime behavior',
     'properties': {'container_init': {'additionalProperties': False,
                                       'description': 'Customize container '
                                                      'startup behavior',
                                       'properties': {'cmd': {'description': 'literal '
                                                                             'value '
                                                                             'for '
                                                                             'CMD '
                                                                             'Containerfile '
                                                                             'directive',
                                                              'type': 'string'},
                                                      'entrypoint': {'description': 'literal '
                                                                                    'value '
                                                                                    'for '
                                                                                    'ENTRYPOINT '
                                                                                    'Containerfile '
                                                                                    'directive',
                                                                     'type': 'string'},
                                                      'package_pip': {'description': 'package '
                                                                                     'to '
                                                                                     'install '
                                                                                     'via '
                                                                                     'pip '
                                                                                     'for '
                                                                                     'entrypoint '
                                                                                     'support',
                                                                      'type': 'string'}},
                                       'type': 'object'},
                    'package_manager_path': {'description': 'Path to the '
                                                            'system '
                                                            'package '
                                                            'manager to '
                                                            'use',
                                             'type': 'string'},
                    'relax_passwd_permissions': {'description': 'allows '
                                                                'GID0 '
                                                                'write '
                                                                'access to '
                                                                '/etc/passwd; '
                                                                'currently '
                                                                'necessary '
                                                                'for many '
                                                                'uses',
                                                 'type': 'boolean'},
                    'skip_ansible_check': {'description': 'Disables the '
                                                          'check for '
                                                          'Ansible/Runner '
                                                          'in final image',
                                           'type': 'boolean'},
                    'user': {'description': 'Sets the username or UID',
                             'type': 'string'},
                    'workdir': {'description': 'Default working directory, '
                                               'also often the homedir for '
                                               'ephemeral UIDs',
                                'type': ['string', 'null']}},
     'type': 'object'}

On instance['options']:
    {'tags': 'environment:latest'}

During handling of the above exception, another exception occurred:
ansible_builder.exceptions.DefinitionError: Additional properties are not allowed ('tags' was unexpected)

When removing that from my yml, and adding --tag=environment:latest the command proceeds.

I appear to be following the syntax as documented.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Oct 11, 2023
@Shrews
Copy link
Contributor

Shrews commented Oct 11, 2023

This is a new feature in an unreleased version. The stable release version of the builder documentation (https://ansible.readthedocs.io/projects/builder/en/stable/definition/#options) does not mention this tag (if you select the latest version of that documentation, that will be the unreleased version of the docs).

@Shrews Shrews removed the needs_triage New item that needs to be triaged label Oct 11, 2023
@Shrews
Copy link
Contributor

Shrews commented Oct 19, 2023

Seems to be a mismatch between doc version being referenced and builder version in use, so closing this issue.

@Shrews Shrews closed this as completed Oct 19, 2023
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

2 participants