Skip to content

Nested dictionary/list objects in context are shared across context splits #6

Closed

Description

@ARMmaster17

Summary

A shallow copy is performed when a context needs to be split into several parts. This works fine if the context is just storing primitive values like integers and strings. This does not work if there are nested structures within the context.

Implementation

https://www.delftstack.com/howto/python/python-copy-dictionary/#deep-copy-with-copy-module-in-python

Activity

  1. added this to the 1.0.0 milestone on Mar 25, 2022
  2. ARMmaster17 commented on Mar 27, 2022

    @ARMmaster17
    OwnerAuthor

    In theory this sounds like a problem. Pending a test that can prove this bug exists in the current implementation of the pipeline logic.

  3. removed this from the 1.0.0 milestone on Apr 1, 2022
  4. ARMmaster17 commented on Apr 6, 2022

    @ARMmaster17
    OwnerAuthor

    Proposed test for how to verify this bug:

    • Create a standalone pipeline.
    • Create a step that outputs a list of two DTO objects with a sample field. Set the output mode to split.
    • Create a step that sets the sample field of each object to the current value of a counter that measures how many times that step has run.
    • Create a verification step that confirms that the values of the sample fields are 1 and 2.
  5. added 3 commits that reference this issue on Apr 15, 2022
  6. added this to the 1.1.0 milestone on May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions