-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add cleanstack util #35
Conversation
utils/cleanstack.go
Outdated
// CleanStack is a basic LIFO stack that resizes as needed. | ||
type CleanStack struct { | ||
jobs []CleanJob | ||
count int |
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.
shouldn't count be a function that reads how many items there are in []CleanJob
. Maybe I'm not seeing it clearly but I don't see the value of keeping the count of an array which we control
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.
mmmh, I guess its because we dont really pop stuff from the jobs but access the index by the count so we can move over it?
So its not really the count I gues, but the index?
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.
yeah, I'd call it position or index
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.
or current
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.
Will change it to current!
Signed-off-by: Itxaka <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #35 +/- ##
=======================================
Coverage 46.46% 46.46%
=======================================
Files 12 12
Lines 863 863
=======================================
Hits 401 401
Misses 400 400
Partials 62 62 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
noice
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/kairos-io/kairos-sdk](https://togithub.com/kairos-io/kairos-sdk) | require | patch | `v0.0.9` -> `v0.0.14` | --- ### Release Notes <details> <summary>kairos-io/kairos-sdk (github.com/kairos-io/kairos-sdk)</summary> ### [`v0.0.14`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.0.14) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.0.13...v0.0.14) #### What's Changed - Add KairosFS type and detectBoot with FS by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/46](https://togithub.com/kairos-io/kairos-sdk/pull/46) **Full Changelog**: kairos-io/kairos-sdk@v0.0.13...v0.0.14 ### [`v0.0.13`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.0.13) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.0.12...v0.0.13) #### What's Changed - Update module github.com/zcalusic/sysinfo to v1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kairos-io/kairos-sdk/pull/22](https://togithub.com/kairos-io/kairos-sdk/pull/22) - fix(deps): update module github.com/mudler/yip to v1.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kairos-io/kairos-sdk/pull/19](https://togithub.com/kairos-io/kairos-sdk/pull/19) - fix(deps): update module github.com/onsi/ginkgo/v2 to v2.11.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kairos-io/kairos-sdk/pull/23](https://togithub.com/kairos-io/kairos-sdk/pull/23) - Properly calculate image size by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/45](https://togithub.com/kairos-io/kairos-sdk/pull/45) **Full Changelog**: kairos-io/kairos-sdk@v0.0.12...v0.0.13 ### [`v0.0.12`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.0.12) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.0.11...v0.0.12) #### What's Changed - Semi force the umount of oem when dealing with mounts by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/40](https://togithub.com/kairos-io/kairos-sdk/pull/40) - Add a method to get the image size by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/39](https://togithub.com/kairos-io/kairos-sdk/pull/39) **Full Changelog**: kairos-io/kairos-sdk@v0.0.11...v0.0.12 ### [`v0.0.11`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.0.11) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.0.10...v0.0.11) #### What's Changed - 🐛 Wrong deep merge when array contains maps by [@​mauromorales](https://togithub.com/mauromorales) in [https://github.com/kairos-io/kairos-sdk/pull/38](https://togithub.com/kairos-io/kairos-sdk/pull/38) **Full Changelog**: kairos-io/kairos-sdk@v0.0.10...v0.0.11 ### [`v0.0.10`](https://togithub.com/kairos-io/kairos-sdk/releases/tag/v0.0.10) [Compare Source](https://togithub.com/kairos-io/kairos-sdk/compare/v0.0.9...v0.0.10) #### What's Changed - Improve image extractor by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/32](https://togithub.com/kairos-io/kairos-sdk/pull/32) - Allow the users to apply arbitrary images in framework-profile.yaml by [@​jimmykarily](https://togithub.com/jimmykarily) in [https://github.com/kairos-io/kairos-sdk/pull/33](https://togithub.com/kairos-io/kairos-sdk/pull/33) - schedule renovate after hours by [@​mauromorales](https://togithub.com/mauromorales) in [https://github.com/kairos-io/kairos-sdk/pull/34](https://togithub.com/kairos-io/kairos-sdk/pull/34) - fix(deps): update module github.com/pterm/pterm to v0.12.63 by [@​renovate](https://togithub.com/renovate) in [https://github.com/kairos-io/kairos-sdk/pull/20](https://togithub.com/kairos-io/kairos-sdk/pull/20) - Add cleanstack util by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/35](https://togithub.com/kairos-io/kairos-sdk/pull/35) - Extend root schema by [@​Itxaka](https://togithub.com/Itxaka) in [https://github.com/kairos-io/kairos-sdk/pull/37](https://togithub.com/kairos-io/kairos-sdk/pull/37) #### New Contributors - [@​jimmykarily](https://togithub.com/jimmykarily) made their first contribution in [https://github.com/kairos-io/kairos-sdk/pull/33](https://togithub.com/kairos-io/kairos-sdk/pull/33) **Full Changelog**: kairos-io/kairos-sdk@v0.0.8...v0.0.10 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 11pm every weekday,before 7am every weekday,every weekend" in timezone Europe/Brussels, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/kairos-io/provider-kairos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzcuMC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Used by agent and enki, depends on nothing but multierror.