Skip to content

feat: add release plan approval workflow variables#4679

Open
huanghongbo-hhb wants to merge 1 commit into
koderover:mainfrom
huanghongbo-hhb:feat/release-plan-workflow-trigger-vars
Open

feat: add release plan approval workflow variables#4679
huanghongbo-hhb wants to merge 1 commit into
koderover:mainfrom
huanghongbo-hhb:feat/release-plan-workflow-trigger-vars

Conversation

@huanghongbo-hhb
Copy link
Copy Markdown
Contributor

@huanghongbo-hhb huanghongbo-hhb commented May 15, 2026

Summary

  • Add workflow built-in variables to identify release plan triggered workflow tasks and whether the release plan approval has passed.

Why

  • Release plans can already require approval before execution. Workflows triggered by an approved release plan need a reliable variable so approval jobs can be conditionally skipped without affecting normal workflow executions.

Main Changes

  • Store release plan approval-pass state on the workflow task release plan reference.
  • Expose workflow.task.from_release_plan and workflow.task.release_plan_approved as referable workflow runtime variables.
  • Keep standalone workflow execution and release plans without approval on workflow.task.release_plan_approved=false so workflow approval jobs still run normally.

Risk / Compatibility

  • Low compatibility risk: the change only adds optional fields/variables and does not automatically skip any job. Skipping still depends on workflow job execute policy configuration.
  • Existing workflow task release plan references without approval_passed default to false.

Test

  • go test ./pkg/microservice/aslan/core/workflow/service/workflow/controller
  • GOCACHE=/private/tmp/zadig-gocache go test -vet=off ./pkg/microservice/aslan/core/workflow/service/workflow
  • GOCACHE=/private/tmp/zadig-gocache go test -vet=off ./pkg/microservice/aslan/core/release_plan/service

Contact


This change is Reviewable

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant