Skip to content

GitLab retro dispatch does not pass required env vars to pipeline #6418

Description

@ggallen

Context

The retro agent now supports GitLab (agents PR #817, issue #816). When triggered via the GitLab CI API (source: api), the pipeline fails immediately at environment validation because the dispatch does not supply the required host variables.

Failed pipeline: https://gitlab.cee.redhat.com/gallen/integration-service/-/pipelines/17171756

Error

Error: validating env: env.runner[ORIGINATING_URL]: host variable ORIGINATING_URL is not set (referenced in "${ORIGINATING_URL}")

The harness declares these in env.runner (top-level, applies to both forges):

Variable Required Purpose
ORIGINATING_URL Yes MR/issue URL to analyze
REPO_FULL_NAME Yes Project path (e.g. group/project)

And these in the forge.gitlab section:

Variable Required Purpose
GITLAB_TOKEN Yes GitLab API token

For GitHub, the reusable dispatch workflow already sets these from workflow inputs and GitHub context. The GitLab dispatch equivalent needs to do the same.

Expected behavior

When the retro agent is triggered on a GitLab MR (via /fs-retro or MR close event), the dispatch should pass ORIGINATING_URL, REPO_FULL_NAME, and GITLAB_TOKEN as CI/CD variables in the pipeline trigger payload.

Related

  • agents#816 — retro agent multi-forge issue
  • agents#817 — retro agent multi-forge PR

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/retroRetro agentbugcomponent/dispatchWorkflow dispatch and triggerspriority/highSignificant impact, address soonready-to-codeTriggers code agent dispatchtype/bugConfirmed defect in existing behavior

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions