-
Notifications
You must be signed in to change notification settings - Fork 150
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
Feature/workflows #3045
Merged
Merged
Feature/workflows #3045
Conversation
This file contains 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
Feature/workflows
…nto workflows/taskDefinitionResolvers
…me field adding to workflow table
…tionResolvers updating advanced task resolver and permissions
…teWorkflowsAPIchanges Workflows/add and update workflows ap ichanges
timclifford
reviewed
Mar 4, 2022
@@ -616,3 +671,74 @@ const getAdvancedTaskTarget = advancedTask => { | |||
} | |||
}; | |||
|
|||
// const advancedTaskFunctions = sqlClientPool => { |
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.
FYI: commented out code
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.
The following PR introduces the "Workflows" feature to Lagoon.
Essentially this is an extension of the custom task system that allows users to specify tasks that respond to standard Lagoon events. Post deployment, for instance, we may need to run some custom image based task in the namespace.
API Changes
This introduces changes to the api to add/remove/resolve workflows, as well as making some changes to the custom task system (as well as their associated type changes):
Perhaps most important is the structure of the workflow.
The important point here is the "event" type. Currently the events recognized are defined here https://github.com/uselagoon/lagoon/blob/14fd77347ad940e3aee2a4d8ce2d878fec328f0b/services/workflows/internal/lagoonclient/eventClassification.go
New service introduced
This PR also introduces the service ("workflows") that watches the "lagoon-log" queue for incoming events. On an event, workflows will query the API to determine if there is an associated workflow for the project and, if there's a match, it will invoke workflow.
Checklist
Explain the details for making this change. What existing problem does the pull request solve?
Closing issues
Put
closes #XXXX
in your comment to auto-close the issue that your PR fixes (if such).