Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/int: Add separate resource cleanup step #4533

Merged
merged 1 commit into from Jan 10, 2024
Merged

Conversation

darkowlzz
Copy link
Contributor

Introduce a destroy-only mode in the test runner to run terraform destroy for the respective cloud provider configurations. This can be used to destroy cloud resources without going through the whole provision-test process.

Add a new step in github actions workflow to run the test binary in destoy-only mode at the very end irrespective of the result of the previous steps. This ensures that the infrastructure is always destroyed, even if the CI job is cancelled.

Based on fluxcd/pkg#712 .

Example CI run https://github.com/fluxcd/flux2/actions/runs/7449139676/job/20265088224#step:13:108 where the job is cancelled and the provisioned resources are deleted in the new cleanup step.

@darkowlzz darkowlzz added the area/testing Testing related issues and pull requests label Jan 8, 2024
Introduce a destroy-only mode in the test runner to run terraform
destroy for the respective cloud provider configurations. This can be
used to destroy cloud resources without going through the whole
provision-test process.

Add a new step in github actions workflow to run the test binary in
destoy-only mode at the very end irrespective of the result of the
previous steps. This ensures that the infrastructure is always
destroyed, even if the CI job is cancelled.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
@darkowlzz darkowlzz requested a review from a team January 10, 2024 11:14
@darkowlzz darkowlzz merged commit 2a8492a into main Jan 10, 2024
11 checks passed
@darkowlzz darkowlzz deleted the int-test-destroy-only branch January 10, 2024 14:08
nrdufour added a commit to nrdufour/home-ops that referenced this pull request Feb 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [fluxcd/flux2](https://github.com/fluxcd/flux2) | Kustomization | patch | `v2.2.2` -> `v2.2.3` |

---

### Release Notes

<details>
<summary>fluxcd/flux2 (fluxcd/flux2)</summary>

### [`v2.2.3`](https://github.com/fluxcd/flux2/releases/tag/v2.2.3)

[Compare Source](fluxcd/flux2@v2.2.2...v2.2.3)

#### Highlights

Flux v2.2.3 is a patch release which comes with various fixes and improvements. Users are encouraged to upgrade for the best experience.

:bulb: For upgrading to Flux v2.2, please see [the procedure documented in 2.2.0](https://github.com/fluxcd/flux2/releases/tag/v2.0.0).

This release updates the Kubernetes dependencies to v1.28.6 and various other dependencies to their latest version to patch upstream CVEs.

All controllers are built with Go 1.21.6 using Alpine Linux 3.19.1 base image.

> \[!NOTE]
> Due to breaking changes in [Helm v3.14.0](https://github.com/helm/helm/releases/tag/v3.14.0), the helm-controller version included in this patch release comes with Helm SDK v3.13.3.
> A preview build of the helm-controller with the latest Helm SDK is available at [helm-controller#879](fluxcd/helm-controller#879).

Fixes:

-   Reconciling empty directories and directories without Kubernetes manifests no longer results in an error. This regressing bug was introduced with the kustomize-controller upgrade to Kustomize v5.3 and has been fixed in this patch release.
-   The regression due to which `Roles` and `ClusterRoles` with aggregated roles were continuous reconciled by kustomize-controller has been fixed.
-   Fix the Git revision displaying when notification-controller sends alerts to Grafana.
-   The HelmRelease status reporting has been improved by ensuring that the stale failure conditions get updated after failure recovery.

See the components changelog for a full list of bug fixes.

#### Components changelog

-   source-controller [v1.2.4](https://github.com/fluxcd/source-controller/blob/v1.2.4/CHANGELOG.md)
-   kustomize-controller [v1.2.2](https://github.com/fluxcd/kustomize-controller/blob/v1.2.2/CHANGELOG.md)
-   notification-controller [v1.2.4](https://github.com/fluxcd/notification-controller/blob/v1.2.4/CHANGELOG.md)
-   helm-controller [v0.37.4](https://github.com/fluxcd/helm-controller/blob/v0.37.4/CHANGELOG.md)
-   image-reflector-controller [v0.31.2](https://github.com/fluxcd/image-reflector-controller/blob/v0.31.2/CHANGELOG.md)
-   image-automation-controller [v0.37.1](https://github.com/fluxcd/image-automation-controller/blob/v0.37.1/CHANGELOG.md)

#### CLI Changelog

-   PR [#&#8203;4589](fluxcd/flux2#4589) - [@&#8203;stefanprodan](https://github.com/stefanprodan) - Update dependencies
-   PR [#&#8203;4585](fluxcd/flux2#4585) - [@&#8203;dependabot](https://github.com/dependabot)\[bot] - build(deps): bump the ci group with 3 updates
-   PR [#&#8203;4583](fluxcd/flux2#4583) - [@&#8203;fluxcdbot](https://github.com/fluxcdbot) - Update toolkit components
-   PR [#&#8203;4575](fluxcd/flux2#4575) - [@&#8203;stefanprodan](https://github.com/stefanprodan) - Update dependencies to Kubernetes v1.28.6
-   PR [#&#8203;4573](fluxcd/flux2#4573) - [@&#8203;dependabot](https://github.com/dependabot)\[bot] - build(deps): bump the ci group with 5 updates
-   PR [#&#8203;4558](fluxcd/flux2#4558) - [@&#8203;twinguy](https://github.com/twinguy) - `flux check` should error on unrecognised args
-   PR [#&#8203;4557](fluxcd/flux2#4557) - [@&#8203;twinguy](https://github.com/twinguy) - `flux stats` should error on unrecognised args
-   PR [#&#8203;4554](fluxcd/flux2#4554) - [@&#8203;dependabot](https://github.com/dependabot)\[bot] - build(deps): bump the ci group with 3 updates
-   PR [#&#8203;4553](fluxcd/flux2#4553) - [@&#8203;twinguy](https://github.com/twinguy) - Properly detect unexpected arguments during uninstall
-   PR [#&#8203;4535](fluxcd/flux2#4535) - [@&#8203;dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/cloudflare/circl from 1.3.6 to 1.3.7
-   PR [#&#8203;4533](fluxcd/flux2#4533) - [@&#8203;darkowlzz](https://github.com/darkowlzz) - tests/int: Add separate resource cleanup step

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Reviewed-on: https://git.home/nrdufour/home-ops/pulls/364
Co-authored-by: Renovate <renovate@ptinem.io>
Co-committed-by: Renovate <renovate@ptinem.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants