Skip to content

Fix script args with DMR#1859

Merged
rumpl merged 2 commits intodocker:mainfrom
dgageot:fix-script-args
Feb 27, 2026
Merged

Fix script args with DMR#1859
rumpl merged 2 commits intodocker:mainfrom
dgageot:fix-script-args

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 26, 2026

Fixes #1852

Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot requested a review from a team as a code owner February 26, 2026 12:47
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR effectively fixes the script args handling issue by ensuring all properties have a type field. The implementation uses a two-layer approach:

  1. defaultPropertyTypes in script_shell.go: Adds default "string" type to top-level script shell arguments that lack a type
  2. ensurePropertyTypes in schema.go: Recursively adds default "object" type to any remaining nested properties

The code refactoring (moving ConvertParametersToSchema to a separate file) improves organization. All changes are well-tested with comprehensive test coverage for nested properties, array items, and deeply nested structures.

No issues found. This PR looks good! ✅

@dgageot dgageot changed the title Fix script args Fix script args with DMR Feb 26, 2026
@rumpl rumpl merged commit 5077236 into docker:main Feb 27, 2026
8 checks passed
@dgageot dgageot deleted the fix-script-args branch February 27, 2026 19:37
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

Successfully merging this pull request may close these issues.

JSON schema conversion failed

2 participants