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

Add cleanstack util #35

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Add cleanstack util #35

merged 1 commit into from
Jul 19, 2023

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Jul 19, 2023

Used by agent and enki, depends on nothing but multierror.

@Itxaka Itxaka requested a review from a team July 19, 2023 12:17
@Itxaka Itxaka enabled auto-merge (squash) July 19, 2023 12:24
// CleanStack is a basic LIFO stack that resizes as needed.
type CleanStack struct {
jobs []CleanJob
count int
Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or current

Copy link
Member Author

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!

utils/cleanstack.go Outdated Show resolved Hide resolved
Signed-off-by: Itxaka <[email protected]>
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #35 (ad4cc0a) into main (05770e9) will not change coverage.
The diff coverage is n/a.

@@           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

Copy link
Member

@mauromorales mauromorales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

@Itxaka Itxaka merged commit fe26d1d into main Jul 19, 2023
4 checks passed
renovate bot referenced this pull request in kairos-io/provider-kairos Oct 5, 2023
[![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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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 [@&#8203;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

- [@&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants