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

Remove trigger type for workflows #1229

Merged
merged 15 commits into from
Aug 16, 2019
Merged

Remove trigger type for workflows #1229

merged 15 commits into from
Aug 16, 2019

Conversation

antho1404
Copy link
Member

@antho1404 antho1404 commented Aug 15, 2019

The trigger now has 2 fields

  • taskKey
  • eventKey
    instead of a generic key (that was confusing with the nodeKey).
    The proto definition now uses a oneof for this.

I also changed the scheduler to have two functions for processEvent and processResult this creates a bit of duplication but makes it much easier.

TEST:

You can still take the services dataset from #1209
but the workflows need to be updated with:

// event
{"key":"event","trigger":{"instanceHash":"EKaTkkmNpAJeikEMvSTNNZeM6et7kS9iyU77QrAPAMqx","eventKey":"eventX","nodeKey":"task1"},"nodes":[{"key":"task1","instanceHash":"CVyX2UwCSiCvmUEybXw6cu4ABSoHbDVgTyvx8UgXXP7B","taskKey":"taskY"},{"key":"task2","instanceHash":"FXGpKzcEHMnyr2BQrH44Dq2SoAYtjw1C7qNRVGbxTNpa","taskKey":"taskZ"}],"edges":[{"src":"task1","dst":"task2"}]}

// result
{"key":"result","trigger":{"instanceHash":"EKaTkkmNpAJeikEMvSTNNZeM6et7kS9iyU77QrAPAMqx","taskKey":"taskX","nodeKey":"task1"},"nodes":[{"key":"task1","instanceHash":"CVyX2UwCSiCvmUEybXw6cu4ABSoHbDVgTyvx8UgXXP7B","taskKey":"taskY"},{"key":"task2","instanceHash":"FXGpKzcEHMnyr2BQrH44Dq2SoAYtjw1C7qNRVGbxTNpa","taskKey":"taskZ"}],"edges":[{"src":"task1","dst":"task2"}]}

// result from other workflow
{"key":"result-from-other-workflow","trigger":{"instanceHash":"CVyX2UwCSiCvmUEybXw6cu4ABSoHbDVgTyvx8UgXXP7B","taskKey":"taskY","nodeKey":"task1"},"nodes":[{"key":"task1","instanceHash":"FXGpKzcEHMnyr2BQrH44Dq2SoAYtjw1C7qNRVGbxTNpa","taskKey":"taskZ"}],"edges":[]}

@antho1404 antho1404 added this to the next milestone Aug 15, 2019
@antho1404 antho1404 self-assigned this Aug 15, 2019
@antho1404 antho1404 requested review from NicolasMahe and krhubert and removed request for NicolasMahe August 15, 2019 07:20
scheduler/scheduler.go Outdated Show resolved Hide resolved
server/grpc/api/workflow.go Show resolved Hide resolved
workflow/type.go Outdated Show resolved Hide resolved
workflow/type.go Outdated Show resolved Hide resolved
workflow/workflow.go Outdated Show resolved Hide resolved
protobuf/types/workflow.proto Outdated Show resolved Hide resolved
protobuf/types/workflow.proto Outdated Show resolved Hide resolved
protobuf/types/workflow.proto Show resolved Hide resolved
@antho1404 antho1404 modified the milestones: next, v0.13.0 Aug 16, 2019
@NicolasMahe NicolasMahe merged commit 4c83775 into dev Aug 16, 2019
@NicolasMahe NicolasMahe deleted the feature/trigger-type-oneof branch August 16, 2019 08:43
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants