Skip to content

fix(workflow): use product envs in task filters#4653

Merged
lilianzhu merged 1 commit intokoderover:mainfrom
huanghongbo-hhb:fix/workflow-history-env-filter
Apr 27, 2026
Merged

fix(workflow): use product envs in task filters#4653
lilianzhu merged 1 commit intokoderover:mainfrom
huanghongbo-hhb:fix/workflow-history-env-filter

Conversation

@huanghongbo-hhb
Copy link
Copy Markdown
Contributor

@huanghongbo-hhb huanghongbo-hhb commented Apr 24, 2026

Summary

  • change workflow task env filter options to read envs from the product collection instead of workflow task history
  • determine the target env type from the workflow job config and use it to list current project envs from product
  • return env alias when present and fall back to env name otherwise

Background

The workflow execution record page calls GET /api/aslan/workflow/v4/workflowtask/filter/workflow/:name?queryType=envName&jobName=... to fetch env filter options. The correct data source for the env list is the product collection rather than workflow task history. This change aligns the filter options with the current env list stored in product.

Verification

  • /usr/local/go/bin/go build ./pkg/microservice/aslan/core/workflow/service/workflow
  • /usr/local/go/bin/go test -vet=off ./pkg/microservice/aslan/core/workflow/service/workflow
  • note: plain go test still hits pre-existing vet issues in this package unrelated to this change

This change is Reviewable

Comment thread pkg/microservice/aslan/core/common/repository/mongodb/workflow_task_v4.go Outdated
@huanghongbo-hhb huanghongbo-hhb changed the title fix: include workflow history envs in task filter options fix(workflow): use product envs in task filters Apr 24, 2026
@huanghongbo-hhb huanghongbo-hhb force-pushed the fix/workflow-history-env-filter branch from 373842f to b78d5d6 Compare April 24, 2026 07:11
Signed-off-by: huanghongbo <huanghongbo@koderover.com>
@huanghongbo-hhb huanghongbo-hhb force-pushed the fix/workflow-history-env-filter branch from b78d5d6 to c12aec0 Compare April 24, 2026 07:25
@lilianzhu lilianzhu merged commit a7c40df into koderover:main Apr 27, 2026
4 checks passed
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.

3 participants