-
Notifications
You must be signed in to change notification settings - Fork 128
add tar support for lambdas #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add tar support for lambdas #314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Name: "admin", | ||
Usage: "Admin commands for managing lambdas", | ||
UsageText: "ol admin <cmd>", | ||
Subcommands: []*cli.Command{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's put admin commands to a new file (package?), like we do for with BenchCommands and WorkerCommands
@@ -200,6 +209,40 @@ func shutdown(pidPath string, server cleanable) { | |||
os.Exit(rc) | |||
} | |||
|
|||
// RegistryHandler handles registry requests similar to boss, but uploads to common.Conf.Registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a separate handler, or the the boss and worker use the same code?
@@ -113,11 +113,9 @@ func (cp *HandlerPuller) Pull(name string) (rt_type common.RuntimeType, targetDi | |||
} | |||
|
|||
if cp.isRemote() { | |||
// registry type = web | |||
// registry type = web - only support tar.gz files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isRemote will go away, right? Seems unnecessary if the way we handle a distributed deployment will be a shared file system across workers/boss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking out loud (this could be in the next PR).
|
||
// UploadLambda handles POST /registry/{name} - saves to common.Conf.Registry | ||
func UploadLambda(w http.ResponseWriter, r *http.Request) { | ||
funcName := strings.TrimPrefix(r.URL.Path, REGISTRY_BASE_PATH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be any locking at this level, to prevent concurrent upload of the same file?
``` | ||
|
||
If no `-p` flag is specified, the command will default to the worker running on port 5000 using the default config. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say something about how they can use the examples we provide?
No description provided.