ol(cli): minimal invoke (POST JSON only; cmdline JSON; -p project)#403
Open
fairozkhan10 wants to merge 2 commits intoopen-lambda:mainfrom
Open
ol(cli): minimal invoke (POST JSON only; cmdline JSON; -p project)#403fairozkhan10 wants to merge 2 commits intoopen-lambda:mainfrom
invoke (POST JSON only; cmdline JSON; -p project)#403fairozkhan10 wants to merge 2 commits intoopen-lambda:mainfrom
Conversation
Author
Update: Ubuntu 24.04 Verification Results 🟢I have successfully verified the implementation on a fresh Ubuntu 24.04 VM with a real OpenLambda worker instance. Test Environment:
Test Cases Executed:
Ready for review! |
Author
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.

This implements the minimal
ol invokeProfessor Caraza-Harter requested:POST-only, JSON-only
Usage:
ol invoke myfunc # POST null body
ol invoke myfunc '{"A":"B"}' # POST JSON body
ol invoke myfunc '{"A":"B"}' -p default-ol # project-aware
Resolves URL like
ol worker upvia deploy dir (default projectdefault-ol).For container-based dev on macOS, it also respects $OL_URL if set (so
OL_URL=http://host.docker.internal:5000 works from inside Docker).
Flags:
-p, --project (project/deploy name)
--pretty (pretty-print JSON)
--timeout N (seconds)
Manual test evidence:
./ol-linux invoke -p default-ol --pretty myfunc
./ol-linux invoke -p default-ol --pretty myfunc '{"A":"B"}'
Both returned 200 with expected echo payloads.
Follow-up:
ol worker up -d -p default-ol)and report results on this PR thread.
Update: Ubuntu 24.04 Verification Results 🟢
I have successfully verified the implementation on a fresh Ubuntu 24.04 VM with a real OpenLambda worker instance.
Test Environment:
go build .)ol worker up -p test-worker)Test Cases Executed:
Project-Aware Lookup:
./ol-linux invoke -p test-worker hello-lambda-exampleSuccess ("hello")JSON Payload (Cmdline):
./ol-linux invoke -p test-worker hello-lambda-example '{"some":"json"}'Success ("hello")Input Validation (Negative Test):
./ol-linux invoke ... '{"broken":"json"'Error: invalid JSONEnd-to-End Latency:
worker.outlogs that the request triggered a sandbox unpause event.Ready for review!