Skip to content

Commit

Permalink
force reconciliation whenever the observability-bundle version changes (
Browse files Browse the repository at this point in the history
#254)

* force reconciliation whenever the observability-bundle version changes

* Update predicates.go

* Update predicates.go

* Update CHANGELOG.md
  • Loading branch information
QuentinBisson authored Oct 31, 2024
1 parent 1e338f9 commit 0bafef3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Reconcile clusters when the observability bundle version changes.

## [0.14.0] - 2024-10-29

### Changed
Expand Down
7 changes: 3 additions & 4 deletions internal/controller/predicates/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ func (ObservabilityBundleAppVersionChangedPredicate) Update(e event.UpdateEvent)
return false
}

oldAppVersion, err := semver.New(oldApp.Spec.Version)
oldAppVersion, err := semver.Parse(oldApp.Spec.Version)
if err != nil {
return false
}
newAppVersion, err := semver.New(newApp.Spec.Version)
newAppVersion, err := semver.Parse(newApp.Spec.Version)
if err != nil {
return false
}
breakingVersion := semver.MustParse("1.0.0")
return oldAppVersion.LT(breakingVersion) && newAppVersion.GTE(breakingVersion)
return oldAppVersion.NE(newAppVersion)
}
6 changes: 3 additions & 3 deletions tests/ats/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ verify_ssl = true
name = "pypi"

[packages]
pytest-helm-charts = ">=1.0.2"
pytest = ">=6.2.5"
pykube-ng = ">=22.1.0"
pytest-helm-charts = ">=1.3.2"
pytest = ">=8.3.3"
pykube-ng = ">=23.6.0"
pytest-rerunfailures = "~=14.0"

[requires]
Expand Down
8 changes: 4 additions & 4 deletions tests/ats/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bafef3

Please sign in to comment.