openshift-metal3 / terraform-provider-ironic

Terraform provider for Ironic
Apache License 2.0
24 stars 25 forks source link

OCPBUGS-8237: rework inspect/clean workflows to avoid an inner loop #77

Closed dtantsur closed 1 year ago

dtantsur commented 1 year ago

Currently, both workflow use a nested flow to work around the inability to distinguish the initial and final state (manageable). In addition to being confusing, this inner loop is missing a wait(), resulting in the get node API being called in a tight loop.

This change uses an internal flag to mark if the process has been started. This way we can use only one outer loop and implement retries the same way as for deployment.

iurygregory commented 1 year ago

/lgtm

iurygregory commented 1 year ago

/approve

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iurygregory

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift-metal3/terraform-provider-ironic/blob/master/OWNERS)~~ [iurygregory] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment