ansible / ansible-builder

An Ansible execution environment builder
Other
287 stars 93 forks source link

ansible-builder version 3 has broken compatibility with schema version 1 #646

Closed Shrews closed 7 months ago

Shrews commented 7 months ago

The builder image is not being used in a v1 EE definition (neither the default value nor the explicitly defined value).

Example A:

---
version: 1

Example B:

---
version: 1
build_arg_defaults:
  EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:latest'
  EE_BUILDER_IMAGE: 'quay.io/ansible/ansible-builder:latest'

Both examples produce a Containerfile that will always use the base image for the builder image. E.g.,

...
# Builder build stage
FROM base as builder
...

It does not appear that we have any tests to cover this situation.

Shrews commented 7 months ago

Problematic line of code...

https://github.com/ansible/ansible-builder/blob/f93844f8221a9215138ee39a3b4f410326561e93/src/ansible_builder/containerfile.py#L127