-
Notifications
You must be signed in to change notification settings - Fork 162
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
refactor: remove unnecessary retry logic from data injection #2867
Conversation
Codecov ReportAttention: Patch coverage is
|
Signed-off-by: Philip Laine <philip.laine@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data injection can not be tested in its current state as it is shelling out to both tar and kubectl. What exactly should be tested here maybe other than |
Yeah, upon re-review it will be too burdensome to try and write functional tests for |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | ghcr.io/zarf-dev/packages/init | patch | `v0.38.2` -> `v0.38.3` | | [zarf-dev/zarf](https://github.com/zarf-dev/zarf) | patch | `v0.38.2` -> `v0.38.3` | --- ### Release Notes <details> <summary>zarf-dev/zarf (zarf-dev/zarf)</summary> ### [`v0.38.3`](https://github.com/zarf-dev/zarf/releases/tag/v0.38.3) [Compare Source](https://github.com/zarf-dev/zarf/compare/v0.38.2...v0.38.3) #### What's Changed - fix: linter warnings in new Golang CI version by [@​phillebaba](https://github.com/phillebaba) in [zarf-dev/zarf#2883 - chore(deps): bump github.com/go-git/go-git/v5 from 5.11.0 to 5.12.0 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2871 - chore(deps): bump github/codeql-action from 3.26.0 to 3.26.1 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2881 - test: move oci compose tests that don't need cluster by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2878 - chore(deps): bump github.com/mikefarah/yq/v4 from 4.44.2 to 4.44.3 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2870 - refactor: findImages to return errors immediately by [@​phillebaba](https://github.com/phillebaba) in [zarf-dev/zarf#2851 - test: add workflow to make sure importing Zarf works by [@​phillebaba](https://github.com/phillebaba) in [zarf-dev/zarf#2874 - refactor: remove unnecessary retry logic from data injection by [@​phillebaba](https://github.com/phillebaba) in [zarf-dev/zarf#2867 - docs: explain no wait & helm hooks interaction by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2895 - refactor: store managed secrets and add tests by [@​phillebaba](https://github.com/phillebaba) in [zarf-dev/zarf#2892 - chore(deps): bump github/codeql-action from 3.26.1 to 3.26.2 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2888 - chore(deps): bump actions/setup-go from 5.0.0 to 5.0.2 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2901 - fix: update injector by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2910 - chore(deps): bump github/codeql-action from 3.26.2 to 3.26.4 by [@​dependabot](https://github.com/dependabot) in [zarf-dev/zarf#2916 - fix: update creds not breaking when internal git server not deployed by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2904 - feat: better error message on helm fail by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2914 - ci: increase lint timeout by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2919 - fix: evaulate templates on schema check by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2911 - chore: update workflow to use new key by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2920 - ci: permission at job level by [@​AustinAbro321](https://github.com/AustinAbro321) in [zarf-dev/zarf#2922 **Full Changelog**: zarf-dev/zarf@v0.38.2...v0.38.3 </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 these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/defenseunicorns/uds-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Description
This change removes the retrying in data injections, as it does not have any effect. The current implementation will only retry at a single condition which is when the pods returned from the wait function is empty.
zarf/src/pkg/cluster/data.go
Lines 88 to 90 in 0943d76
This event wont actually happen because the wait logic will run until the context cancelled if the pod list is empty. This means that returning an empty list is impossible.
Removing the nested retry implementation increases legibility.
Related Issue
Depends on #2856
Checklist before merging