Skip to content

Commit bcb5542

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/tls-support
2 parents 25745d1 + 02453ec commit bcb5542

4 files changed

Lines changed: 31 additions & 10 deletions

File tree

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# on Darwin (macOS), but doesn't seem to actually be necessary beyond
66
# production hardening.
77
fakeroot =
8-
if self.buildPlatform.isDarwin then
8+
if self.stdenv.buildPlatform.isDarwin then
99
self.writeScriptBin "fakeroot" ''exec "$@"''
1010
else
1111
super.fakeroot;
@@ -14,7 +14,7 @@
1414
# (non-Nix build tools like Tilt, as well as the container composition scripts)
1515
, pkgsLocal ? import nixpkgs { inherit overlays; }
1616
# Default to building for the local CPU architecture
17-
, targetArch ? pkgsLocal.hostPlatform.linuxArch
17+
, targetArch ? pkgsLocal.stdenv.hostPlatform.linuxArch
1818
, targetSystem ? "${targetArch}-unknown-linux-gnu"
1919
, pkgsTarget ? import nixpkgs {
2020
inherit overlays;

nix/sources.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/operator-binary/src/controller/validate.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ mod tests {
272272

273273
use super::{ErrorDiscriminants, validate};
274274
use crate::{
275+
built_info,
275276
controller::{ContextNames, ValidatedCluster, ValidatedLogging, ValidatedOpenSearchConfig},
276277
crd::{
277278
NodeRoles,
@@ -296,9 +297,15 @@ mod tests {
296297
Some(ValidatedCluster::new(
297298
ResolvedProductImage {
298299
product_version: "3.1.0".to_owned(),
299-
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
300-
.expect("should be a valid label value"),
301-
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
300+
app_version_label_value: LabelValue::from_str(&format!(
301+
"3.1.0-stackable{pkg_version}",
302+
pkg_version = built_info::PKG_VERSION
303+
))
304+
.expect("should be a valid label value"),
305+
image: format!(
306+
"oci.stackable.tech/sdp/opensearch:3.1.0-stackable{pkg_version}",
307+
pkg_version = built_info::PKG_VERSION
308+
),
302309
image_pull_policy: "Always".to_owned(),
303310
pull_secrets: None,
304311
},

scripts/run-tests

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
144144
default=os.path.join("tests", "_work"),
145145
)
146146

147+
parser.add_argument(
148+
"--listener-class-preset",
149+
help="Choose the ListenerClass preset",
150+
type=str,
151+
required=False,
152+
)
153+
147154
return parser.parse_args(argv)
148155

149156

@@ -285,7 +292,9 @@ def release_file(
285292
logging.error(f"Failed to delete patched release file: {release_file}")
286293

287294

288-
def maybe_install_release(skip_release: bool, release_file: str) -> None:
295+
def maybe_install_release(
296+
skip_release: bool, release_file: str, listener_class_preset: str
297+
) -> None:
289298
if skip_release:
290299
logging.debug("Skip release installation")
291300
return
@@ -296,6 +305,11 @@ def maybe_install_release(skip_release: bool, release_file: str) -> None:
296305
"install",
297306
"--release-file",
298307
release_file,
308+
*(
309+
["--listener-class-preset", listener_class_preset]
310+
if listener_class_preset
311+
else []
312+
),
299313
"tests",
300314
]
301315
logging.debug(f"Running : {stackablectl_cmd}")
@@ -436,7 +450,7 @@ def main(argv) -> int:
436450
have_requirements()
437451
gen_tests(opts.test_suite, opts.namespace, opts.work_dir)
438452
with release_file(opts.operator, opts.skip_operator) as f:
439-
maybe_install_release(opts.skip_release, f)
453+
maybe_install_release(opts.skip_release, f, opts.listener_class_preset)
440454
if opts.skip_tests:
441455
logging.info("Skip running tests.")
442456
else:

0 commit comments

Comments
 (0)