Skip to content

Fix the recover of correct StepData info associated with a Step#123

Merged
drodriguezhdez merged 2 commits into
masterfrom
drodriguezhdez/fix_stepdata
Sep 9, 2020
Merged

Fix the recover of correct StepData info associated with a Step#123
drodriguezhdez merged 2 commits into
masterfrom
drodriguezhdez/fix_stepdata

Conversation

@drodriguezhdez

@drodriguezhdez drodriguezhdez commented Sep 7, 2020

Copy link
Copy Markdown
Collaborator

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue at the time.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see CONTRIBUTING.

What does this PR do?

  • Fix the recover of correct StepData info associated with a Step

Description of the Change

A new action called StepDataAction is used to associate the Step information with the FlowNode instance based on the StepDescriptor. This allows using information always in the same Run context, avoiding using static accessors (like the class StepDataManager).

Finally, the class StepDataManager has been removed.

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@drodriguezhdez drodriguezhdez added the changelog/Fixed Fixed features results into a bug fix version bump label Sep 7, 2020
@drodriguezhdez drodriguezhdez self-assigned this Sep 7, 2020
@drodriguezhdez
drodriguezhdez marked this pull request as ready for review September 7, 2020 10:01
/**
* Keeps the Step data during a certain Run.
*/
public class StepDataAction extends InvisibleAction implements Serializable {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This class datasize seems to grow unbounded? Previously, there was a remove method which appeared to keep the data size in check -- will this object go out of scope and be garbage collected at some point?

@drodriguezhdez drodriguezhdez Sep 8, 2020

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There is a new instance of StepDataAction per Run instance and the StepDataAction is bound to the Run instance. I assume that Jenkins will destroy all objects associated with that Run instance once this has finished.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, that makes sense.

@drodriguezhdez
drodriguezhdez merged commit 6cb2282 into master Sep 9, 2020
@drodriguezhdez
drodriguezhdez deleted the drodriguezhdez/fix_stepdata branch September 9, 2020 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants