Draft: feat: Support loading AdditionalContext from file

What does this MR do and why?

This MR adds a convenient way to "inject" a list of additional context elements to the DWS through the Executor. The JSON array of contexts can be passed in multiple ways via a file to the Executor, and it gets sent to the DWS via the StartWorkflowRequest.

Related issues

gitlab-org/gitlab#558270 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Run cmd/debug-server.go

  2. Create a file with a valid AdditonalContext (see the additional_context.md doc for examples)

  3. Start the Executor (make sure it points at the right base-path and the right server)

--goal='test'
--insecure
--debug
--workflow-id=1
--token=your-gl-token
--base-url=http://gdk.test:3000
--user-id=1
--namespace-id=1
--project-id=1000000
--feature-enabled-by-namespace-ids=1000000
--base-path=.
--server=127.0.0.1:50052
--additional-context-path=<path to the file from step 2>
  1. Validate the StartWorkflowRequest in the debug server's log contains the expected additional context.

Closes gitlab-org/gitlab#558270 (closed)

Edited by Andras Herczeg

Merge request reports

Loading