Skip to content

Retry image inspect without .Variant on template errors and add tests#62

Merged
jooh merged 1 commit intomainfrom
codex/fix-dev-container-composeprojectname-assignment
Apr 22, 2026
Merged

Retry image inspect without .Variant on template errors and add tests#62
jooh merged 1 commit intomainfrom
codex/fix-dev-container-composeprojectname-assignment

Conversation

@jooh
Copy link
Copy Markdown
Owner

@jooh jooh commented Apr 22, 2026

Motivation

  • Some engines return a template evaluation error when {{.Variant}} is absent, causing image inspection to fail during UID-update preparation.
  • Ensure compose project naming covers the case where the compose file lives in the workspace root.

Description

  • Add a fallback format constant UID_UPDATE_IMAGE_INSPECT_FORMAT_NO_VARIANT that omits {{.Variant}} and retry inspection when the template evaluation fails.
  • Introduce is_missing_variant_template_error, inspect_image_details_without_variant, and factor parsing into parse_image_inspect_details to centralize inspect output handling.
  • Update inspect_image_details_for_uid_update_once to detect the variant-template error and retry with the no-variant format.
  • Add tests compose_project_name_defaults_to_compose_working_dir_basename and prepare_up_image_retries_image_inspect_without_variant_template_for_podman, and extend the fake engine fixture script to simulate variant vs. non-variant inspect outputs.

Testing

  • Ran unit tests with cargo test for the devcontainer runtime package.
  • The new tests compose_project_name_defaults_to_compose_working_dir_basename and prepare_up_image_retries_image_inspect_without_variant_template_for_podman executed and passed.
  • Existing compose and UID-update related tests also executed and passed.

Codex Task

@jooh
Copy link
Copy Markdown
Owner Author

jooh commented Apr 22, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jooh jooh merged commit 4979db2 into main Apr 22, 2026
4 checks passed
@jooh jooh deleted the codex/fix-dev-container-composeprojectname-assignment branch April 22, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant