From afd457a534fe34cd654410f8aa1523eb91354351 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:21:54 +0100 Subject: [PATCH] Update golang (packages) (#3564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/cenkalti/backoff/v4](https://togithub.com/cenkalti/backoff) | `v4.2.1` -> `v4.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.2.1/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.2.1/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/charmbracelet/huh/spinner](https://togithub.com/charmbracelet/huh) | `v0.0.0-20240306161957-71f31c155b08` -> `v0.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2fhuh%2fspinner/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcharmbracelet%2fhuh%2fspinner/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcharmbracelet%2fhuh%2fspinner/v0.0.0-20240306161957-71f31c155b08/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2fhuh%2fspinner/v0.0.0-20240306161957-71f31c155b08/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/distribution/reference](https://togithub.com/distribution/reference) | `v0.5.0` -> `v0.6.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fdistribution%2freference/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fdistribution%2freference/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fdistribution%2freference/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fdistribution%2freference/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/expr-lang/expr](https://togithub.com/expr-lang/expr) | `v1.16.2` -> `v1.16.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fexpr-lang%2fexpr/v1.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fexpr-lang%2fexpr/v1.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fexpr-lang%2fexpr/v1.16.2/v1.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fexpr-lang%2fexpr/v1.16.2/v1.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/go-sql-driver/mysql](https://togithub.com/go-sql-driver/mysql) | `v1.8.0` -> `v1.8.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-sql-driver%2fmysql/v1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgo-sql-driver%2fmysql/v1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgo-sql-driver%2fmysql/v1.8.0/v1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-sql-driver%2fmysql/v1.8.0/v1.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
cenkalti/backoff (github.com/cenkalti/backoff/v4) ### [`v4.3.0`](https://togithub.com/cenkalti/backoff/compare/v4.2.1...v4.3.0) [Compare Source](https://togithub.com/cenkalti/backoff/compare/v4.2.1...v4.3.0)
charmbracelet/huh (github.com/charmbracelet/huh/spinner) ### [`v0.3.0`](https://togithub.com/charmbracelet/huh/releases/tag/v0.3.0) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.2.3...v0.3.0) ### Scrolling, autocomplete, smaller binaries and more! This is a big release with a tonne of new features. - Scrollable Forms - Scrollable Selects and Multi selects - Autocomplete for inputs - 7x smaller binaries - Multi select filtering - Lotsa' bugfixes and quality-of-life improvements To upgrade to `huh` v0.3.0: ```bash go get -u github.com/charmbracelet/huh@latest ``` For details read on! #### Scrollable forms If a form is in a small terminal it will automatically resize to fit the available space and the active group will scroll to stay in view. Form heights can also be set manually with the new [`WithHeight`](https://pkg.go.dev/github.com/charmbracelet/huh@v0.3.0#Form.WithHeight) method. Made with
VHS #### Select and Multi select Scrolling Select and Multi select fields can now be restricted to a certain height, allowing their options to be scrollable. This means you can now pack in tonnes of options. To make a `Select` or `MultiSelect` scrollable simply set the height on the field or form through the `Height` method. ```go s := huh.NewSelect() .Title("What’s for dinner?") .Options(/* ... */) .Height(height) ``` Made with
VHS #### Autocomplete Now `Input`s can offer suggestions making it easier for users to fill out inputs. These suggestions can be accepted autocomplete-style with a configurable key binding (which defaults to ctrl+e). Simply provide a `[]string` to `Suggestions` to enable this feature. ```go huh.NewInput(). Title("What's for lunch?"). Prompt("? "). Suggestions([]string{ "Artichoke", // ... "Cashew Apple", "Cashews", "Cat Food", "Coconut Milk", "Cucumber", "Curry Paste", "Currywurst", // ... }) ``` Made with
VHS #### More helpful help Forms will automatically adjust their help text to indicate to the user whether the form will continue or submit on actions. This works with hidden groups. In the below example, the user will be asked to list their allergies if they select "Yes" otherwise, the form will submit. Made with
VHS #### Way smaller binaries Huh now produces way smaller binaries! Thanks to [#​94](https://togithub.com/charmbracelet/huh/issues/94) Huh now has a 7x smaller compiled footprint. Before, using `huh@v0.2.3`: 33M ./burger After, using `huh@v0.3.0`: 4.5M ./burger #### Thanks, Vitor! Special thanks to the intrepid [@​vitor-mariano](https://togithub.com/vitor-mariano), one of the earliest `huh` contributors, who came in hot with features, fixes, improvements and good vibes. Thank you, Vitor! #### Changelog ##### New - scrollable multi-select by [@​meowgorithm](https://togithub.com/meowgorithm) in [https://github.com/charmbracelet/huh/pull/71](https://togithub.com/charmbracelet/huh/pull/71) - scrollable select by [@​meowgorithm](https://togithub.com/meowgorithm) in [https://github.com/charmbracelet/huh/pull/76](https://togithub.com/charmbracelet/huh/pull/76) - feat: enable filtering on MultiSelect by [@​vitor-mariano](https://togithub.com/vitor-mariano) in [https://github.com/charmbracelet/huh/pull/81](https://togithub.com/charmbracelet/huh/pull/81) - skippable Fields by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/116](https://togithub.com/charmbracelet/huh/pull/116) - autocomplete suggestions on inputs by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/93](https://togithub.com/charmbracelet/huh/pull/93) - scroll form Inputs by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/95](https://togithub.com/charmbracelet/huh/pull/95) - next / previous dynamic help by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/104](https://togithub.com/charmbracelet/huh/pull/104) - reduce binary size by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/94](https://togithub.com/charmbracelet/huh/pull/94) ##### Fixed - fix Select and MultiSelect height when unfocused by [@​vitor-mariano](https://togithub.com/vitor-mariano) in [https://github.com/charmbracelet/huh/pull/80](https://togithub.com/charmbracelet/huh/pull/80) - use CharLimit in textinput by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/79](https://togithub.com/charmbracelet/huh/pull/79) - select viewport on filtering by [@​vitor-mariano](https://togithub.com/vitor-mariano) in [https://github.com/charmbracelet/huh/pull/84](https://togithub.com/charmbracelet/huh/pull/84) - set default theme on inputs by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/92](https://togithub.com/charmbracelet/huh/pull/92) - multiselect: set height in WithHeight by [@​ardnew](https://togithub.com/ardnew) in [https://github.com/charmbracelet/huh/pull/118](https://togithub.com/charmbracelet/huh/pull/118) - shift+tab would fail if first group is hidden by [@​caarlos0](https://togithub.com/caarlos0) in [https://github.com/charmbracelet/huh/pull/103](https://togithub.com/charmbracelet/huh/pull/103) - prevField should not select skippable fields by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/huh/pull/121](https://togithub.com/charmbracelet/huh/pull/121) **Full Changelog**: https://github.com/charmbracelet/huh/compare/v0.2.3...v0.3.0 *** The Charm logo Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@​charm), or on [Discord](https://charm.sh/chat). ### [`v0.2.3`](https://togithub.com/charmbracelet/huh/releases/tag/v0.2.3) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.2.2...v0.2.3) #### Better Defaults! Huh? `v0.2.3` fixes some bugs for more consistent behaviour across inputs 🐞 - `Text` inputs now update values on each keystroke rather than on `Blur` for consistency. - `Select` and `MultiSelect` read their default values from the initial values set by the `Value` variable if provided. A *special* thanks to [@​vitor-mariano](https://togithub.com/vitor-mariano) for all his contributions to this release πŸ€— ##### Defaults Example You can now have preselected options by declaring them in the `Value` variable: ```go var toppings = []string{"Lettuce", "Tomatoes"} var options = huh.NewOptions("Lettuce", "Tomatoes", "Charm Sauce", "Cheese", "Vegan Cheese") huh.NewMultiSelect[string]().Title("Toppings").Options(options...).Value(&toppings).Run() ``` In the above example, `Lettuce` and `Tomatoes` will be preselected by default. #### What's Changed - `Text` value updates by [@​vitor-mariano](https://togithub.com/vitor-mariano) in [https://github.com/charmbracelet/huh/pull/64](https://togithub.com/charmbracelet/huh/pull/64) - Prefill `Select` and `MultiSelect` inputs with default values by [@​vitor-mariano](https://togithub.com/vitor-mariano) in [https://github.com/charmbracelet/huh/pull/62](https://togithub.com/charmbracelet/huh/pull/62) **Full Changelog**: https://github.com/charmbracelet/huh/compare/v0.2.2...v0.2.3 *** The Charm logo Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@​charm), or on [Discord](https://charm.sh/chat). ### [`v0.2.2`](https://togithub.com/charmbracelet/huh/releases/tag/v0.2.2) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.2.1...v0.2.2) #### Better Wrapping 🎁 `Huh?` v0.2.2 improves wrapping of the `Input` and `Text` fields. It applies width set on the form to the inputs to perform wrapping based on the specified or terminal width. - Fixed in [https://github.com/charmbracelet/huh/pull/60](https://togithub.com/charmbracelet/huh/pull/60) #### New Contributors - [@​ddddddO](https://togithub.com/ddddddO) made their first contribution in [https://github.com/charmbracelet/huh/pull/56](https://togithub.com/charmbracelet/huh/pull/56) - [@​vitor-mariano](https://togithub.com/vitor-mariano) made their first contribution in [https://github.com/charmbracelet/huh/pull/57](https://togithub.com/charmbracelet/huh/pull/57) **Full Changelog**: https://github.com/charmbracelet/huh/compare/v0.2.1...v0.2.2 *** The Charm logo Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.social/@​charmcli), or [Discord](https://charm.sh/chat). ### [`v0.2.1`](https://togithub.com/charmbracelet/huh/releases/tag/v0.2.1) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.2.0...v0.2.1) ### New Theme! 😸 `huh?` forms can now use Catppuccin themes. (Thanks to the wonderful [@​sgoudham](https://togithub.com/sgoudham) ✨) Simply add the following to your `huh.Form`s: ```go .WithTheme(huh.ThemeCatppuccin()) ``` *** The Charm logo Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.social/@​charmcli), or [Discord](https://charm.sh/chat). ### [`v0.2.0`](https://togithub.com/charmbracelet/huh/releases/tag/v0.2.0) [Compare Source](https://togithub.com/charmbracelet/huh/compare/v0.1.0...v0.2.0) ### Better Help Styles! `Help` Styles now apply on a `Theme` rather than embedded in `FieldStyles`. (Thanks to the wonderful [@​jolheiser](https://togithub.com/jolheiser) ✨) ```go // Old... theme.Focused.Help.ShortKey = lipgloss.NewStyle() //... // Updated! theme.Help.ShortKey = lipgloss.NewStyle() //... ``` *** The Charm logo Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.social/@​charmcli), or [Discord](https://charm.sh/chat).
distribution/reference (github.com/distribution/reference) ### [`v0.6.0`](https://togithub.com/distribution/reference/releases/tag/v0.6.0) [Compare Source](https://togithub.com/distribution/reference/compare/v0.5.0...v0.6.0) #### What's Changed - remove deprecated SplitHostname by [@​thaJeztah](https://togithub.com/thaJeztah) in [https://github.com/distribution/reference/pull/5](https://togithub.com/distribution/reference/pull/5) - refactor splitDockerDomain to include more documentation by [@​thaJeztah](https://togithub.com/thaJeztah) in [https://github.com/distribution/reference/pull/7](https://togithub.com/distribution/reference/pull/7) - fix typo in readme by [@​xrstf](https://togithub.com/xrstf) in [https://github.com/distribution/reference/pull/10](https://togithub.com/distribution/reference/pull/10) - Exclude domain from name length check by [@​ozairasim](https://togithub.com/ozairasim) in [https://github.com/distribution/reference/pull/9](https://togithub.com/distribution/reference/pull/9) #### New Contributors - [@​xrstf](https://togithub.com/xrstf) made their first contribution in [https://github.com/distribution/reference/pull/10](https://togithub.com/distribution/reference/pull/10) - [@​ozairasim](https://togithub.com/ozairasim) made their first contribution in [https://github.com/distribution/reference/pull/9](https://togithub.com/distribution/reference/pull/9) **Full Changelog**: https://github.com/distribution/reference/compare/v0.5.0...v0.6.0
expr-lang/expr (github.com/expr-lang/expr) ### [`v1.16.3`](https://togithub.com/expr-lang/expr/releases/tag/v1.16.3) [Compare Source](https://togithub.com/expr-lang/expr/compare/v1.16.2...v1.16.3) **Expr** is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed. ```go program, err := expr.Compile(`let x = 2 + 2; x ^ x`) output, err := expr.Run(program, env) ``` **In this release**: - Improved printing for maps: `{(foo + bar): 42}` **Expr Editor** The [Expr Editor](https://expr-lang.org/editor) is an embeddable code editor written in JavaScript with full support of Expr language. **Expr Pro** [Expr Pro](https://expr-lang.org/expr-pro) is a set of extensions for Expr for advanced use cases. It includes expressions explanation, performance profiling, and more.
go-sql-driver/mysql (github.com/go-sql-driver/mysql) ### [`v1.8.1`](https://togithub.com/go-sql-driver/mysql/releases/tag/v1.8.1) [Compare Source](https://togithub.com/go-sql-driver/mysql/compare/v1.8.0...v1.8.1) #### What's Changed Bugfixes: - fix race condition when context is canceled in [#​1562](https://togithub.com/go-sql-driver/mysql/pull/1562) and [#​1570](https://togithub.com/go-sql-driver/mysql/pull/1570) **Full Changelog**: https://github.com/go-sql-driver/mysql/compare/v1.8.0...v1.8.1
--- ### Configuration πŸ“… **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC). 🚦 **Automerge**: Enabled. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ‘» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] 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/woodpecker-ci/woodpecker). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: qwerty287 --- agent/runner.go | 2 +- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- server/cron/cron.go | 5 ++--- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/agent/runner.go b/agent/runner.go index 22a8729ef..20fc1d40e 100644 --- a/agent/runner.go +++ b/agent/runner.go @@ -50,7 +50,7 @@ func NewRunner(workEngine rpc.Peer, f rpc.Filter, h string, state *State, backen } } -func (r *Runner) Run(runnerCtx context.Context) error { +func (r *Runner) Run(runnerCtx context.Context) error { //nolint:contextcheck log.Debug().Msg("request next execution") meta, _ := metadata.FromOutgoingContext(runnerCtx) diff --git a/go.mod b/go.mod index 2d7056dd1..3911834ec 100644 --- a/go.mod +++ b/go.mod @@ -11,21 +11,21 @@ require ( github.com/alessio/shellescape v1.4.2 github.com/bmatcuk/doublestar/v4 v4.6.1 github.com/caddyserver/certmagic v0.20.0 - github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/charmbracelet/huh v0.3.0 - github.com/charmbracelet/huh/spinner v0.0.0-20240306161957-71f31c155b08 + github.com/charmbracelet/huh/spinner v0.0.0-20240327025511-ec643317aa10 github.com/distribution/reference v0.5.0 github.com/docker/cli v24.0.9+incompatible github.com/docker/docker v24.0.9+incompatible github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 github.com/drone/envsubst v1.0.3 - github.com/expr-lang/expr v1.16.2 + github.com/expr-lang/expr v1.16.3 github.com/franela/goblin v0.0.0-20211003143422-0a4f594942bf github.com/fsnotify/fsnotify v1.7.0 github.com/gin-gonic/gin v1.9.1 github.com/go-ap/httpsig v0.0.0-20221203064646-3647b4d88fdf - github.com/go-sql-driver/mysql v1.8.0 + github.com/go-sql-driver/mysql v1.8.1 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/go-github/v60 v60.0.0 github.com/google/tink/go v1.7.0 diff --git a/go.sum b/go.sum index 27e1b5e43..10da8303d 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,8 @@ github.com/caddyserver/certmagic v0.20.0 h1:bTw7LcEZAh9ucYCRXyCpIrSAGplplI0vGYJ4 github.com/caddyserver/certmagic v0.20.0/go.mod h1:N4sXgpICQUskEWpj7zVzvWD41p3NYacrNoZYiRM2jTg= github.com/catppuccin/go v0.2.0 h1:ktBeIrIP42b/8FGiScP9sgrWOss3lw0Z5SktRoithGA= github.com/catppuccin/go v0.2.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= @@ -52,8 +52,8 @@ github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= github.com/charmbracelet/huh v0.3.0 h1:CxPplWkgW2yUTDDG0Z4S5HH8SJOosWHd4LxCvi0XsKE= github.com/charmbracelet/huh v0.3.0/go.mod h1:fujUdKX8tC45CCSaRQdw789O6uaCRwx8l2NDyKfC4jA= -github.com/charmbracelet/huh/spinner v0.0.0-20240306161957-71f31c155b08 h1:kO5eMMxyCJ6m7gdpGQ7OomrMdfsKVPgC4aB/focl/HE= -github.com/charmbracelet/huh/spinner v0.0.0-20240306161957-71f31c155b08/go.mod h1:nrBG0YEHaxdbqHXW1xvG1hPqkuac9Eg7RTMvogiXuz0= +github.com/charmbracelet/huh/spinner v0.0.0-20240327025511-ec643317aa10 h1:/HZJSyFVH5rB1MlCDfkhQhRbLPD2Er29ngWXiUQ8bik= +github.com/charmbracelet/huh/spinner v0.0.0-20240327025511-ec643317aa10/go.mod h1:nrBG0YEHaxdbqHXW1xvG1hPqkuac9Eg7RTMvogiXuz0= github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg= github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -108,8 +108,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/expr-lang/expr v1.16.2 h1:JvMnzUs3LeVHBvGFcXYmXo+Q6DPDmzrlcSBO6Wy3w4s= -github.com/expr-lang/expr v1.16.2/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= +github.com/expr-lang/expr v1.16.3 h1:NLldf786GffptcXNxxJx5dQ+FzeWDKChBDqOOwyK8to= +github.com/expr-lang/expr v1.16.3/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -152,8 +152,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4= -github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= diff --git a/server/cron/cron.go b/server/cron/cron.go index bce8374d5..a5dfc27fa 100644 --- a/server/cron/cron.go +++ b/server/cron/cron.go @@ -54,7 +54,7 @@ func Start(ctx context.Context, store store.Store, forge forge.Forge) error { } for _, cron := range crons { - if err := runCron(store, forge, cron, now); err != nil { + if err := runCron(ctx, store, forge, cron, now); err != nil { log.Error().Err(err).Int64("cronID", cron.ID).Msg("run cron failed") } } @@ -77,9 +77,8 @@ func CalcNewNext(schedule string, now time.Time) (time.Time, error) { return c.Next(now), nil } -func runCron(store store.Store, forge forge.Forge, cron *model.Cron, now time.Time) error { +func runCron(ctx context.Context, store store.Store, forge forge.Forge, cron *model.Cron, now time.Time) error { log.Trace().Msgf("cron: run id[%d]", cron.ID) - ctx := context.Background() newNext, err := CalcNewNext(cron.Schedule, now) if err != nil {