Fix GraphQL permission error for remote Flows
What does this MR do and why?
This MR partially reverts a change from !209784 (merged)
Removing the scope resulted in errors when running a remote flow.
E.g.
level":"info","ts":1761290492.1936195,"caller":"sentry/sentry.go:23","msg":"Telemetry is disabled, skipping Sentry initialization...","correlation_id":"01K8AHG691P905ATM8ZHVFZ8E9","workflow_id":"1203652"}
{"level":"error","ts":1761290492.4229693,"caller":"duo-workflow-executor/main.go:181","msg":"Failed to fetch feature flags","correlation_id":"01K8AHG691P905ATM8ZHVFZ8E9","workflow_id":"1203652","error":"failed to fetch feature flags: could not fetch header: unexpected status code: 403","stacktrace":"main.(*bootConfig).run\n\t/builds/gitlab-org/duo-workflow/duo-workflow-executor/main.go:181\nmain.main\n\t/builds/gitlab-org/duo-workflow/duo-workflow-executor/main.go:128\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:285"}
{"level":"info","ts":1761290492.4238627,"caller":"duo-workflow-executor/main.go:220","msg":"Starting client","correlation_id":"01K8AHG691P905ATM8ZHVFZ8E9","workflow_id":"1203652","version":"v0.0.52","server":"duo-workflow-svc.runway.gitlab.net:443"}
{"level":"warn","ts":1761290492.8224597,"caller":"retry/retry.go:58","msg":"Runner failed, will retry after delay","correlation_id":"01K8AHG691P905ATM8ZHVFZ8E9","workflow_id":"1203652","error":"error receiving event: rpc error: code = Internal desc = workflow execution failure: Exception: GraphQL errors: [{'message': \"You don't have permission to access this workflow\", 'locations': [{'line': 3, 'column': 5}], 'path': ['duoWorkflowWorkflows']}]","retry_delay":10}
{"level":"warn","ts":1761290503.1862009,"caller":"retry/retry.go:58","msg":"Runner failed, will retry after delay","correlation_id":"01K8AHG691P905ATM8ZHVFZ8E9","workflow_id":"1203652","error":"error receiving event: rpc error: code = Internal desc = workflow execution failure: Exception: GraphQL errors: [{'message': \"You don't have permission to access this workflow\", 'locations': [{'line': 3, 'column': 5}], 'path': ['duoWorkflowWorkflows']}]","retry_delay":25}
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Checkout the default branch
- Open a Duo Platform enabled project and run a remote flow, observe the Runner logs and see the error
- Checkout this branch
- Run again a Flow and observe the the error is not present in the runner logs
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.