CCOR-13193 - run integration(e2e) tests against latest oss conductor + v4 server#151
Open
chrishagglund-ship-it wants to merge 8 commits into
Open
CCOR-13193 - run integration(e2e) tests against latest oss conductor + v4 server#151chrishagglund-ship-it wants to merge 8 commits into
chrishagglund-ship-it wants to merge 8 commits into
Conversation
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
cb0af8b to
6ec17eb
Compare
4b03a0e to
b88392d
Compare
5fc9338 to
223cba3
Compare
…inst conductor oss
…st that needs it. setup to test against v4 and v5 in gh action
223cba3 to
268df8e
Compare
…ng comparison in favor of initial enum string parse and then compare to enum value
This file contains hidden or 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
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.
In this PR:
regarding the correction of misshapen data structures, it is technically a breaking change, and there is a question then of if this should be bugfix (eg 1.2.1) or major version (2.0.0). I lean towards the "type was impossible/useless" bugfix camp.
Breaking change:
WorkflowTask.OnStateChangemodel corrected to match server contractWhat breaks
Conductor.Client.Models.WorkflowTask.OnStateChangechanges type:Dictionary<string, StateChangeConfig>Dictionary<string, List<StateChangeEvent>>Consequences for callers:
OnStateChangeproperty and theWorkflowTask(...)constructor'sonStateChangeparameter change type (source-breaking at compile time).
StateChangeConfigand theStateChangeEventTypeenum are removed.StateChangeEventmoves from the global namespace intoConductor.Client.Models(callers now need
using Conductor.Client.Models;).This surfaces on any call that sends or receives a
WorkflowDefcontaining tasks withonStateChange, e.g.MetadataResourceApi.UpdateWorkflowDefinitions(...)(
PUT /metadata/workflow) andMetadataResourceApi.Get(...)(GET /metadata/workflow/{name}).Why the old type was wrong
onStateChangeis serialized as part ofWorkflowDefover the metadata REST API. Theauthoritative server model is
Map<String, List<StateChangeEvent>>, where the map key isthe event name (
onStart,onSuccess, …) and eachStateChangeEventis{ type, payload }:conductor/.../common/metadata/workflow/WorkflowTask.java:158(field),StateChangeEvent.java:25-32orkes-conductor/failover/conductor/.../common/metadata/workflow/WorkflowTask.java:158,StateChangeEvent.java:25-32(identical; Orkes reuses the OSS common model)There is no
StateChangeConfigtype anywhere on the server side.So the server wants:
The old C#
StateChangeConfigproduced:That's wrong on both read and write — wrong key (empty string instead of the event name)
and wrong value shape (a wrapper object with
type/eventsinstead of a bare list ofevents). It only ever "worked" because nothing round-tripped it against a server that
enforced the shape. The new
Dictionary<string, List<StateChangeEvent>>is an exact matchto the server model.
So: bug fix, or breaking change?
Both. The type was never correct, so this is fundamentally a bug fix — but because it
changes a public type, it's source-breaking. Flagging for the team to decide how to ship:
correct code could have depended on it), or