Refactor mock_step and deprecate subprocess kwarg#25
Open
yogeshjain999 wants to merge 1 commit intotrailblazer:masterfrom
Open
Refactor mock_step and deprecate subprocess kwarg#25yogeshjain999 wants to merge 1 commit intotrailblazer:masterfrom
mock_step and deprecate subprocess kwarg#25yogeshjain999 wants to merge 1 commit intotrailblazer:masterfrom
Conversation
apotonick
reviewed
May 29, 2024
|
|
||
| #~method | ||
| assert_pass new_activity, default_params, {} do |(signal, (ctx, flow_options))| | ||
| assert_pass({}, {}, operation: new_activity) do |ctx| |
Member
There was a problem hiding this comment.
Why do we need the {}, {} arguments here, I wonder?
Member
Author
There was a problem hiding this comment.
Well, I want to compare ctx[:user] object here in the 2nd {} of output here, but I guess it's not possible to compare it's not primitive type!
apotonick
reviewed
May 29, 2024
| step Subprocess(subprocess, patch: patch), replace: subprocess, id: subprocess | ||
| end | ||
| subprocess_path = [subprocess, *subprocess_path] | ||
| Trailblazer::Activity::Deprecate.warn caller_locations[0], ":subprocess is deprecated and will be removed in 1.0.0. Pass `subprocess_path: #{subprocess_path}` instead." |
Member
There was a problem hiding this comment.
Shouldn't we name it :path instead of :subprocess_path (feels clumsy)?
Member
Author
There was a problem hiding this comment.
Hmm yeah, but I thought path resonates more with Activity::Path and we allow Railway and FastTrack too 😄
Having subprocess in it makes intent clear, how about just subprocess or subprocesses ?
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.
Refactor
mock_stepmethod to utilise newDSL::Patchcall and deprecatesubprocesskwarg. Instead, pass onlysubprocess_pathwith full nested path of subprocesses.Old usage
New usage
Passing
subprocesskwarg will work for now, but it shows deprecation warning and will get removed in next major release.