<#7184 Move GetActionData from RunsService to Data...
# flyte-github
a
#7184 Move GetActionData from RunsService to Dataproxy Pull request opened by katrogan Also introduce new GetActionDataURIs in run service. Why are the changes needed? Required for secure environments to limit dataflow How was this patch tested? Ran the flyte demo cluster locally. Verified I could launch a run and see the inputs and outputs in the UI still. Verified the new endpoint worked with SDK changes that call dataproxy.GetActionDetails
Copy code
.venv/bin/python -c "
  import asyncio, flyte
  from flyte.remote._run import Run

  async def main():
      await flyte.init_from_config.aio('.flyte/config-oss-local.yaml', project='flytesnacks', domain='development')
      run = await Run.get.aio('rjwnhmwkflr7dcr6k4rf')
      print('Run:', run.name)
      print('Phase:', run.phase)
      inputs = await run.inputs.aio()
      print('Inputs:', inputs)
      outputs = await run.outputs.aio()
      print('Outputs:', outputs)

  asyncio.run(main())
  "

  Output:
  Run: rjwnhmwkflr7dcr6k4rf
  Phase: ActionPhase.SUCCEEDED
  Inputs: {'x': 4}
  Outputs: ActionOutputs(o0=13)
Without sdk changes
Copy code
.venv/bin/python -c "
  import asyncio, flyte
  from flyte._initialize import get_client
  from flyteidl2.dataproxy import dataproxy_service_pb2
  from flyteidl2.common import identifier_pb2

  async def main():
      await flyte.init_from_config.aio('.flyte/config-oss-local.yaml', project='flytesnacks', domain='development')
      resp = await get_client().dataproxy_service.get_action_data(
          dataproxy_service_pb2.GetActionDataRequest(
              action_id=identifier_pb2.ActionIdentifier(
                  run=identifier_pb2.RunIdentifier(
                      name='rjwnhmwkflr7dcr6k4rf',
                      project='flytesnacks',
                      domain='development',
                      org='testorg',
                  ),
                  name='a0',
              )
          )
      )
      print('Inputs:', resp.inputs)
      print('Outputs:', resp.outputs)

  asyncio.run(main())
  "

  Output:
  Inputs: literals {
    name: "x"
    value {
      scalar {
        primitive {
          integer: 4
        }
      }
    }
  }

  Outputs: literals {
    name: "o0"
    value {
      scalar {
        primitive {
          integer: 13
        }
      }
    }
  }
Labels Please add one or more of the following labels to categorize your PR: • added: For new features. • changed: For changes in existing functionality. • deprecated: For soon-to-be-removed features. • removed: For features being removed. • fixed: For any bug fixed. • security: In case of vulnerabilities This is important to improve the readability of release notes. Setup process Screenshots Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. Related PRs Docs link •
main
• #6583 • Move GetActionData from RunsService to Dataproxy 👈 flyteorg/flyte