Skip to content

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

Merged

Conversation

Mandukhai-Alimaa
Copy link
Contributor

No description provided.

@Mandukhai-Alimaa Mandukhai-Alimaa marked this pull request as ready for review June 30, 2025 21:58
Copy link
Member

@tylerharter tylerharter left a comment

Choose a reason for hiding this comment

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

Looking good!

src/main.go Outdated
Name: "admin",
Usage: "Admin commands for managing lambdas",
UsageText: "ol admin <cmd>",
Subcommands: []*cli.Command{
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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

Copy link
Member

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do this 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)
Copy link
Member

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.

Copy link
Member

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?

@Mandukhai-Alimaa Mandukhai-Alimaa merged commit 87eaa7e into open-lambda:main Jul 15, 2025
1 check passed
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.

2 participants