File tree Expand file tree Collapse file tree 5 files changed +29
-17
lines changed
crates/stackable-operator Expand file tree Collapse file tree 5 files changed +29
-17
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
55## [ Unreleased]
66
7+ ## [ 0.77.1] - 2024-09-27
8+
9+ ### Fixed
10+
11+ - Fix always returning an error stating that volumeMounts are colliding. Instead move the error
12+ creation to the correct location within an ` if ` statement ([ #879 ] ).
13+
14+ [ #879 ] : https://github.com/stackabletech/operator-rs/pull/879
15+
716## [ 0.77.0] - 2024-09-26
817
918### Fixed
Original file line number Diff line number Diff line change 11[package ]
22name = " stackable-operator"
33description = " Stackable Operator Framework"
4- version = " 0.77.0 "
4+ version = " 0.77.1 "
55authors.workspace = true
66license.workspace = true
77edition.workspace = true
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ pub enum Error {
2828 } ,
2929
3030 #[ snafu( display(
31- "Colliding mountPath {mount_path :?} in volumeMounts with different content. \
31+ "Colliding mountPath {colliding_mount_path :?} in volumeMounts with different content. \
3232 Existing volume name {existing_volume_name:?}, new volume name {new_volume_name:?}"
3333 ) ) ]
3434 MountPathCollision {
35- mount_path : String ,
35+ colliding_mount_path : String ,
3636 existing_volume_name : String ,
3737 new_volume_name : String ,
3838 } ,
@@ -230,15 +230,16 @@ impl ContainerBuilder {
230230 tracing:: error!(
231231 colliding_mount_path,
232232 ?existing_volume_mount,
233- "Colliding mountPath {colliding_mount_path:?} in volumeMounts with different content"
233+ "Colliding mountPath in volumeMounts with different content"
234234 ) ;
235+
236+ MountPathCollisionSnafu {
237+ colliding_mount_path,
238+ existing_volume_name : & existing_volume_mount. name ,
239+ new_volume_name : & volume_mount. name ,
240+ }
241+ . fail ( ) ?;
235242 }
236- MountPathCollisionSnafu {
237- mount_path : & volume_mount. mount_path ,
238- existing_volume_name : & existing_volume_mount. name ,
239- new_volume_name : & volume_mount. name ,
240- }
241- . fail ( ) ?;
242243 } else {
243244 self . volume_mounts
244245 . insert ( volume_mount. mount_path . clone ( ) , volume_mount) ;
Original file line number Diff line number Diff line change @@ -52,8 +52,10 @@ pub enum Error {
5252 #[ snafu( display( "object is missing key {key:?}" ) ) ]
5353 MissingObjectKey { key : & ' static str } ,
5454
55- #[ snafu( display( "Colliding volume name {volume_name:?} in volumes with different content" ) ) ]
56- VolumeNameCollision { volume_name : String } ,
55+ #[ snafu( display(
56+ "Colliding volume name {colliding_volume_name:?} in volumes with different content"
57+ ) ) ]
58+ VolumeNameCollision { colliding_volume_name : String } ,
5759}
5860
5961/// A builder to build [`Pod`] or [`PodTemplateSpec`] objects.
@@ -292,16 +294,16 @@ impl PodBuilder {
292294 pub fn add_volume ( & mut self , volume : Volume ) -> Result < & mut Self > {
293295 if let Some ( existing_volume) = self . volumes . get ( & volume. name ) {
294296 if existing_volume != & volume {
295- let colliding_name = & volume. name ;
297+ let colliding_volume_name = & volume. name ;
296298 // We don't want to include the details in the error message, but instead trace them
297299 tracing:: error!(
298- colliding_name ,
300+ colliding_volume_name ,
299301 ?existing_volume,
300- "Colliding volume name {colliding_name:?} in volumes with different content"
302+ "Colliding volume name in volumes with different content"
301303 ) ;
302304
303305 VolumeNameCollisionSnafu {
304- volume_name : & volume . name ,
306+ colliding_volume_name ,
305307 }
306308 . fail ( ) ?;
307309 }
You can’t perform that action at this time.
0 commit comments