[WIP] Implement missing features from documentation#2859
Merged
Conversation
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot stopped work on behalf of
asim due to an error
February 13, 2026 14:20
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.
Implementation Complete ✅
This PR successfully implements the missing
--headerand--metadataflags for themicro callcommand.Summary of Changes
Problem: Documentation showed TODO comment at
cmd/micro/cli/util/dynamic.go:144indicating--headerand--metadataflags should be implemented but weren't.Solution: Implemented full support for both flags in both call modes (direct and dynamic).
Files Changed
cmd/micro/cli/cli.go
--headerand--metadataflags to thecallcommandcmd/micro/cli/util/dynamic.go
AddMetadataToContexthelper function to parse and apply metadataCallServiceto extract and apply metadata/header flagscmd/micro/cli/util/dynamic_test.go
AddMetadataToContextCode formatting applied to ensure consistency
Usage Examples
Testing & Validation
✅ All unit tests pass (including new metadata tests)
✅ CLI builds successfully
✅ Flags appear in
--helpoutput✅ CodeQL security scan passes (0 alerts)
✅ Code review passes with no issues
✅ Code formatting applied
Architecture
Two code paths both properly handle metadata:
micro call service endpoint json→ cli.go applies metadatamicro service method --flags→ CallService applies metadataBoth paths are necessary and documented with comments.
Verification of Other Commands
During this work, I also verified that other documented commands are implemented:
micro status- implemented in cmd/micro/cli/remote/remote.gomicro logs- implemented in cmd/micro/cli/remote/remote.gomicro stop- implemented in cmd/micro/cli/remote/remote.gomicro deploy- implemented in cmd/micro/cli/deploy/deploy.gomicro init- implemented in cmd/micro/cli/init/init.gomicro build- implemented in cmd/micro/cli/build/build.goAll documented features are now fully implemented! 🎉
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.