Skip to content

[Workflow] Do not normalize keys for workflow transitions #25049

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

Closed
wants to merge 1 commit into from
Closed

[Workflow] Do not normalize keys for workflow transitions #25049

wants to merge 1 commit into from

Conversation

MarioBlazek
Copy link
Contributor

@MarioBlazek MarioBlazek commented Nov 20, 2017

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24981
License MIT

@lyrixx
Copy link
Member

lyrixx commented Nov 20, 2017

Hi @MarioBlazek

Thanks for working on this.

I'm 👍 with this patch. But for me it's not a bugfix.

@fabpot As this is a new feature and the 4.0 branch is not yet created, this should not be merged, right ?

@MarioBlazek
Copy link
Contributor Author

@lyrixx I've added this as bug because here it is marked as bug. Should I mark this as new feature ? Thanks.

@backbone87
Copy link
Contributor

if this is not a bug, its a BC break and therefore cant be merged until 5.0,

my opinion is still:

  • keep current transformation behavior
  • deprecate usage of transition names in keys (and use transition names in the name property of the entry)

@lyrixx
Copy link
Member

lyrixx commented Nov 20, 2017

@backbone87 Your are totally right. So now, I don't know if it's a bugfix or not :/

@nicolas Any advice here?

@chalasr
Copy link
Member

chalasr commented Nov 20, 2017

Well, using the transition name as key makes it normalized while it is not using the name: value syntax, that's inconsistent but doesn't qualify as a bugfix.

About BC, could we register a transition for the normalized name and another for the raw name? I don't know much about the component, at least not enough to say if it would be ok functionally talking, at first sight I don't think so (would give an extra transition right?).

We already merged a similar PR by documenting the BC break #21718, but if we can provide a smooth upgrade path by triggering notices where it makes sense, that would be best.

@chalasr chalasr added this to the 4.1 milestone Nov 20, 2017
@backbone87
Copy link
Contributor

Registering a new transition isnt possible as it would change your business cirtical workflow (think of automated transitions, if only one transition is available).

@fabpot
Copy link
Member

fabpot commented Nov 20, 2017

@lyrixx Indeed. 4.1 feature cannot be merged before the release of 4.0RC1 which will be the time when we create the 4.0 branch.

@lyrixx
Copy link
Member

lyrixx commented Feb 7, 2018

I'm sorry, I'm going to close your PR because there are no really easy way to deal with BC.
More over there is already a way to fix this issue:

before:

transitions:
    request-review: # Does not work because it's normalized
        from: draft
        to:
            - wait_for_journalist
            - wait_for_spellchecker

after:

transitions:
    -
        name: request-review
        from: draft
        to:
            - wait_for_journalist
            - wait_for_spellchecker

@lyrixx lyrixx closed this Feb 7, 2018
@backbone87
Copy link
Contributor

While i get the reasoning, this kind of change was done for similar problems in other components. My original purpose was to deprecate the first example (transition names as keys) and only allow the second example. is this a change you are willing to consider?

@lyrixx
Copy link
Member

lyrixx commented Feb 9, 2018

Actually, I don't like to break BC (even if there is a migration path, with deprecation notices) for the sake of cleanness. It's always boring to update code that works. So I really prefer to keep the BC here.

But I totally understand and accept your point of view. It's really legit. But again, I prefer to provide a very nice upgrade path without doing anything. I like when it "just works".

I hope you finally agree with me ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants