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

State internal accessors #139

Merged
merged 6 commits into from
Jul 27, 2021

Conversation

ehuelsmann
Copy link
Member

@ehuelsmann ehuelsmann commented Jul 19, 2021

Description

Separate state's action-related data from actual Action configuration.

This solves a problem reported by @oliwel due to the 1.55 release, which confuses OpenXPKI due to the 'resulting_state' and 'condition' keys being part of the action configuration.

Type of change

Please delete options that are not relevant.

Arguably, this is a bugfix.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project, please see the contribution guidelines.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Follow suit with other classes and other accessors in the State class
Following the `_actions` accessor, add the `_conditions` accessor too
Same as there is a `_conditions` accessor for actions' conditions,
we really want this accessor to separate this config out from
the action's true configuration.
@ehuelsmann ehuelsmann added this to the 1.56 milestone Jul 19, 2021
@coveralls
Copy link

coveralls commented Jul 19, 2021

Coverage Status

Coverage increased (+0.05%) to 82.371% when pulling 857ff54 on ehuelsmann:state-internal-accessors into b94701a on jonasbn:master.

State consumes the 'condition' and 'resulting_state' keys from the
Action configuration specified inside the State. Although these two
keys are specified *as part of* the Action config, they are in fact
State configuration relating to the Action, instead of true Action
configuration. This addresses an issue reported by @oliwell after the
1.55 release, where OpenXPKI was confused about unexpected parameters
being added to the action instantiation.

While at it, clean up the code around state-specific-action configuration
handling in general.
... because the accessor is called `_next_state()`.
Copy link
Collaborator

@jonasbn jonasbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@jonasbn jonasbn merged commit 37004f9 into perl-workflow:master Jul 27, 2021
@ehuelsmann ehuelsmann deleted the state-internal-accessors branch August 3, 2021 13:01
@ehuelsmann ehuelsmann restored the state-internal-accessors branch August 3, 2021 13:01
@ehuelsmann ehuelsmann deleted the state-internal-accessors branch August 3, 2021 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants