Repository navigation
Release bfabric 1.24.1, bfabric_scripts 1.19.1 - #648
Conversation
…t AVX2 polars only warns about missing CPU features and then the process dies with 'Illegal instruction'. Turn that one warning into an error when bfabric is imported, so the user sees the 'install polars[rtcompat]' hint.
…ceback Wrap suds faults, unknown query fields and lost connections in BfabricRequestError / BfabricUnavailableError, report ValueError, OSError, YAML and HTTP errors from use_client as a single Error: line, and add the report_user_errors context manager for the same handling elsewhere. An unknown config environment raises a ValueError listing the available ones.
… pytest A newer pydantic makes basedpyright reject TypeAdapter(Annotated alias); add targeted ignores. Wrapping the suds calls in _translate_call_errors moved the baseline-grandfathered reportAny lines, so ignore them in place (basedpyright pruned the now-stale baseline entries). pytest 9.2 removed FixtureManager._arg2fixturedefs, which pytest-bdd 9.0 still uses; cap pytest in the asgi_auth test extra.
Fix bfabric-cli tracebacks on user errors and SIGILL on CPUs without AVX2
… bfabric_app_runner 0.9.1) # Conflicts: # bfabric/docs/changelog.md
BfabricSubmitter.compose_bash_script pasted the workunit's YAML job configuration into an unquoted heredoc, so $(...) or backticks in a parameter value or in the order's fastasequence ran on the Slurm node. Values from the workunit parameters and from the YAML were also pasted unescaped into #SBATCH lines and shell variables. - Embed the configuration base64-encoded and decode it in the script; the written file is byte-identical to the configuration. - Refuse (ValueError) partition, nodelist, memory, log paths, output URLs and ids that are not plain values, before anything is written or submitted. Output URLs must look like [user@]host:/path, which also keeps them from being read as ssh/scp options. - Run the application's registered program and refuse a configuration that names another one. Not changed: submitter_yaml still processes every base64 executable of the workunit, not only the one linked to the external job. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merge release back into main (bfabric 1.24.0, bfabric_scripts 1.19.0, bfabric_app_runner 0.9.1)
Fix shell injection in the legacy Slurm submitter
Graduate each [Unreleased] section to its dated version heading and bump the bfabric floor in bfabric_scripts, whose fix needs report_user_errors from bfabric 1.24.1. bfabric_app_runner has nothing unreleased and its <1.25 pin already admits 1.24.1. Release mechanics only; no code changes.
🚀 Release PreviewThe following packages will be released when this PR is merged:
This comment is automatically updated when the PR changes. |
✅ Release Distribution TestingPackages to release: bfabric, bfabric_scripts Test Results:
Status: All tests passed with built distributions. The packages are ready for release. Last updated: 2026-11-10T09:59:11.869Z |
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate and critical issues remain: malformed YAML can still produce multi-line CLI errors, and unvalidated application and notification values permit shell injection.
3 open issues
What changed in this PR
This release hardens legacy Slurm job submission and improves user-facing error handling across the bfabric client and CLI packages, while bumping package versions to bfabric 1.24.1 and bfabric_scripts 1.19.1.
Changes:
- Encode submitted job configurations safely and validate interpolated Slurm and configuration values.
- Translate SOAP, connection, configuration, and CLI errors into concise user-facing messages.
- Update release metadata, changelogs, typing baselines, and compatibility constraints.
| File | Description |
|---|---|
| tests/bfabric/wrapper_creator/test_bfabric_submitter.py | Tests safe configuration embedding and Slurm value validation. |
| tests/bfabric/utils/test_cli_integration.py | Tests one-line reporting for command and configuration errors. |
| tests/bfabric/test_cpu_check.py | Tests the CPU feature warning behavior. |
| tests/bfabric/engine/test_engine_suds.py | Tests translation of SUDS service-call failures. |
| tests/bfabric/config/test_config_file.py | Tests unknown environment diagnostics. |
| tests/bfabric/config/test_config_data.py | Tests unknown environments during config loading. |
| tests/bfabric_scripts/test_api_parser.py | Tests unknown API method handling. |
| tests/bfabric_cli/test_cli_main.py | Tests top-level CLI error reporting. |
| tests/bfabric_cli/test_cli_dataset_download.py | Updates download error expectations for CLI exits. |
| bfabric/src/bfabric/wrapper_creator/bfabric_submitter.py | Encodes job configuration data and validates script values before submission. |
| bfabric/src/bfabric/utils/cli_integration.py | Adds shared user-error reporting for CLI commands and config loading. |
| bfabric/src/bfabric/entities/core/uri.py | Adds targeted typing suppressions for the URI adapter. |
| bfabric/src/bfabric/entities/application.py | Adds a targeted typing suppression for technology validation. |
| bfabric/src/bfabric/engine/engine_suds.py | Translates SUDS request, SOAP, and connection errors. |
| bfabric/src/bfabric/config/config_file.py | Reports unknown config environments with available names. |
| bfabric/src/bfabric/config/config_data.py | Uses validated environment selection during config loading. |
| bfabric/src/bfabric/__init__.py | Converts Polars CPU compatibility warnings into exceptions. |
| bfabric/pyproject.toml | Bumps bfabric to 1.24.1. |
| bfabric/docs/changelog.md | Documents the 1.24.1 fixes. |
| bfabric_scripts/src/bfabric_scripts/cli/api/parser.py | Converts unknown API methods into clear ValueErrors. |
| bfabric_scripts/src/bfabric_scripts/cli/__main__.py | Applies shared error reporting at the CLI entry point. |
| bfabric_scripts/pyproject.toml | Bumps bfabric_scripts and its bfabric dependency. |
| bfabric_scripts/docs/changelog.md | Documents the 1.19.1 CLI fixes. |
| bfabric_asgi_auth/pyproject.toml | Caps pytest below the incompatible 9.2 release. |
| .basedpyright/baseline.bfabric.json | Removes resolved typing baseline entries. |
Review effort: Lite


No description provided.