knative / hack

Knative common scripts.
Apache License 2.0
18 stars 64 forks source link

Trap calls are now executed in LIFO order #249

Closed dprotaso closed 2 years ago

dprotaso commented 2 years ago

We tend to add traps at various points in our test scripts. The assumption we have is the trap will be executed when external resources are in a certain state.

ie.

  1. Setup Cluster - trap delete_cluster
  2. Setup Knative - trap teardown_knative
  3. Setup Tests - trap dump_test_failure

Prior traps are executed in FIFO order so the cluster would be torn down before the test dump would occur.

In LIFO order the test dump would occur first, then the teardown of knative and then finally the cluster.

/assign @cardil /assign @upodroid

knative-prow[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso

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/knative/hack/blob/main/OWNERS)~~ [dprotaso] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dprotaso commented 2 years ago

Actually I think the trap command should be LIFO and that would solve this problem

dprotaso commented 2 years ago

Ok - done please take a look

krsna-m commented 2 years ago

/lgtm