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

Move workflow to its own database/api #1204

Merged
merged 10 commits into from
Aug 9, 2019
Merged

Conversation

antho1404
Copy link
Member

@antho1404 antho1404 commented Aug 3, 2019

Dependency #1201

There is a lot of copy/paste from the existing service SDK/API. I didn't change the workflow engine, just moved it from workflow to engine package

  • package workflow with the definition
  • remove workflows from services
  • create protobuf type
  • create workflow SDK
  • create workflow API
  • update the workflow engine to use workflow SDK.

Now there is 4 new apis:

  • Workflow.Create
  • Workflow.Delete
  • Workflow.Get
  • Workflow.List

When we create the workflow, all the instances will be validated and once recorded in the database the workflow engine will start to process executions related to this workflow.
There is no need to deploy a service with no source code.

@antho1404 antho1404 self-assigned this Aug 3, 2019
@antho1404 antho1404 added enhancement New feature or request waiting dependent pr labels Aug 3, 2019
@antho1404 antho1404 added this to the next milestone Aug 3, 2019
@antho1404 antho1404 requested review from NicolasMahe and krhubert and removed request for NicolasMahe August 3, 2019 13:53
@antho1404 antho1404 marked this pull request as ready for review August 3, 2019 13:53
@krhubert
Copy link
Contributor

krhubert commented Aug 5, 2019

Why you want to move workflow package to the engine. It's rather a general name and also the name of main repo.

@antho1404
Copy link
Member Author

Why you want to move workflow package to the engine. It's rather a general name and also the name of main repo.

We have now a model called workflow and the workflow engine that is connecting the workflow definition to the executions so this cannot be in the same package.

We could go with workflow_engine but https://blog.golang.org/package-names.

I'm open for suggestions on the name for this package or just keep it as it is

@NicolasMahe
Copy link
Member

Why you want to move workflow package to the engine. It's rather a general name and also the name of main repo.

We have now a model called workflow and the workflow engine that is connecting the workflow definition to the executions so this cannot be in the same package.

We could go with workflow_engine but https://blog.golang.org/package-names.

I'm open for suggestions on the name for this package or just keep it as it is

let's keep it like this for this PR and change it in a future PR.
I suggest to group all workflow stuff in one folder with multiple subpackage (lib approach):

workflow
|  types
|  engine
|  ....

workflow/type.go Outdated Show resolved Hide resolved
Co-Authored-By: Nicolas Mahé <nicolas@mesg.com>
@antho1404
Copy link
Member Author

Another PR created for the renaming #1208
Let's validate/merge this one if it's ok and discuss on the other PR

@krhubert
Copy link
Contributor

krhubert commented Aug 8, 2019

@antho1404 just to remind you you can use "github.com/golang/protobuf/jsonpb" package to do conversion the same way as for pbstruct. Not necessary in this pr

@antho1404 antho1404 merged commit 8236363 into dev Aug 9, 2019
@antho1404 antho1404 deleted the feature/workflow-ressource branch August 9, 2019 01:41
@NicolasMahe NicolasMahe modified the milestones: next, v0.13.0 Aug 16, 2019
@NicolasMahe NicolasMahe added the release:change Pull requests that change something existant label Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release:change Pull requests that change something existant waiting dependent pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants