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

Allow adding hooks without depending on an external service #4779

Merged
merged 7 commits into from
Dec 12, 2022

Conversation

ozkatz
Copy link
Collaborator

@ozkatz ozkatz commented Dec 11, 2022

It may look like many lines of code, but this is mostly due to vendoring (and internally forking) shopify/goluago.

A detailed proposal, including user story is under design/open/zero-deployment-hooks.md

@ozkatz ozkatz added area/hooks improvements or additions to the hooks subsystem team/versioning-engine Team versioning engine labels Dec 11, 2022
@ozkatz ozkatz self-assigned this Dec 11, 2022
@ozkatz ozkatz changed the title Experiment/lua vm Allow adding hooks without dependending on an external service Dec 11, 2022
@ozkatz ozkatz added the include-changelog PR description should be included in next release changelog label Dec 11, 2022
@ozkatz ozkatz changed the title Allow adding hooks without dependending on an external service Allow adding hooks without depending on an external service Dec 11, 2022
@nopcoder
Copy link
Contributor

  • Think it would have been easy to have the proposal and the code in two different PRs.
  • github.com/Shopify/goluago was added to go.mod there is no need to add the code also to our repository
  • Instead of calling the server wrapping the controller on the server will have the same effect - just settings the current user on the context and all the rest should be the same.
  • Do you prefer to take the code as an experiment and tune it on a different PR (after you disable the lua action type)?

General note about the mechanicam - a lot of systems uses Lua as the engine to drive the hooks - so instead of having a set of yaml files trigger set of lua files, like in neovim you have init.lua and all the reset are functions and events you register to triggered by the system. By leverage the lua runtime and registering the right functions the user can build a complete DAG or a system using Lua - have single or multiple steps in parallel or in serial. No more compile time to register new hooks - you can have the current hooks system implemented in lua. (hope I was clear on what I was trying to suggest here)

@ozkatz ozkatz requested a review from nopcoder December 12, 2022 11:40
Copy link
Contributor

@nopcoder nopcoder left a comment

Choose a reason for hiding this comment

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

Excited experiment

@ozkatz ozkatz merged commit 47cbde4 into master Dec 12, 2022
@ozkatz ozkatz deleted the experiment/lua-vm branch December 12, 2022 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hooks improvements or additions to the hooks subsystem include-changelog PR description should be included in next release changelog team/versioning-engine Team versioning engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Experiment: Allow adding hooks to lakeFS without depending on an external system
2 participants