fn doc: remove invalid --stdin flag from docker run args#4577
Merged
Conversation
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes kpt fn doc when running functions via Docker by removing the unsupported --stdin flag from the container runtime run arguments, while keeping stdin open via -i for backward compatibility with functions that still read stdin even for --help.
Changes:
- Remove
--stdinfrom thedocker runargument list used bykpt fn doc. - Keep
-iand the piped emptyResourceListstdin to preserve compatibility for older functions expecting input.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The --stdin flag is podman-only and causes 'unknown flag' errors with Docker. The -i flag alone is sufficient to keep stdin open for piping the empty ResourceList. Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
e981431 to
0a62afb
Compare
liamfallon
approved these changes
Jun 10, 2026
mozesl-nokia
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
--stdinfrom docker run args inkpt fn doc.--stdinis a podman-only flag — Docker doesn't recognise it and fails withunknown flag: --stdin. The-iflag alone keeps stdin open, which is all that's needed to pipe the empty ResourceList for backward compat with older functions.Introduced in 3998a5d as a workaround for functions that read stdin even when
--helpis passed. With SDK v1.0.4 (AsMainchecksos.Argsfor--help/--docbefore reading stdin) the workaround is unnecessary for migrated functions, but-i+ the piped empty ResourceList still covers old ones.AI assisted, author has fully verified all code.