Skip to content

Pass a dict/object rather than username #1

@rouilj

Description

@rouilj

In the original https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/
the object/dict "context" is passed to each step. In your examples you pass a simple variable username.

Although the example only defines the "username" key in the context object/dict the role of
context can't be replaced by a simple "username" variable.

The purpose of context as I see it is to pass information between the stages. So stage one can add:

context["stage1key"] = "xrvzymbloq"

Then stage2 can use this stage1key when doing its stage 2 things.

A simple variable depending on how it's passed (reference, value) to a stage doesn't allow
the stage to make a change to the variable that is available to other stages. Also the choice
of the name "username" isn't valid once the value is changes to something like a key.

There is value in seeing this model written in other languages, but I suggest you implement it
with the original functionality that supports stages modifying and passing context between
stages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions