Skip to content

Commit e7dcf2b

Browse files
authored
Product image selection: only override version for PR builds (#812)
* Product image selection: only override version for PR builds Also adds logging because this was pretty confusing to me. * Changelog
1 parent c5032a3 commit e7dcf2b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

crates/stackable-operator/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Fixed
8+
9+
- Product image selection pull request version override now only applies to pull requests ([#812]).
10+
11+
[#812]: https://github.com/stackabletech/operator-rs/pull/812
12+
713
## [0.69.3] - 2024-06-12
814

915
### Fixed

crates/stackable-operator/src/commons/product_image_selection.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,14 @@ impl ProductImage {
130130
let stackable_version = match &image_selection.stackable_version {
131131
Some(stackable_version) => stackable_version,
132132
None => {
133-
if operator_version.starts_with("0.0.0-") {
134-
"0.0.0-dev"
133+
if operator_version.starts_with("0.0.0-pr") {
134+
let override_version = "0.0.0-dev";
135+
tracing::warn!(
136+
operator_version,
137+
override_version,
138+
"operator is built by pull request, using dev build of product image"
139+
);
140+
override_version
135141
} else {
136142
operator_version
137143
}

0 commit comments

Comments
 (0)