File tree 5 files changed +29
-17
lines changed
crates/stackable-operator
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.
4
4
5
5
## [ Unreleased]
6
6
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
+
7
16
## [ 0.77.0] - 2024-09-26
8
17
9
18
### Fixed
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " stackable-operator"
3
3
description = " Stackable Operator Framework"
4
- version = " 0.77.0 "
4
+ version = " 0.77.1 "
5
5
authors.workspace = true
6
6
license.workspace = true
7
7
edition.workspace = true
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ pub enum Error {
28
28
} ,
29
29
30
30
#[ snafu( display(
31
- "Colliding mountPath {mount_path :?} in volumeMounts with different content. \
31
+ "Colliding mountPath {colliding_mount_path :?} in volumeMounts with different content. \
32
32
Existing volume name {existing_volume_name:?}, new volume name {new_volume_name:?}"
33
33
) ) ]
34
34
MountPathCollision {
35
- mount_path : String ,
35
+ colliding_mount_path : String ,
36
36
existing_volume_name : String ,
37
37
new_volume_name : String ,
38
38
} ,
@@ -230,15 +230,16 @@ impl ContainerBuilder {
230
230
tracing:: error!(
231
231
colliding_mount_path,
232
232
?existing_volume_mount,
233
- "Colliding mountPath {colliding_mount_path:?} in volumeMounts with different content"
233
+ "Colliding mountPath in volumeMounts with different content"
234
234
) ;
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 ( ) ?;
235
242
}
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 ( ) ?;
242
243
} else {
243
244
self . volume_mounts
244
245
. 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 {
52
52
#[ snafu( display( "object is missing key {key:?}" ) ) ]
53
53
MissingObjectKey { key : & ' static str } ,
54
54
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 } ,
57
59
}
58
60
59
61
/// A builder to build [`Pod`] or [`PodTemplateSpec`] objects.
@@ -292,16 +294,16 @@ impl PodBuilder {
292
294
pub fn add_volume ( & mut self , volume : Volume ) -> Result < & mut Self > {
293
295
if let Some ( existing_volume) = self . volumes . get ( & volume. name ) {
294
296
if existing_volume != & volume {
295
- let colliding_name = & volume. name ;
297
+ let colliding_volume_name = & volume. name ;
296
298
// We don't want to include the details in the error message, but instead trace them
297
299
tracing:: error!(
298
- colliding_name ,
300
+ colliding_volume_name ,
299
301
?existing_volume,
300
- "Colliding volume name {colliding_name:?} in volumes with different content"
302
+ "Colliding volume name in volumes with different content"
301
303
) ;
302
304
303
305
VolumeNameCollisionSnafu {
304
- volume_name : & volume . name ,
306
+ colliding_volume_name ,
305
307
}
306
308
. fail ( ) ?;
307
309
}
You can’t perform that action at this time.
0 commit comments