Part of #1075.
What
Add a state: State instance attribute to Gremlin and populate it in initialize_with_runtime via build_state(...). No property delegates — subsequent phases access state directly as gremlin.state.client, gremlin.state.artifacts, etc.
The make_runner closure sets gremlin.state immediately before each stage.run(gremlin) call, so per-stage client overrides work the same way as today (patch gremlin.state.client inside the closure before the call).
Why first
Every subsequent phase depends on gremlin.state being populated. With it in place, each later phase is a mechanical rename.
Files
gremlins/executor/gremlin.py
Tests
Existing suite passes unchanged. Add a unit test that gremlin.state is non-None after initialize_with_runtime and that gremlin.state.artifacts, gremlin.state.client, etc. are accessible.
Part of #1075.
What
Add a
state: Stateinstance attribute toGremlinand populate it ininitialize_with_runtimeviabuild_state(...). No property delegates — subsequent phases access state directly asgremlin.state.client,gremlin.state.artifacts, etc.The
make_runnerclosure setsgremlin.stateimmediately before eachstage.run(gremlin)call, so per-stage client overrides work the same way as today (patchgremlin.state.clientinside the closure before the call).Why first
Every subsequent phase depends on
gremlin.statebeing populated. With it in place, each later phase is a mechanical rename.Files
gremlins/executor/gremlin.pyTests
Existing suite passes unchanged. Add a unit test that
gremlin.stateis non-None afterinitialize_with_runtimeand thatgremlin.state.artifacts,gremlin.state.client, etc. are accessible.