This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-orbit.git
The following commit(s) were added to refs/heads/main by this push:
new 5ab3e85b Do not let an empty IT_DISTRIBUTIONS silently empty the list
(#121)
5ab3e85b is described below
commit 5ab3e85b105a0c1e994712d3fd0f3bc648030e18
Author: Jan Høydahl <[email protected]>
AuthorDate: Fri Oct 16 16:52:58 2026 +0200
Do not let an empty IT_DISTRIBUTIONS silently empty the list (#121)
---
it/__init__.py | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/it/__init__.py b/it/__init__.py
index aad2b3cf..bcbf6e10 100644
--- a/it/__init__.py
+++ b/it/__init__.py
@@ -41,9 +41,20 @@ from solrorbit import client, config, exceptions, paths,
version
from solrorbit.utils import docker, process
CONFIG_NAMES = ["in-memory-it"]
-# Overridable so a CI run can pin a single version without a code change.
+#: Overridable so a CI run can pin a single version without a code change.
+#: "or" rather than a get() default: a workflow passes the variable through
+#: whether or not its input was filled in, so the key is present and empty
+#: rather than absent, and a get() default never applies.
+DEFAULT_DISTRIBUTIONS = "9.11.0,10.0.0"
DISTRIBUTIONS = [v.strip() for v in
- os.environ.get("IT_DISTRIBUTIONS",
"9.11.0,10.0.0").split(",") if v.strip()]
+ (os.environ.get("IT_DISTRIBUTIONS") or
DEFAULT_DISTRIBUTIONS).split(",")
+ if v.strip()]
+if not DISTRIBUTIONS:
+ # Never silently empty: test_tar_distributions loops over this list, so an
+ # empty one passes without testing anything at all.
+ raise AssertionError(
+ f"IT_DISTRIBUTIONS={os.environ.get('IT_DISTRIBUTIONS')!r} names no
usable version."
+ )
WORKLOADS = ["geonames", "nyc_taxis"]
# Invoke the Solr Orbit under test, not whatever "solr-orbit" happens to be on
# PATH. A bare command name resolves to a globally installed copy -- a pyenv
shim,