Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: parse_image_id: Process "docker build" output in reverse line order #400

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

terminalmage
Copy link
Contributor

@terminalmage terminalmage commented May 18, 2023

When using a custom dockerfile which installs Python modules using pip, the output will sometimes contain the line:

Successfully built module_name

Since this matches one of the regexes in parse_image_id, it causes the module name to be incorrectly identified as the image ID, which will cause kitchen-docker to fail the "docker run" as it will not have a valid Docker image ID.

This commit processes the "docker build" output in reverse line order, which will ensure that the correct line is matched.

Check List

When using a custom dockerfile which installs Python modules using pip,
the output will sometimes contain the line:

Successfully built module_name

Since this matches the regex, it causes the module name to be
incorrectly identified as the image ID, which will cause kitchen-docker
to fail the "docker run" as it will not have a valid Docker image ID.

This commit processes the "docker build" output in reverse line order,
which will ensure that the correct line is matched.
@tas50 tas50 merged commit 380bf91 into test-kitchen:main Jun 14, 2023
@tas50
Copy link
Member

tas50 commented Jun 14, 2023

Thanks @terminalmage

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants