Skip to content
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

Bug: Lua runtime - marshaling arrays #6655

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/howto/hooks/lua.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ For more examples and configuration samples, check out the [examples/hooks/](htt

The Lua runtime embedded in lakeFS is limited for security reasons. The provided APIs are shown below.

### `array(table)`

Helper function to mark a table object as an array for the runtime by setting `_is_array: true` metatable field.

### `aws/s3.get_object(bucket, key)`

Returns the body (as a Lua string) of the requested object and a boolean value that is true if the requested object exists
Expand Down
2 changes: 2 additions & 0 deletions pkg/actions/lua/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/treeverse/lakefs/pkg/actions/lua/storage/gcloud"
"github.com/treeverse/lakefs/pkg/actions/lua/strings"
"github.com/treeverse/lakefs/pkg/actions/lua/time"
"github.com/treeverse/lakefs/pkg/actions/lua/util"
"github.com/treeverse/lakefs/pkg/actions/lua/uuid"
)

Expand All @@ -29,6 +30,7 @@ import (
func Open(l *lua.State, ctx context.Context, cfg OpenSafeConfig) {
regexp.Open(l)
strings.Open(l)
util.Open(l)
json.Open(l)
yaml.Open(l)
time.Open(l)
Expand Down
Loading