seal-io / walrus

Walrus is an open-source application management platform based on IaC tools including OpenTofu, Terraform and others. It helps platform engineers build golden paths for developers and empowers developers with self-service capabilities.
Apache License 2.0
426 stars 47 forks source link

Applying walrus file with dependent resources fails #2243

Open Finenyaco opened 8 months ago

Finenyaco commented 8 months ago

Describe the bug

Steps to reproduce

  1. Create two resources and preview by CLI. And res-b depends on res-a.
  2. Apply through CLI.

Result

  1. Displayed an error when preview and wailt.

    resource default/test-dev/res-c preview planning
    resource default/test-dev/res-d preview planning
    resource default/test-dev/res-d preview run error, resource run 504752521374334978 is in unexpected status Pending
    resource default/test-dev/res-c preview plan succeed, changes: 2 created, 0 updated, 0 deleted.
    NAME         TYPE                       CHANGE TYPE
    ------------ -------------------------- -------------
    deployment   kubernetes_deployment_v1   create
    service      kubernetes_service_v1      create
  2. Failed to apply.

    image
 ~/seal/cli_yaml/ w preview -f selector-2.yaml --apply --run-labels test=1
resource default/test-dev/res-a preview apply failed
resource default/test-dev/res-b preview apply failed
resource default/test-dev/res-b preview apply error: no resource runs matching the criteria were found
  1. Check the runs. image image

Expected behavior

Environment

Additional context Add any other context about the problem here.

aiwantaozi commented 8 months ago

Only Planned status can be applied, the second run is in Pending status, do not matching the criteria.