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

fix: data injection test #2360

Closed
lucasrod16 opened this issue Mar 6, 2024 · 0 comments · Fixed by #2361
Closed

fix: data injection test #2360

lucasrod16 opened this issue Mar 6, 2024 · 0 comments · Fixed by #2361
Assignees
Labels
bug 🐞 Something isn't working

Comments

@lucasrod16
Copy link
Contributor

lucasrod16 commented Mar 6, 2024

Environment

Device and OS: Ubuntu GitHub Actions runner
App version: N/A
Kubernetes distro being used: N/A

Steps to reproduce

  1. Push a commit that changed a file not on the ignore list to a PR to trigger running the E2E tests w/ the data injection test. The change should not change any behavior to ensure accurate reproduction.

Expected result

The data injection test passes

Actual Result

The data injection test fails/flakes occasionally

Visual Proof (screenshots, videos, text, etc)

https://github.com/defenseunicorns/zarf/actions/runs/7892004713/job/21537657159#step:8:5982

Additional Context

The data injection test performs a data injection 3 times back to back to ensure idempotence. Each data injection causes the kiwix pod to cycle. Immediately after the third and final data injection is ran, we attempt to fetch the pod logs. There are times when there is still a pod in a terminating state when fetching the logs. Because we are currently using the --selector=app=kiwix-serve flag when fetching logs, the terminating pod still matches against the selector query, resulting in the test failing.

https://github.com/defenseunicorns/zarf/blob/21ccaaa26d981e9c24fafce31c871c0ed2498da9/src/test/e2e/23_data_injection_test.go#L30-L36

https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase

Since Kubernetes 1.27, the kubelet transitions deleted Pods, except for static Pods and force-deleted Pods without a finalizer, to a terminal phase (Failed or Succeeded depending on the exit statuses of the pod containers) before their deletion from the API server.

@lucasrod16 lucasrod16 added the bug 🐞 Something isn't working label Mar 6, 2024
@Noxsios Noxsios changed the title fix data injection test fix: data injection test Mar 6, 2024
@lucasrod16 lucasrod16 self-assigned this Mar 7, 2024
Noxsios pushed a commit that referenced this issue Mar 18, 2024
## Description
fixes data injection test flake

## Related Issue

Fixes #2360

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant