chore(deps): update minor-updates
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
github.com/fsnotify/fsnotify | require | minor |
v1.6.0 -> v1.7.0
|
github.com/spf13/cobra | require | minor |
v1.7.0 -> v1.8.0
|
github.com/spf13/viper | require | minor |
v1.15.0 -> v1.18.2
|
github.com/stretchr/testify | require | minor |
v1.8.4 -> v1.9.0
|
sigs.k8s.io/controller-runtime | require | minor |
v0.14.6 -> v0.18.0
|
Release Notes
fsnotify/fsnotify (github.com/fsnotify/fsnotify)
v1.7.0
This version of fsnotify needs Go 1.17.
Additions
-
illumos: add FEN backend to support illumos and Solaris. (#371)
-
all: add
NewBufferedWatcher()
to use a buffered channel, which can be useful in cases where you can't control the kernel buffer and receive a large number of events in bursts. (#550, #572) -
all: add
AddWith()
, which is identical toAdd()
but allows passing options. (#521) -
windows: allow setting the ReadDirectoryChangesW() buffer size with
fsnotify.WithBufferSize()
; the default of 64K is the highest value that works on all platforms and is enough for most purposes, but in some cases a highest buffer is needed. (#521)
Changes and fixes
-
inotify: remove watcher if a watched path is renamed (#518)
After a rename the reported name wasn't updated, or even an empty string. Inotify doesn't provide any good facilities to update it, so just remove the watcher. This is already how it worked on kqueue and FEN.
On Windows this does work, and remains working.
-
windows: don't listen for file attribute changes (#520)
File attribute changes are sent as
FILE_ACTION_MODIFIED
by the Windows API, with no way to see if they're a file write or attribute change, so would show up as a fsnotify.Write event. This is never useful, and could result in many spurious Write events. -
windows: return
ErrEventOverflow
if the buffer is full (#525)Before it would merely return "short read", making it hard to detect this error.
-
kqueue: make sure events for all files are delivered properly when removing a watched directory (#526)
Previously they would get sent with
""
(empty string) or"."
as the path name. -
kqueue: don't emit spurious Create events for symbolic links (#524)
The link would get resolved but kqueue would "forget" it already saw the link itself, resulting on a Create for every Write event for the directory.
-
all: return
ErrClosed
onAdd()
when the watcher is closed (#516) -
other: add
Watcher.Errors
andWatcher.Events
to the no-opWatcher
inbackend_other.go
, making it easier to use on unsupported platforms such as WASM, AIX, etc. (#528) -
other: use the
backend_other.go
no-op if theappengine
build tag is set; Google AppEngine forbids usage of the unsafe package so the inotify backend won't compile there.
spf13/cobra (github.com/spf13/cobra)
v1.8.0
✨ Features
- Support usage as plugin for tools like kubectl by @nirs in https://github.com/spf13/cobra/pull/2018 - this means that programs that utilize a "plugin-like" structure have much better support and usage (like for completions, command paths, etc.)
- Move documentation sources to site/content by @umarcor in https://github.com/spf13/cobra/pull/1428
- Add 'one required flag' group by @marevers in https://github.com/spf13/cobra/pull/1952 - this includes a new
MarkFlagsOneRequired
API for flags which can be used to mark a flag group as required and cause command failure if at least one is not used when invoked. - Customizable error message prefix by @5ouma in https://github.com/spf13/cobra/pull/2023 - This adds the
SetErrPrefix
andErrPrefix
APIs on theCommand
struct to allow for setting a custom prefix for errors - feat: add getters for flag completions by @avirtopeanu-ionos in https://github.com/spf13/cobra/pull/1943
- Feature: allow running persistent run hooks of all parents by @vkhoroz in https://github.com/spf13/cobra/pull/2044
- Improve API to get flag completion function by @marckhouzam in https://github.com/spf13/cobra/pull/2063
🐛 Bug fixes
- Fix typo in fish completions by @twpayne in https://github.com/spf13/cobra/pull/1945
- Fix grammar: 'allows to' by @supertassu in https://github.com/spf13/cobra/pull/1978
- powershell: escape variable with curly brackets by @Luap99 in https://github.com/spf13/cobra/pull/1960
- Don't complete --help flag when flag parsing disabled by @marckhouzam in https://github.com/spf13/cobra/pull/2061
- Replace all non-alphanumerics in active help env var program prefix by @scop in https://github.com/spf13/cobra/pull/1940
🔧 Maintenance
- build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 by @dependabot in https://github.com/spf13/cobra/pull/1971
- build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 by @dependabot in https://github.com/spf13/cobra/pull/1976
- build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 by @dependabot in https://github.com/spf13/cobra/pull/2021
- build(deps): bump actions/setup-go from 3 to 4 by @dependabot in https://github.com/spf13/cobra/pull/1934
- build(deps): bump github.com/cpuguy83/go-md2man/v2 from 2.0.2 to 2.0.3 by @dependabot in https://github.com/spf13/cobra/pull/2047
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in https://github.com/spf13/cobra/pull/2028
- command: temporarily disable G602 due to securego/gosec#1005 by @umarcor in https://github.com/spf13/cobra/pull/2022
🧪 Testing & CI/CD
- test: make fish_completions_test more robust by @branchvincent in https://github.com/spf13/cobra/pull/1980
- golangci: enable 'unused' and disable deprecated replaced by it by @umarcor in https://github.com/spf13/cobra/pull/1983
- cleanup: minor corrections to unit tests by @JunNishimura in https://github.com/spf13/cobra/pull/2003
- ci: test golang 1.21 by @nunoadrego in https://github.com/spf13/cobra/pull/2024
- Fix linter errors by @marckhouzam in https://github.com/spf13/cobra/pull/2052
- Add tests for flag completion registration by @marckhouzam in https://github.com/spf13/cobra/pull/2053
✏ ️ Documentation
- doc: fix typo, Deperecated -> Deprecated by @callthingsoff in https://github.com/spf13/cobra/pull/2000
- Add notes to doc about the execution condition of *PreRun and *PostRun functions by @haoming29 in https://github.com/spf13/cobra/pull/2041
Thank you everyone who contributed to this release and all your hard work! Cobra and this community would never be possible without all of you!!!!
Full Changelog: https://github.com/spf13/cobra/compare/v1.7.0...v1.8.0
spf13/viper (github.com/spf13/viper)
v1.18.2
tl;dr Skip 1.18.0 and 1.18.1 and upgrade to this version instead.
This release fixes a regression that appears in rare circumstances when using Unmarshal
or UnmarshalExact
to decode values onto pointers with multiple indirection (eg. pointer to a pointer, etc). The change was introduced in 1.18.0 as a means to resolve a long-standing bug when decoding environment variables to structs.
The feature is now disabled by default and can be enabled using the viper_bind_struct
build tag. It's also considered experimental at this point, so breaking changes may be introduced in the future.
What's Changed
🐛
Bug Fixes - feat!: hide struct binding behind a feature flag by @sagikazarmark in https://github.com/spf13/viper/pull/1715
Full Changelog: https://github.com/spf13/viper/compare/v1.18.1...v1.18.2
v1.18.1
What's Changed
🐛
Bug Fixes - Merge missing struct keys inside UnmarshalExact by @krakowski in https://github.com/spf13/viper/pull/1704
Full Changelog: https://github.com/spf13/viper/compare/v1.18.0...v1.18.1
v1.18.0
Major changes
Highlighting some of the changes for better visibility.
Please share your feedback in the Discussion forum. Thanks!
AutomaticEnv
works with Unmarshal
Previously, environment variables that weren't bound manually or had no defaults could not be mapped by Unmarshal
. (The problem is explained in details in this issue: #761)
#1429 introduced a solution that solves that issue.
What's Changed
🚀
Enhancements - chore: rename files according to enabled build tags by @alexandear in https://github.com/spf13/viper/pull/1642
- test: replace ifs with asserts to simplify tests by @alexandear in https://github.com/spf13/viper/pull/1656
- ci: enable test shuffle and fix tests by @alexandear in https://github.com/spf13/viper/pull/1643
- fix: gocritic lint issues by @alexandear in https://github.com/spf13/viper/pull/1696
🐛
Bug Fixes - Implement viper.BindStruct for automatic unmarshalling from environment variables by @krakowski in https://github.com/spf13/viper/pull/1429
- fix isPathShadowedInFlatMap type cast bug by @linuxsong in https://github.com/spf13/viper/pull/1585
⬆ ️
Dependency Updates - build(deps): bump github/codeql-action from 2.21.9 to 2.22.3 by @dependabot in https://github.com/spf13/viper/pull/1661
- build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0 by @dependabot in https://github.com/spf13/viper/pull/1659
- build(deps): bump actions/checkout from 4.1.0 to 4.1.1 by @dependabot in https://github.com/spf13/viper/pull/1663
- build(deps): bump actions/github-script from 6.4.1 to 7.0.1 by @dependabot in https://github.com/spf13/viper/pull/1686
- build(deps): bump github/codeql-action from 2.22.3 to 2.22.8 by @dependabot in https://github.com/spf13/viper/pull/1688
- build(deps): bump github.com/spf13/afero from 1.10.0 to 1.11.0 by @dependabot in https://github.com/spf13/viper/pull/1692
- build(deps): bump actions/dependency-review-action from 3.1.0 to 3.1.4 by @dependabot in https://github.com/spf13/viper/pull/1690
- build(deps): bump cachix/install-nix-action from 23 to 24 by @dependabot in https://github.com/spf13/viper/pull/1689
- build(deps): bump github.com/nats-io/nkeys from 0.4.5 to 0.4.6 by @dependabot in https://github.com/spf13/viper/pull/1672
- build(deps): bump github.com/spf13/cast from 1.5.1 to 1.6.0 by @dependabot in https://github.com/spf13/viper/pull/1691
- build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0 by @dependabot in https://github.com/spf13/viper/pull/1668
- chore: update dependencies by @sagikazarmark in https://github.com/spf13/viper/pull/1694
- chore: update crypt by @sagikazarmark in https://github.com/spf13/viper/pull/1701
Other Changes
- Add info about multiple hosts for remote config by @KaymeKaydex in https://github.com/spf13/viper/pull/1684
- refactor: drop fsonitfy wrapper by @sagikazarmark in https://github.com/spf13/viper/pull/1693
- Note Get* behavior on parse failure by @scop in https://github.com/spf13/viper/pull/1687
- fix: godot lint issues by @alexandear in https://github.com/spf13/viper/pull/1657
New Contributors
- @KaymeKaydex made their first contribution in https://github.com/spf13/viper/pull/1684
- @krakowski made their first contribution in https://github.com/spf13/viper/pull/1429
- @linuxsong made their first contribution in https://github.com/spf13/viper/pull/1585
Full Changelog: https://github.com/spf13/viper/compare/v1.17.0...v1.18.0
v1.17.0
Major changes
Highlighting some of the changes for better visibility.
Please share your feedback in the Discussion forum. Thanks!
Minimum Go version: 1.19
Viper now requires Go 1.19
This change ensures we can stay up to date with modern practices and dependencies.
log/slog
support [BREAKING]
Viper v1.11.0 added an experimental Logger
interface to allow custom implementations (besides jwalterweatherman).
In addition, it also exposed an experimental WithLogger
function allowing to set a custom logger.
This release deprecates that interface in favor of log/slog released in Go 1.21.
[!WARNING]
WithLogger
accepts an *slog.Logger from now on.
To preserve backwards compatibility with older Go versions, prior to Go 1.21 Viper accepts a *golang.org/x/exp/slog.Logger.
The experimental flag is removed.
New finder implementation [BREAKING]
As of this release, Viper uses a new library to look for files, called locafero.
The new library is better covered by tests and has been built from scratch as a general purpose file finder library.
The implementation is experimental and is hidden behind a finder
build tag.
[!WARNING] The
io/fs
based implementation (that used to be hidden behind afinder
build tag) has been removed.
What's Changed
🎉
Exciting New Features - Add NATS support by @hooksie1 in https://github.com/spf13/viper/pull/1590
- Add slog support by @sagikazarmark in https://github.com/spf13/viper/pull/1627
🚀
Enhancements - chore: add local development environment using nix by @sagikazarmark in https://github.com/spf13/viper/pull/1572
- feat: add func GetEnvPrefix by @baruchiro in https://github.com/spf13/viper/pull/1565
- Improve dev env by @sagikazarmark in https://github.com/spf13/viper/pull/1575
- fix: code optimization by @testwill in https://github.com/spf13/viper/pull/1557
- test: remove not needed testutil.Setenv by @alexandear in https://github.com/spf13/viper/pull/1610
- new finder library based on afero by @sagikazarmark in https://github.com/spf13/viper/pull/1625
- refactor: make use of
strings.Cut
by @scop in https://github.com/spf13/viper/pull/1650
🛠
Breaking Changes - feat: drop support for Go 1.17 by @sagikazarmark in https://github.com/spf13/viper/pull/1574
⬆ ️
Dependency Updates - build(deps): bump mheap/github-action-required-labels from 4 to 5 by @dependabot in https://github.com/spf13/viper/pull/1563
- build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 by @dependabot in https://github.com/spf13/viper/pull/1558
- build(deps): bump cachix/install-nix-action from 21 to 22 by @dependabot in https://github.com/spf13/viper/pull/1573
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9 by @dependabot in https://github.com/spf13/viper/pull/1586
- chore: upgrade crypt by @sagikazarmark in https://github.com/spf13/viper/pull/1589
- build(deps): bump actions/checkout from 3.5.3 to 4.0.0 by @dependabot in https://github.com/spf13/viper/pull/1616
- build(deps): bump github/codeql-action from 2.21.2 to 2.21.5 by @dependabot in https://github.com/spf13/viper/pull/1615
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0 by @dependabot in https://github.com/spf13/viper/pull/1614
- build(deps): bump actions/dependency-review-action from 3.0.6 to 3.0.8 by @dependabot in https://github.com/spf13/viper/pull/1605
- build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 by @dependabot in https://github.com/spf13/viper/pull/1604
- build(deps): bump actions/setup-go from 4.0.1 to 4.1.0 by @dependabot in https://github.com/spf13/viper/pull/1593
- build(deps): bump github.com/subosito/gotenv from 1.4.2 to 1.6.0 by @dependabot in https://github.com/spf13/viper/pull/1603
- build(deps): bump cachix/install-nix-action from 22 to 23 by @dependabot in https://github.com/spf13/viper/pull/1620
- chore(deps): update crypt by @sagikazarmark in https://github.com/spf13/viper/pull/1621
- build(deps): bump actions/dependency-review-action from 3.0.8 to 3.1.0 by @dependabot in https://github.com/spf13/viper/pull/1623
- Bump minimum Go version to 1.19 by @sagikazarmark in https://github.com/spf13/viper/pull/1626
- build(deps): bump github/codeql-action from 2.21.5 to 2.21.6 by @dependabot in https://github.com/spf13/viper/pull/1632
- build(deps): bump github/codeql-action from 2.21.6 to 2.21.7 by @dependabot in https://github.com/spf13/viper/pull/1634
- build(deps): bump actions/checkout from 4.0.0 to 4.1.0 by @dependabot in https://github.com/spf13/viper/pull/1641
- build(deps): bump github.com/spf13/afero from 1.9.5 to 1.10.0 by @dependabot in https://github.com/spf13/viper/pull/1640
- build(deps): bump github/codeql-action from 2.21.7 to 2.21.8 by @dependabot in https://github.com/spf13/viper/pull/1638
- build(deps): bump github/codeql-action from 2.21.8 to 2.21.9 by @dependabot in https://github.com/spf13/viper/pull/1648
- chore(deps): update crypt by @sagikazarmark in https://github.com/spf13/viper/pull/1652
Other Changes
- [StepSecurity] ci: Harden GitHub Actions by @step-security-bot in https://github.com/spf13/viper/pull/1592
- Add Vitess to list of projects using Viper by @systay in https://github.com/spf13/viper/pull/1619
- docs: fix typos in comments by @alexandear in https://github.com/spf13/viper/pull/1609
- ci: add Go 1.21 to the test matrix by @sagikazarmark in https://github.com/spf13/viper/pull/1622
- Remove usages of deprecated io/ioutil; simplify viper tests by @alexandear in https://github.com/spf13/viper/pull/1631
- chore: remove deprecated build tags by @alexandear in https://github.com/spf13/viper/pull/1630
- refactor: replace 'interface{}' with 'any' by @alexandear in https://github.com/spf13/viper/pull/1646
- test: refactor asserts by @alexandear in https://github.com/spf13/viper/pull/1644
- docs: add set subset KV example by @yhliyr in https://github.com/spf13/viper/pull/1647
- Make deps fixes by @bersace in https://github.com/spf13/viper/pull/1628
New Contributors
- @goldeneggg made their first contribution in https://github.com/spf13/viper/pull/1561
- @baruchiro made their first contribution in https://github.com/spf13/viper/pull/1565
- @testwill made their first contribution in https://github.com/spf13/viper/pull/1557
- @step-security-bot made their first contribution in https://github.com/spf13/viper/pull/1592
- @systay made their first contribution in https://github.com/spf13/viper/pull/1619
- @alexandear made their first contribution in https://github.com/spf13/viper/pull/1609
- @hooksie1 made their first contribution in https://github.com/spf13/viper/pull/1590
- @yhliyr made their first contribution in https://github.com/spf13/viper/pull/1647
- @bersace made their first contribution in https://github.com/spf13/viper/pull/1628
- @scop made their first contribution in https://github.com/spf13/viper/pull/1650
Full Changelog: https://github.com/spf13/viper/compare/v1.16.0...v1.17.0
v1.16.0
What's Changed
🚀
Enhancements - Sub parent inheritance by @TaylorOno in https://github.com/spf13/viper/pull/1056
- fix: fix typo by @yquansah in https://github.com/spf13/viper/pull/1523
- ci: add Go 1.20 to build matrix by @sagikazarmark in https://github.com/spf13/viper/pull/1506
- extend v.find() to handle stringToInt value types with stringToInt pflag #1435 by @vorishirne in https://github.com/spf13/viper/pull/1462
- add:viper: allow to disable internal log messages by @burgesQ in https://github.com/spf13/viper/pull/1483
- Allow ConfigParseError to unwrap by @andig in https://github.com/spf13/viper/pull/1433
🐛
Bug Fixes - fix: time.Duration slice type conversion by @UrbanskiDawid in https://github.com/spf13/viper/pull/1498
⬆ ️
Dependency Updates - build(deps): bump mheap/github-action-required-labels from 3 to 4 by @dependabot in https://github.com/spf13/viper/pull/1533
- build(deps): bump actions/setup-go from 3 to 4 by @dependabot in https://github.com/spf13/viper/pull/1526
- build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0 by @dependabot in https://github.com/spf13/viper/pull/1519
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.7 by @dependabot in https://github.com/spf13/viper/pull/1516
- build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 by @dependabot in https://github.com/spf13/viper/pull/1515
- build(deps): bump github.com/spf13/afero from 1.9.3 to 1.9.5 by @dependabot in https://github.com/spf13/viper/pull/1518
- build(deps): bump github.com/sagikazarmark/crypt from 0.9.0 to 0.10.0 by @dependabot in https://github.com/spf13/viper/pull/1550
- build(deps): bump github.com/spf13/cast from 1.5.0 to 1.5.1 by @dependabot in https://github.com/spf13/viper/pull/1551
- build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 by @dependabot in https://github.com/spf13/viper/pull/1553
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.7 to 2.0.8 by @dependabot in https://github.com/spf13/viper/pull/1555
Other Changes
- Update main image to better handle dark background by @Deleplace in https://github.com/spf13/viper/pull/1532
New Contributors
- @UrbanskiDawid made their first contribution in https://github.com/spf13/viper/pull/1498
- @TaylorOno made their first contribution in https://github.com/spf13/viper/pull/1056
- @yquansah made their first contribution in https://github.com/spf13/viper/pull/1523
- @Azanul made their first contribution in https://github.com/spf13/viper/pull/1544
- @Deleplace made their first contribution in https://github.com/spf13/viper/pull/1532
- @cfabianski made their first contribution in https://github.com/spf13/viper/pull/1552
- @vorishirne made their first contribution in https://github.com/spf13/viper/pull/1462
- @burgesQ made their first contribution in https://github.com/spf13/viper/pull/1483
- @andig made their first contribution in https://github.com/spf13/viper/pull/1433
Full Changelog: https://github.com/spf13/viper/compare/v1.15.0...v1.16.0
stretchr/testify (github.com/stretchr/testify)
v1.9.0
What's Changed
- Fix Go modules version by @SuperQ in https://github.com/stretchr/testify/pull/1394
- Document that require is not safe to call in created goroutines by @programmer04 in https://github.com/stretchr/testify/pull/1392
- Remove myself from MAINTAINERS.md by @mvdkleijn in https://github.com/stretchr/testify/pull/1367
- Correct spelling/grammar by @echarrod in https://github.com/stretchr/testify/pull/1389
- docs: Update URLs in README by @davidjb in https://github.com/stretchr/testify/pull/1349
- Update mockery link to Github Pages in README by @LandonTClipp in https://github.com/stretchr/testify/pull/1346
- docs: Fix typos in tests and comments by @alexandear in https://github.com/stretchr/testify/pull/1410
- CI: tests from go1.17 by @SuperQ in https://github.com/stretchr/testify/pull/1409
- Fix adding ? when no values passed by @lesichkovm in https://github.com/stretchr/testify/pull/1320
- codegen: use standard header for generated files by @dolmen in https://github.com/stretchr/testify/pull/1406
- mock: AssertExpectations log reason only on failure by @hikyaru-suzuki in https://github.com/stretchr/testify/pull/1360
- assert: fix flaky TestNeverTrue by @dolmen in https://github.com/stretchr/testify/pull/1417
- README: fix typos "set up" vs "setup" by @ossan-dev in https://github.com/stretchr/testify/pull/1428
- mock: move regexp compilation outside of
Called
by @aud10slave in https://github.com/stretchr/testify/pull/631 - assert: refactor internal func getLen() by @dolmen in https://github.com/stretchr/testify/pull/1445
- mock: deprecate type AnythingOfTypeArgument (#1434) by @dolmen in https://github.com/stretchr/testify/pull/1441
- Remove no longer needed assert.canConvert by @alexandear in https://github.com/stretchr/testify/pull/1470
- assert: ObjectsAreEqual: use time.Equal for time.Time types by @tscales in https://github.com/stretchr/testify/pull/1464
- Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/stretchr/testify/pull/1466
- Bump actions/setup-go from 3.2.0 to 4.1.0 by @dependabot in https://github.com/stretchr/testify/pull/1451
- fix: make EventuallyWithT concurrency safe by @czeslavo in https://github.com/stretchr/testify/pull/1395
- assert: fix httpCode and HTTPBody occur panic when http.Handler read Body by @hidu in https://github.com/stretchr/testify/pull/1484
- assert.EqualExportedValues: fix handling of arrays by @zrbecker in https://github.com/stretchr/testify/pull/1473
- .github: use latest Go versions by @kevinburkesegment in https://github.com/stretchr/testify/pull/1489
- assert: Deprecate EqualExportedValues by @HaraldNordgren in https://github.com/stretchr/testify/pull/1488
- suite: refactor test assertions by @alexandear in https://github.com/stretchr/testify/pull/1474
- suite: fix SetupSubTest and TearDownSubTest execution order by @linusbarth in https://github.com/stretchr/testify/pull/1471
- docs: Fix deprecation comments for http package by @alexandear in https://github.com/stretchr/testify/pull/1335
- Add map support doc comments to Subset and NotSubset by @jedevc in https://github.com/stretchr/testify/pull/1306
- TestErrorIs/TestNotErrorIs: check error message contents by @craig65535 in https://github.com/stretchr/testify/pull/1435
- suite: fix subtest names (fix #1501) by @dolmen in https://github.com/stretchr/testify/pull/1504
- assert: improve unsafe.Pointer tests by @dolmen in https://github.com/stretchr/testify/pull/1505
- assert: simplify isNil implementation by @dolmen in https://github.com/stretchr/testify/pull/1506
- assert.InEpsilonSlice: fix expected/actual order and other improvements by @dolmen in https://github.com/stretchr/testify/pull/1483
- Fix dependency cycle with objx #1292 by @dolmen in https://github.com/stretchr/testify/pull/1453
- mock: refactor TestIsArgsEqual by @dolmen in https://github.com/stretchr/testify/pull/1444
- mock: optimize argument matching checks by @dolmen in https://github.com/stretchr/testify/pull/1416
- assert: fix TestEventuallyTimeout by @dolmen in https://github.com/stretchr/testify/pull/1412
- CI: add go 1.21 in GitHub Actions by @dolmen in https://github.com/stretchr/testify/pull/1450
- suite: fix recoverAndFailOnPanic to report test failure at the right location by @dolmen in https://github.com/stretchr/testify/pull/1502
- Update maintainers by @brackendawson in https://github.com/stretchr/testify/pull/1533
- assert: Fix EqualValues to handle overflow/underflow by @arjunmahishi in https://github.com/stretchr/testify/pull/1531
- assert: better formatting for Len() error by @kevinburkesegment in https://github.com/stretchr/testify/pull/1485
- Ensure AssertExpectations does not fail in skipped tests by @ianrose14 in https://github.com/stretchr/testify/pull/1331
- suite: fix deadlock in suite.Require()/Assert() by @arjunmahishi in https://github.com/stretchr/testify/pull/1535
- Revert "assert: ObjectsAreEqual: use time.Equal for time.Time type" by @brackendawson in https://github.com/stretchr/testify/pull/1537
- [chore] Add issue templates by @arjunmahishi in https://github.com/stretchr/testify/pull/1538
- Update the build status badge by @brackendawson in https://github.com/stretchr/testify/pull/1540
- Update Github workflows setup-go to V5 by @hendrywiranto in https://github.com/stretchr/testify/pull/1545
- Support Pointer to Struct in EqualExportedValues by @Lucaber in https://github.com/stretchr/testify/pull/1517
- README: drop link to gorc by @guettli in https://github.com/stretchr/testify/pull/1248
- http_assertions: honour the msgAndArgs provided with each assertion by @arjunmahishi in https://github.com/stretchr/testify/pull/1548
- fix typos in comments and tests by @ccoVeille in https://github.com/stretchr/testify/pull/1247
- Include the auto-release notes in releases by @brackendawson in https://github.com/stretchr/testify/pull/1550
- Add
NotImplements
and variants by @hslatman in https://github.com/stretchr/testify/pull/1385 - Add support to compare uintptr by @bogdandrutu in https://github.com/stretchr/testify/pull/1339
- build(deps): bump github.com/stretchr/objx from 0.5.1 to 0.5.2 by @dependabot in https://github.com/stretchr/testify/pull/1552
New Contributors
- @SuperQ made their first contribution in https://github.com/stretchr/testify/pull/1394
- @programmer04 made their first contribution in https://github.com/stretchr/testify/pull/1392
- @echarrod made their first contribution in https://github.com/stretchr/testify/pull/1389
- @davidjb made their first contribution in https://github.com/stretchr/testify/pull/1349
- @LandonTClipp made their first contribution in https://github.com/stretchr/testify/pull/1346
- @alexandear made their first contribution in https://github.com/stretchr/testify/pull/1410
- @lesichkovm made their first contribution in https://github.com/stretchr/testify/pull/1320
- @dolmen made their first contribution in https://github.com/stretchr/testify/pull/1406
- @hikyaru-suzuki made their first contribution in https://github.com/stretchr/testify/pull/1360
- @ossan-dev made their first contribution in https://github.com/stretchr/testify/pull/1428
- @aud10slave made their first contribution in https://github.com/stretchr/testify/pull/631
- @tscales made their first contribution in https://github.com/stretchr/testify/pull/1464
- @czeslavo made their first contribution in https://github.com/stretchr/testify/pull/1395
- @hidu made their first contribution in https://github.com/stretchr/testify/pull/1484
- @zrbecker made their first contribution in https://github.com/stretchr/testify/pull/1473
- @kevinburkesegment made their first contribution in https://github.com/stretchr/testify/pull/1489
- @linusbarth made their first contribution in https://github.com/stretchr/testify/pull/1471
- @jedevc made their first contribution in https://github.com/stretchr/testify/pull/1306
- @craig65535 made their first contribution in https://github.com/stretchr/testify/pull/1435
- @arjunmahishi made their first contribution in https://github.com/stretchr/testify/pull/1531
- @ianrose14 made their first contribution in https://github.com/stretchr/testify/pull/1331
- @hendrywiranto made their first contribution in https://github.com/stretchr/testify/pull/1545
- @Lucaber made their first contribution in https://github.com/stretchr/testify/pull/1517
- @guettli made their first contribution in https://github.com/stretchr/testify/pull/1248
- @ccoVeille made their first contribution in https://github.com/stretchr/testify/pull/1247
- @hslatman made their first contribution in https://github.com/stretchr/testify/pull/1385
- @bogdandrutu made their first contribution in https://github.com/stretchr/testify/pull/1339
Full Changelog: https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0
kubernetes-sigs/controller-runtime (sigs.k8s.io/controller-runtime)
v0.18.0
⚠ Breaking Changes
- Bump to k8s.io/* v1.30 (#2693 #2754 #2765 #2776 #2786)
- Remove deprecated v1alpha1.ControllerManagerConfiguration (#2648)
- admission.Decoder is now an interface (#2736)
- Source, Event, Predicate, Handler: Add generics support (#2783 #2796)
- client: Fix SubResourceCreateOptions signature in subresource client (#2766)
✨ New Features
- cache: Add TransformStripManagedFields transform func (#2791)
- client: Add client.WithFieldOwner to configure client-wide FieldManager (#2771 #2777)
- controller: Add
NewQueue
option (#2767) - manager: Export HTTP server runnable implementation (#2473)
- metrics/server: Add
ListenConfig
option (#2519)
🐛 Bug Fixes
- builder/webhook: Return error if For() is used multiple times (#2740)
- cache: Keep selectors when byObject.Namespaces is defaulted (#2747)
- cache: Prevent race when informers are started more than once (#2758)
- fake client: Allow fakeclient to patch CR with no resourceVersion (#2725)
- fake client: Do not consider an apply patch to be a strategic merge patch (#2679)
- manager: Prevent leader election when shutting down a non-elected manager (#2724)
- manager: Runnable group should check if stopped before enqueueing (#2757)
- restmapper: Clean restmapper cache if a version is notFound (#2663)
- restmapper: Fix cache invalidation (#2687)
🌱 Others
- ci: Add OSSF scorecard action (#2714)
- ci: Improve github actions dependencies versions and permissions (#2715)
- ci: Pin checkout action in golangci-lint action, bump checkout action, use consistent tag format (#2729)
- ci: Update golangci-lint to v1.57.2 (#2708 #2751)
- ci: Update scorecard github action (#2728)
- ci: Use go-install for versioned dependencies (#2710)
- envtest: WaitForDefaultNamespace while starting up envtest (#2668)
- owners: Cleanup owners files (#2730)
- owners: Remove outdated testing framework approvers (#2709)
- predicate: Compare labels and annotations using maps.Equal (#2705)
- typos: Fix typo of CacheReader comment (#2773)
- typos: Fix typo in channel option (#2792)
- typos: Minor typo fixes in docstrings (#2727)
Dependencies
Added
- github.com/fxamacker/cbor/v2: v2.6.0
- github.com/x448/float16: v0.8.4
- golang.org/x/telemetry:
b75ee88
- k8s.io/gengo/v2:
51d4e06
Changed
- github.com/evanphx/json-patch/v5: v5.8.0 → v5.9.0
- github.com/golang/protobuf: v1.5.3 → v1.5.4
- github.com/google/cel-go: v0.17.7 → v0.17.8
- github.com/onsi/ginkgo/v2: v2.14.0 → v2.17.1
- github.com/onsi/gomega: v1.30.0 → v1.32.0
- github.com/prometheus/client_golang: v1.18.0 → v1.16.0
- github.com/prometheus/client_model: v0.5.0 → v0.4.0
- github.com/prometheus/common: v0.45.0 → v0.44.0
- golang.org/x/crypto: v0.16.0 → v0.21.0
- golang.org/x/mod: v0.14.0 → v0.15.0
- golang.org/x/net: v0.19.0 → v0.23.0
- golang.org/x/sync: v0.5.0 → v0.6.0
- golang.org/x/sys: v0.16.0 → v0.18.0
- golang.org/x/term: v0.15.0 → v0.18.0
- golang.org/x/tools: v0.16.1 → v0.18.0
- google.golang.org/protobuf: v1.31.0 → v1.33.0
- k8s.io/api: v0.29.0 → v0.30.0
- k8s.io/apiextensions-apiserver: v0.29.0 → v0.30.0
- k8s.io/apimachinery: v0.29.0 → v0.30.0
- k8s.io/apiserver: v0.29.0 → v0.30.0
- k8s.io/client-go: v0.29.0 → v0.30.0
- k8s.io/code-generator: v0.29.0 → v0.30.0
- k8s.io/component-base: v0.29.0 → v0.30.0
- k8s.io/klog/v2: v2.110.1 → v2.120.1
- k8s.io/kms: v0.29.0 → v0.30.0
- k8s.io/kube-openapi:
2dd684a
→70dd376
- sigs.k8s.io/apiserver-network-proxy/konnectivity-client: v0.28.0 → v0.29.0
- sigs.k8s.io/yaml: v1.4.0 → v1.3.0
Removed
- github.com/matttproud/golang_protobuf_extensions/v2: v2.0.0
- go.uber.org/atomic: v1.10.0
- k8s.io/gengo:
9cce18d
Thanks to all our contributors!
v0.17.3
What's Changed
-
🌱 Update to Kubernetes v1.29.2 by @sbueringer in https://github.com/kubernetes-sigs/controller-runtime/pull/2711 -
🐛 Cache: Keep selectors when byObject.Namespaces is defaulted by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2749 -
🐛 Prevent leader election when shutting down a non-elected manager by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2752 -
🐛 Runnable group should check if stopped before enqueueing by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2761
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.17.2...v0.17.3
v0.17.2
What's Changed
-
⚠ 🐛 Fakeclient: Do not consider an apply patch to be a strategic merge patch by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2681 -
🐛 Fix lazy rest mapper cache invalidation by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2688
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.17.1...v0.17.2
v0.17.1
What's Changed
-
🐛 Clean restmapper cache if a version is notFound by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2676
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.17.0...v0.17.1
v0.17.0
⚠ Breaking Changes
- Fake client: Only set TypeMeta for unstructured (#2633)
- Update k8s.io/* deps to 1.29 (#2457 #2500 #2553 #2588 #2612 #2615 #2621)
- Remove apiutil.NewDiscoveryRESTMapper, use DynamicRESTMapper by default for cache (#2611)
- RESTMapper: don't treat non-existing GroupVersions as errors (#2571)
- Webhooks: Deprecate admission.Validator and admission.Defaulter (#2639)
- Webhooks: Limit size of AdmissionRequests to 7MB and size of TokenReviews to 1MB (#2598)
✨ New Features
- Cache: Allow defining options that apply to all namespaces without explicit config (#2528)
- Cache: Allow to remove informers (#2285)
- Cache: Add option to set WatchErrorHandler on informers (#2494)
- Client: client.MatchingFields now supports multiple indexes (#2512)
- Fake client: Add flowcontrol api v1 (#2623)
- Reconciler: Add reconcile.ObjectReconciler (#2592)
🐛 Bug Fixes
- Add corev1, coordinationv1 scheme for leader election when LeaderElection manager option is true (#2461)
- Cache: Default namespace only for namespaced object (#2480)
- Client: Don't truncate large int64s in MergePatch (#2650)
- controllerutil: Add
RemoveControllerReference
andHasControllerReference
func (#2509 #2595) - controllerutil: Add
RemoveOwnerReference
func (#2462) - Dependencies: Refactor tests to drop hard otel dependency (#2460)
- Envtest: CRDs that aren't convertible should unset spec.conversion (#2525)
- Fake client: Correctly identify if patch call was made on status (#2508)
- Fake client: Do not update anything but status when using subresource client (#2479)
- Fake client: Fix returning object after status update (#2489)
- Fake client: Fix status subresource getting updated on Update when it is empty (#2484)
- Fake client: Handle unstructured status update with fake client (#2495)
- Manager: Fix goroutine leak (#2527)
- Manager: Use HTTP client from leaderElectionConfig for leader election recorder provider (#2464)
- RESTMapper: Return NoResourceMatchError when appropriate for backwards compatibility. (#2472)
- Webhook: Handle http.NoBody (#2605)
🌱 Others
- Client: Make client.MatchingLabels faster (#2529)
- Envtest: Allow to ignore scheme.Convertible check for CRDs (#2555)
- Envtest: Improve process cleanup (#2560)
- Metrics: Add 100/1000s buckets for Prometheus workqueue histograms (#2638)
- Metrics: Avoid dependency on apiserver/options if metrics/filters are used (#2645)
- Replace k8s.io/utils/pointer with k8s.io/utils/ptr (#2488)
- Webhooks: Cleanup webhook variable assignment (#2604)
🌱 Dependencies
- Bump github.com/emicklei/go-restful/v3 from v3.9.0 to 3.11.0 (#2507)
- Bump github.com/evanphx/json-patch from 5.6.0+incompatible to 4.12.0+incompatible (#2501 #2643)
- Note: We "downgraded" to v4.12.0+incompatible because it is actually newer than v5.6.0+incompatible and to make sure the code in fake client that is using this dependency behaves exactly the same as the corresponding upstream code. We recommend users to either use github.com/evanphx/json-patch@v4.12.0+incompatible or to upgrade to github.com/evanphx/json-patch/v5@v5.8.0. More details can be found in https://github.com/kubernetes-sigs/controller-runtime/pull/2643#discussion_r1446189655.
- Bump github.com/evanphx/json-patch/v5 from 5.6.0 to 5.8.0 (#2499 #2650)
- Bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0 (#2561)
- Bump github.com/go-logr/logr from 1.2.4 to 1.4.1 (#2566 #2630)
- Bump github.com/go-logr/zapr from 1.2.4 to 1.3.0 (#2574)
- Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (#2545)
- Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.14.0 (#2458 #2514 #2534 #2578 #2610 #2651)
- Bump github.com/onsi/gomega from 1.27.10 to 1.30.0 (#2521 #2562 #2568 #2579)
- Bump github.com/prometheus/client_golang from 1.16.0 to 1.18.0 (#2520 #2632)
- Bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0 (#2535)
- Bump go.uber.org/goleak from 1.2.1 to 1.3.0 (#2569)
- Bump go.uber.org/zap from 1.25.0 to 1.26.0 (#2502)
- Bump golang.org/x/net to 0.17.0 (#2540)
- Bump golang.org/x/sys from 0.11.0 to 0.16.0 (#2470 #2533 #2572 #2597 #2642)
- Bump k8s.io/klog/v2 from 2.100.1 to 2.110.1 (#2573)
- Bump sigs.k8s.io/yaml from 1.3.0 to 1.4.0 (#2567)
- Bump controller-tools from v0.13.0 to v0.14.0 (#2649)
- Bump go-apidiff from v0.5.0 to v0.8.2 (#2517 #2655)
- Upgrade dependencies for hack/tools and tools/ (#2517)
- Bump kubernetes-sigs/kubebuilder-release-tools from 0.3.0 to 0.4.3 (#2532 #2575 #2618)
- Bump golang version in GH actions (#2609)
- Bump actions/checkout from 3 to 4 (#2469)
- Bump actions/setup-go from 4 to 5 (#2617)
- Bump envtest to 1.28.0 (#2531)
Thanks to all our contributors!
v0.16.5
What's Changed
-
🐛 Fix lazy rest mapper cache invalidation by @g-gaston in https://github.com/kubernetes-sigs/controller-runtime/pull/2689
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.4...v0.16.5
v0.16.4
What's Changed
- :running: Make client.MatchingLabels faster by @samuelvl in https://github.com/kubernetes-sigs/controller-runtime/pull/2613
-
🐛 Avoid extra calls for not found resource by @g-gaston in https://github.com/kubernetes-sigs/controller-runtime/pull/2677
New Contributors
- @samuelvl made their first contribution in https://github.com/kubernetes-sigs/controller-runtime/pull/2613
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.3...v0.16.4
v0.16.3
What's Changed
-
🐛 Update dependency go-restful to 3.11.0 by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2516 -
🐛 Correctly identify if patch call was made on status by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2515 -
🐛 Handle unstructured status update with fake client by @troy0820 in https://github.com/kubernetes-sigs/controller-runtime/pull/2523 -
✨ Cache: Allow defining options that apply to all namespaces that themselves have no explicit config by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2539 -
🐛 bump golang.org/x/net to v0.17.0 by @joelanford in https://github.com/kubernetes-sigs/controller-runtime/pull/2541 -
🌱 Bump k8s to 1.28.3 by @varshaprasad96 in https://github.com/kubernetes-sigs/controller-runtime/pull/2552
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.2...v0.16.3
v0.16.2
What's Changed
-
🐛 Add corev1, coordinationv1 scheme for leader election when LeaderElection manager option is true by @troy0820 in https://github.com/kubernetes-sigs/controller-runtime/pull/2466 -
🐛 Use http client from leaderElectionConfig by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2468 -
🐛 Default namespace only for namespaced object by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2482 -
🐛 Do not update anything but status when using subresource client by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2483 -
🐛 Fix status subresource getting updated on Update when it is empty by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2485 -
🐛 Fix returning object after status update by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2490 -
🐛 Return NoResourceMatchError when appropriate for backwards compatibility. by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2492
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.1...v0.16.2
v0.16.1
What's Changed
-
🐛 Refactor tests to drop hard otel dependency by @howardjohn in https://github.com/kubernetes-sigs/controller-runtime/pull/2465 -
🌱 Bump k8s.io/apiserver from 0.28.0 to 0.28.1 by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2459
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.0...v0.16.1
v0.16.0
Highlights
- Granular cache configuration (#2421)
- New cache option to fail on missing informer on cache reads (#2406)
- Secure metrics serving (#2407)
- Upgrade to Kubernetes 1.28 libraries (#2393, #2405, #2449)
Changes since v0.15
⚠ Breaking Changes
- Bump k8s.io/* dependencies to v1.28.0 by @sbueringer (#2393, #2405, #2449)
- Allow configuring more granular cache filtering by @alvaroaleman (#2421)
- Introduce Metrics Options & secure metrics serving by @sbueringer (#2407)
- Return an error if the continue list option is set for the cache reader by @shuheiktgw (#2439)
- Remove deprecated manager, webhook and cluster options by @sbueringer (#2422)
- Remove deprecated MultiNamespacedCacheBuilder, NewFakeClientWithScheme, controllerutil.Object, envtest.Environment.KubeAPIServerFlags & zap.Options.DestWritter by @sbueringer (#2423)
- controller builder: return error when multiple reconcilers are set by @sbueringer (#2415)
- fake client: use correct RBAC apiGroup name when deciding if to allow unconditional updates by @jaideepr97 (#2412)
- Minor improvements to godoc & code style in cache pkg by @sbueringer (#2416)
✨ New Features
- Cache: add ReaderFailOnMissingInformer option by @stevekuznetsov (#2406)
- Cache: allow non-blocking retrieval of informers by @maxsmythe (#2371)
🐛 Bug Fixes
- Add missing return statement in admission.Decoder.DecodeRaw by @lleshchi (#2433)
- fakeClient.Status().Update(...) cannot recognize resource version conflicts by @iiiceoo (#2365)
- Fix Defaulting of the User Agent by @alvaroaleman (#2435)
- Fix logs in the unstructured client by @Poor12 (#2343)
- Fix unspecified KindsFor version by @tenstad (#2346)
- Fix TerminalError(nil).Error() panic by @sheidkamp (#2438)
- hasLabels and matchingLabels step on each other by @shanshanying (#2363)
- SetLogger should work with nil sinks by @vincepri (#2367)
🌱 Others
- Use NewRateLimitingQueueWithConfig instead of deprecated NewNamedRateLimitingQueue by @sbueringer (#2411)
- Add a prefix to the stack trace printed after SetLogger timeout by @vincepri (#2357)
- Minor improvements to godoc, code style in builder pkg by @sbueringer (#2414)
- Add integration test to avoid manager.Start deadlocks by @sbueringer (#2418)
- Automatically regenerate scratch env go mod file by @sbueringer (#2413)
- Introduce a new runnable group for basic servers of the manager by @zqzten (#2337)
- Add logs around Reconcile call, change webhook logs to log level 5 by @sbueringer (#2419)
- Add action to update modules on dependabot MRs by @sbueringer (#2447, #2448)
- Optimize Add/RemoveFinalizer by @0xff-dev (#2348)
- Log warning if error and non-zero Result are returned by @sbueringer (#2451)
📖 Documentation and proposals
- Add a design for cache options configuration by @alvaroaleman (#2261)
- Add documentation to clarify the ContentType behavior by @FillZpp (#2410)
- Clarify that the reconcile.Result is ignored on non-nil error by @alvaroaleman (#2444)
- Fix typo "compatiblity" to "compatibility" by @ArshiAAkhavan (#2396)
- Update fake client doc.go to avoid the deprecated method by @sunglim (#2392)
📈 Dependencies
- Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 by @dependabot (#2294)
- Bump github.com/onsi/ginkgo/v2 from 2.9.5 to 2.11.0 by @dependabot (#2368, #2376, #2384)
- Bump github.com/onsi/gomega from 1.27.7 to 1.27.8 by @dependabot (#2375, #2420)
- Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0 by @dependabot (#2383)
- Bump golang.org/x/sys from 0.8.0 to 0.11.0 by @dependabot (#2377, #2401, #2441)
- Bump gomodules.xyz/jsonpatch/v2 from 2.3.0 to 2.4.0 by @dependabot (#2446)
- Bump go.uber.org/zap from 1.24.0 to 1.25.0 by @dependabot (#2440)
- Bump golangci-lint to v1.53 by @vincepri (#2398)
- Bump controller-tools to v0.13 by @sbueringer (#2450)
Thanks to all our contributors!
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.0...v0.16.0
v0.15.3
What's Changed
-
🐛 [release-0.15] bump golang.org/x/net to v0.17.0 by @joelanford in https://github.com/kubernetes-sigs/controller-runtime/pull/2542 -
✨ Bump k8s deps to 1.27.7 by @varshaprasad96 in https://github.com/kubernetes-sigs/controller-runtime/pull/2558
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.2...v0.15.3
v0.15.2
What's Changed
-
🐛 Fix TerminalError(nil).Error() panic by @sheidkamp in https://github.com/kubernetes-sigs/controller-runtime/pull/2443 -
🐛 Add missing return statement in the webhook admissions func by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2452
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.1...v0.15.2
v0.15.1
What's Changed
- [release-0.15]
✨ Fix logs in unstructured client by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2344 - [release-0.15]
🐛 fix unspecified KindsFor version by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2347 - [release-0.15]
🐛 fakeClient.Status().Update(...) cannot recognize resource version conflicts by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2372 - [release-0.15]
🐛 hasLabels and matchingLabels step on each other by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2373 - [release-0.15]
🐛 Fix Defaulting of the User Agent by @alvaroaleman in https://github.com/kubernetes-sigs/controller-runtime/pull/2436
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.0...v0.15.1
v0.15.0
Controller Runtime v0.15
A note from the maintainers
The following release is probably the largest in the history of the project. Controller Runtime is a foundational piece for almost all controllers and operators and we're aware that breaking changes are never an ask for our users, especially while running production services.
We take breaking changes very seriously and carefully reviewed each one of these changes to improve the codebase, user experience, and future maintainability of the project.
The v0.15 release is a stepping stone towards maturity.
As always, please reach out in Slack in #controller-runtime.
Changes since v0.14.5
⚠ Breaking Changes
- Make
*http.Client
configurable and use/share the same client by default (#2122)- When using the default Manager configuration, no immediate changes are needed.
-
client/apiutil.NewDynamicRESTMapper
signature has changed and now requires an*http.Client
as parameter. -
cluster.Cluster
interface requiresGetHTTPClient()
method which must return an already configured, non-nil,*http.Client
for the Cluster. When usingcluster.New
to create Clusters, the client is created internally if not specified as anOptions
field. -
cluster.Options.MapperProvider
field now requires a*rest.Config
and*http.Client
.
- Deprecate Component Configuration
config/v1alpha1
types (#2149, #2200)- The Component Configuration package has been unmaintained for over a year and is no longer actively developed. There are (currently) no plans to revive the package, or provide an alternative.
- Users should migrate to a custom implementation that sets
Manager.Options
directly. -
👉 Feedback requested: removal of the deprecated types and code is tracked in #895.
- Remove dependency injection functions (#2134, #2120)
- The package
pkg/inject
has been removed, this package contained long deprecated injection functions (likeInjectScheme
,InjectLogger
,InjectConfig
,InjectClient
,InjectCache
, etc.). - The runtime injection functionality has been deprecated since Controller Runtime 0.10; all of the above fields can be passed from the
Manager
to structs or interfaces that need them.
- The package
- Improve
builder
package capabilities and general UX (#2135)-
builder.Builder.Watches
signature has changed, it now takes aclient.Object
instead of asource.Source
as first argument.- For
source.Source
, useWatchesRawSource
.
- For
-
builder.Builder.WatchesMetadata
has been added to simplify watchingPartialObjectMetadata
objects.
-
- Refactor cache.Options, deprecate MultiNamespacedCacheBuilder (#2157, #2166)
-
cache.Options.Namespace
has been removed in favor ofcache.Options.Namespaces
, a slice. -
cache.Options.Resync
has been renamed toSyncPeriod
. -
cache.Options.DefaultSelector
has been removed and split in two fields:cache.Options.DefaultLabelSelector
cache.Options.DefaultFieldSelector
-
cache.Options.DefaultTransform
was added to provide a global transform function. -
cache.Options.UnsafeDisableDeepCopy
was added to provide a global toggle to disable DeepCopy of the objects from the cache before returning them to clients. - The following
[..]ByObject
field have been refactored:-
cache.Options.SelectorsByObject
has been removed, usecache.Options.ByObject[Object].Field
andcache.Options.ByObject[Object].Label
-
cache.Options.UnsafeDisableDeepCopyByObject
has been removed, usecache.Options.ByObject[Object].UnsafeDisableDeepCopy
. -
cache.Options.TransformByObject
has been removed, usecache.Options.ByObject[Object].Transform
.
-
-
cache.ObjectAll
has been removed. This type was previously used to set selectors or transformation functions for every object, use the newly introduced default global options instead.
-
- Add context to EventHandler(s) (#2139)
-
handler.EventHandler
andhandler.Funcs
interfaces requirecontext.Context
as the first parameter for every method. -
handler.MapFunc
signature has changed and now requires acontext.Context
.
-
- Add client.{GroupVersionKindFor, IsObjectNamespaced} (#2136)
- The
client.Client
interface now requires and exposes these helper functions:-
GroupVersionKindFor(Object)
which returns theschema.GroupVersionKind
for the object. -
IsObjectNamespaced(Object)
which returnstrue
if the object's GroupVersionKind is namespaced, orfalse
for global ones.
-
- The
- Remove DelegatedClient, move all related options in
client.New
(#2150)-
client.NewDelegatingClient
constructor andclient.NewDelegatingClientInput
struct have been removed.- The DelegatingClient created a Client backed by a cache, use
client.New
and setclient.Options.Cache
to customize the client's caching behavior.
- The DelegatingClient created a Client backed by a cache, use
-
cluster.NewClientFunc
has been moved toclient.NewClientFunc
. -
cluster.ClientOptions
has been removed. -
cluster.DefaultNewClient
has been removed. -
cluster.ClientBuilderWithOptions
has been removed.
-
- Expose Manager.Cache/Client options, deprecate older options (#2199, #2177)
-
manager.Options.Cache
is now the preferred way to customize the cache options for the manager.- Users can also keep using
manager.Options.NewCache
, which has now been marked as a low level primitive.
- Users can also keep using
-
manager.Options.Client
is now the preferred way to customize the client options for the manager.- Users can also keep using
manager.Options.NewClient
, which has now been marked as a low level primitive.
- Users can also keep using
-
manager.Options.SyncPeriod
has been deprecated in favor ofmanager.Options.Cache.SyncPeriod
. -
manager.Options.Namespace
has been deprecated in favor ofmanager.Options.Cache.Namespaces
. -
manager.Options.DryRunClient
has been deprecated in favor ofmanager.Options.Client.DryRun
. -
manager.Options.ClientDisableCacheFor
has been deprecated in favor ofmanager.Options.Client.Cache.DisableCacheFor
. - The following webhook server options have been deprecated, use
manager.WebhookServer
instead.manager.Options.Port
manager.Options.Host
manager.Options.CertDir
manager.Options.TLSOpts
-
- Remove
cache.BuilderWithOptions
(#2300) - Add constructors for
webhook/conversion
, removewebhook/admission.GetDecoder()
(#2144)- There are two set of changes related to the webhooks and how they're exposed. For users using the Manager, there should be minimal to no required changes.
-
webhook/admission/Webhook.GetDecoder()
method has been removed, it was unused before and relied on runtime dependency injection. -
webhook/conversion.Webhook
struct has been un-exported. Users should usewebhook/conversion.NewWebhookHandler
instead.
-
pkg/webhook/admission
: - Testing: Fake client status handling (#2259)
- Added a new
WithStatusSubresource
option and pre-populating it with all in-tree resources that have a status subresource -
Update
andPatch
methods now don't change the status for any such resource anymore - The status clients
Update
andPatch
methods now only change the status for any such resource
- Added a new
- Remove high cardinality metrics (#2217, #2298)
rest_client_request_latency_seconds
rest_client_request_duration_seconds
rest_client_request_size_bytes
rest_client_response_size_bytes
- Allow passing a custom webhook server (#2293, #2329)
- The
webhook.Server
struct is now an interface -
webhook.NewServer
can be used to pass in and customize the default server
- The
- Flatten fields in controller.Options (#2307)
- Update fake client deletionTimestamp behavior (#2316)
- The fake client will panic if initialized with an object that has a DeletionTimestamp and no finalizer
- The fake client will silently ignore a DeletionTimestamp on an object in a Create request, matching the behavior of the kube-apiserver
- Unexport delegating logger, remove async init (#2317)
-
log.DelegatingLogSink
has been unexported, this logger should never be used on its own, and it's only meant to be used within controller-runtime initialization process. - Previously, when the
pkg/log
package was imported, there was aninit
function that spawned a goroutine, which set a null logger after 30 seconds. Now this logic has been removed, and instead incorporated into the delegating logger private implementation.
-
- Change webhook request received / response written logs to log level 4 (#2334)
- Use and offer a single dynamic lazy RESTMapper (#2116, #2296)
- The following options have been removed:
WithCustomMapper
,WithExperimentalLazyMapper
,WithLazyDiscovery
,WithLimiter
. - The
DynamicRESTMapperOption
type has been removed.
- The following options have been removed:
✨ New Features
- Add cross-version compatibility with client-go 1.27 (#2223)
- Introduce pprof server to manager (#1943)
- To enable, use
Manager.Options.PprofBindAddress
.
- To enable, use
- Added interceptor client to intercept calls to a client (#2248 #2306)
- Add
reconcile.TerminalError(...)
(#2325)- By wrapping an error with the above package-level function, the controller won't retry the request again in an exponential backoff loop.
- The error is logged, and the
controller_runtime_terminal_reconcile_errors_total
metric is incremented.
🐛 Bug Fixes
- Use correct context to cancel "list and watch" & wait for all informers to complete (#2121)
- Client: use passed in Cache.DisableFor option (#2303)
- Fix race condition in channel source (#2286)
- ForceOwnership should work with subresources (#2257)
- Fix error string in CacheReader.List (#2256)
- Fix a bug in multinamespaced cache implementation (#2252)
- Allow lazy restmapper to work with CRDs created at runtime (#2208)
- Set DeleteStateUnknown in DeleteEvent when obj is DeletedFinalStateUnknown (#2212)
- Allow to set GracefulShutdownTimeout to -1, disabling timeouts (#2169)
- pkg/certwatcher: Start should retry for 10s when adding files (#2160)
- Don't share error concurrently in test (#2158)
🌱 Others
- Improve unstructured serialisation (#2147)
- Handle TLSOpts.GetCertificate in webhook (#2291)
- Kind source should expose type information on timeout (#2290)
- Fakeclient: Add support for evictions (#2305)
- envtest: set default webhook options for polling (#2289)
- Add client.InNamespace("xyz").AsSelector() (#2282)
- Update golanci-lint script (#2151)
- Preserve unstructured object GVKs in cache.Options.ByObject (#2246)
- Don't call defaultOpts for MultiNamespaceCache twice (#2234)
- GVKForObject should handle multiple GVKs in Scheme gracefully (#2192)
- verify.sh: verify generate & modules (in CI) (#2186)
- code clean for pkg/envtest/server.go (#2180)
- Return an error if no httpClient is provided for
NewDynamicRESTMapper
(#2178) - Use runtime.Unstructured interface instead of Unstructured struct (#2168)
- Return an error if no httpClient is provided (#2164)
- Return the error from rest.HTTPClientFor instead of hiding it (#2161)
- fix default value for cfg.Burst (#2142)
- Add more linters (#2133)
- Remove pkg/patterns (#2132)
- Further cleanup internal/informers (#2130)
- Simplify cache.objectTypeForListObject (#2131)
- Refactor internal cache/informers map impl (#2103)
- client/cache/client_cache.go should be called resources (#2111)
- Remove reviewers which are also approvers (#2109)
- Use HTTPClient to create the API Reader (#2163)
- Update SECURITY_CONTACTS and maintainer list (#2318)
- Update builtin webhook paths (#2319)
- Make metrics and health probe servers be Runnables (#2275)
- Revert: move health probes to runnable (#2321)
- Fix comment on MultiNamespaceCache (#2323)
- Cleanup webhook logging (#2326)
- Add certwatcher callback (#2301)
- Fix a bug in multinamespaced cache implementation (#2288)
🌱 Dependencies
- Bump Go to 1.20 (#2279)
- Bump github.com/go-logr/logr from v1.2.3 to v1.2.4 (#2262)
- Bump github.com/go-logr/zapr from v1.2.3 to v1.2.4 (#2320)
- Bump github.com/onsi/ginkgo/v2 from v2.6.1 to v2.9.5 (#2123 #2155 #2194 #2205 #2224 #2233 #2251 #2311 #2328)
- Bump github.com/onsi/gomega from v1.24.1 to v1.27.7 (#2106 #2137 #2156 #2206 #2227 #2232 #2260 #2340)
- Bump github.com/prometheus/client_golang from v1.14.0 to v1.15.1 (#2280 #2310)
- Bump github.com/prometheus/client_model from v0.3.0 to v0.4.0 (#2312)
- Bump go.uber.org/goleak from v1.2.0 to v1.2.1 (#2195)
- Bump golang.org/x/sys from v0.3.0 to v0.8.0 (#2124 #2225 #2270 #2309)
- Bump k8s.io dependencies to 0.27.2 (#2145 #2330 #2333)
- Bump k8s.io/klog/v2 from v2.80.1 to v2.90.1 (#2138 #2226)
- Bump sigs.k8s.io/controller-tools to v0.11.3 and apidiff to v0.5.0 (#2187)
- Use Go 1.19 in golangci-lint action (#2272)
- Bump golangci-lint to v1.52.1 (#2188 #2284)
- Bump kubebuilder-release-tools to v0.3.0 (#2126)
Thanks to all our contributors!
v0.14.7
What's Changed
-
🐛 ForceOwnership should work with subresources by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2258 - [release-0.14]
🐛 type print will always by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2267 - [release-0.14]
🐛 fix a bug in multinamespaced cache implementation by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2287 - [release-0.14]
⚠ Remove metrics with high cardinality by @k8s-infra-cherrypick-robot in https://github.com/kubernetes-sigs/controller-runtime/pull/2299 - [release-0.14]
🐛 inherited defaults not respected in cache BuilderWithOptions by @akalenyu in https://github.com/kubernetes-sigs/controller-runtime/pull/2491 -
🐛 [release-0.14] bump golang.org/x/net to v0.17.0 by @joelanford in https://github.com/kubernetes-sigs/controller-runtime/pull/2543 -
✨ Bump k8s deps to 1.26.10 by @varshaprasad96 in https://github.com/kubernetes-sigs/controller-runtime/pull/2559
Full Changelog: https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.6...v0.14.7
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.