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

feat: [PC-13433]: add get Adjustment Events #228

Draft
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

piotrkazulak
Copy link

@piotrkazulak piotrkazulak commented Oct 7, 2024

Motivation

This change is a part of new Error Budget Adjustments management feature. We need to have a way to get/update/delete Events related to an Adjustments.

Summary

Add new command to sloctl to

  • get Adjustment Events for adjustment and optional SLO filter
  • delete Adjustment Events for adjustment
  • update Adjustment Events for adjustment

Testing

See added examples of usage

Release Notes

New Past Adjustment functionality. Allow users to manage past events.

@piotrkazulak piotrkazulak force-pushed the PC-13433-sloctl-new-command-for-getdeleteupdate-of-adjustments branch from 34b34be to 826f51e Compare October 7, 2024 14:53
@piotrkazulak piotrkazulak changed the title feature: [PC-13433]: add get Adjustment Events feat: [PC-13433]: add get Adjustment Events Oct 7, 2024
@n9-machine-user n9-machine-user added enhancement New feature or request minor labels Oct 7, 2024
)

const (
flagAdjustment = "adjustment-name"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just name? we have sloctl budgetadjustments --adjustment-name for me adjustment in flag is uncessary duplication

Copy link
Author

Choose a reason for hiding this comment

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

We are getting events by adjustment name so lets leave it as it is

internal/budgetadjustments/flags.go Outdated Show resolved Hide resolved
internal/budgetadjustments/flags.go Outdated Show resolved Hide resolved
internal/budgetadjustments/flags.go Outdated Show resolved Hide resolved
internal/budgetadjustments/get.go Outdated Show resolved Hide resolved
internal/budgetadjustments/get.go Outdated Show resolved Hide resolved
internal/budgetadjustments/get.go Outdated Show resolved Hide resolved
internal/root.go Outdated Show resolved Hide resolved
internal/budgetadjustments/root.go Outdated Show resolved Hide resolved
internal/budgetadjustments/flags.go Outdated Show resolved Hide resolved
internal/budgetadjustments/get.go Outdated Show resolved Hide resolved
dawidwisn and others added 13 commits October 14, 2024 12:51
## Summary
 Correct failing new parameters tests
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [cspell](https://cspell.org/)
([source](https://redirect.github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell))
| [`8.14.4` ->
`8.15.1`](https://renovatebot.com/diffs/npm/cspell/8.14.4/8.15.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/cspell/8.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/cspell/8.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/cspell/8.14.4/8.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/cspell/8.14.4/8.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>streetsidesoftware/cspell (cspell)</summary>

###
[`v8.15.1`](https://redirect.github.com/streetsidesoftware/cspell/blob/HEAD/packages/cspell/CHANGELOG.md#small8151-2024-10-11-small)

[Compare
Source](https://redirect.github.com/streetsidesoftware/cspell/compare/v8.15.0...v8.15.1)

- fix: Sign Published Packages
([#&#8203;6350](https://redirect.github.com/streetsidesoftware/cspell/issues/6350))
([633b060](https://redirect.github.com/streetsidesoftware/cspell/commit/633b060)),
closes
[#&#8203;6350](https://redirect.github.com/streetsidesoftware/cspell/issues/6350)

###
[`v8.15.0`](https://redirect.github.com/streetsidesoftware/cspell/blob/HEAD/packages/cspell/CHANGELOG.md#8150-2024-10-11)

[Compare
Source](https://redirect.github.com/streetsidesoftware/cspell/compare/v8.14.4...v8.15.0)

- chore: bump eslint-plugin-unicorn from 55.0.0 to 56.0.0
([#&#8203;6332](https://redirect.github.com/streetsidesoftware/cspell/issues/6332))
([67d1e92](https://redirect.github.com/streetsidesoftware/cspell/commit/67d1e92)),
closes
[#&#8203;6332](https://redirect.github.com/streetsidesoftware/cspell/issues/6332)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am
every weekday,every weekend" (UTC), 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/nobl9/sloctl).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTUuMSIsInVwZGF0ZWRJblZlciI6IjM4LjExNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJqYXZhc2NyaXB0IiwicmVub3ZhdGUiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [yaml](https://eemeli.org/yaml/)
([source](https://redirect.github.com/eemeli/yaml)) | [`2.5.1` ->
`2.6.0`](https://renovatebot.com/diffs/npm/yaml/2.5.1/2.6.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/yaml/2.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yaml/2.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yaml/2.5.1/2.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yaml/2.5.1/2.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>eemeli/yaml (yaml)</summary>

###
[`v2.6.0`](https://redirect.github.com/eemeli/yaml/releases/tag/v2.6.0)

[Compare
Source](https://redirect.github.com/eemeli/yaml/compare/v2.5.1...v2.6.0)

- Use a proper tag for `!!merge <<` keys
([#&#8203;580](https://redirect.github.com/eemeli/yaml/issues/580))
- Add `stringKeys` parse option
([#&#8203;581](https://redirect.github.com/eemeli/yaml/issues/581))
- Stringify a Document as a Document
([#&#8203;576](https://redirect.github.com/eemeli/yaml/issues/576))
-   Add sponsorship by [Manifest](https://manifest.build/)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am
every weekday,every weekend" (UTC), 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/nobl9/sloctl).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTUuMSIsInVwZGF0ZWRJblZlciI6IjM4LjExNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJqYXZhc2NyaXB0IiwicmVub3ZhdGUiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ommand-for-getdeleteupdate-of-adjustments

# Conflicts:
#	package.json
internal/budgetadjustments/events/inputreader.go Outdated Show resolved Hide resolved
internal/budgetadjustments/events/inputreader.go Outdated Show resolved Hide resolved
internal/budgetadjustments/events/delete.go Outdated Show resolved Hide resolved
internal/budgetadjustments/events/flags.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
internal/budgetadjustments/events/delete.go Outdated Show resolved Hide resolved
test/adjustments.bats Outdated Show resolved Hide resolved
@piotrkazulak piotrkazulak force-pushed the PC-13433-sloctl-new-command-for-getdeleteupdate-of-adjustments branch from d1add0c to ad22a73 Compare November 13, 2024 10:51
internal/budgetadjustments/events/update.go Show resolved Hide resolved
internal/replay.go Show resolved Hide resolved
internal/replay.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants