← 输入框|github.com|刷新
Skip to content

[python] Use only real storage and volume attributes classes in tests - #7790

Merged
xiasongh merged 1 commit into
mainfrom
song/test-storage-class
Nov 3, 2026
Merged

xiasongh merged 1 commit into
mainfrom
song/test-storage-class

Conversation

@xiasongh

@xiasongh xiasongh commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The api-server refuses a storage_class or volume_attributes_class outside its allowlist (#7712). Some platform tests used made-up names (normal, example), so they fail on an installation with an allowlist, such as cloud CI.

Test Change
test_pipeline_runtime_config storage_class case removed
test_runtime_config_edit_restricted storage_class step reads FELDERA_TEST_STORAGE_CLASS; skipped when unset
test_volume_attributes_class_edit_with_storage reads FELDERA_TEST_VOLUME_ATTRIBUTES_CLASS; skipped when unset

No defaults, so no test sends a class the installation does not have. Cloud CI sets FELDERA_TEST_STORAGE_CLASS in feldera/cloud#2144.

Tested on k3d with the storage class allowlist set to local-path: test_pipeline_runtime_config passes. The restricted-edit and volume attributes tests were not run (they need a compile, which does not work on that cluster, and k3d has no VolumeAttributesClass).

@xiasongh
xiasongh marked this pull request as ready for review November 2, 2026 19:16
Comment thread python/tests/platform/helper.py Outdated
API_PREFIX = "/v0"

# A storage class the installation allows. Set it where the API has a storage class allowlist.
STORAGE_CLASS = os.environ.get("FELDERA_TEST_STORAGE_CLASS", "example")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing (medium): check_storage (crates/pipeline-manager/src/config.rs) has a second allowlist of the same kind, kubernetesRunner.volumeAttributesClassNamesSupported. test_volume_attributes_class_edit_with_storage (test_pipeline_lifecycle.py:781) still hardcodes "example", so it will fail the same way on an installation that turns that allowlist on. Could you add a matching FELDERA_TEST_VOLUME_ATTRIBUTES_CLASS here and use it in that test, so this doesn't need a second PR?

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

Summary: This is a test-only change. It lets the platform tests read the storage class from FELDERA_TEST_STORAGE_CLASS, with example as the default. Product behaviour does not change, so the gate for new tests does not apply. The PR description covers manual testing on k3d.

Check Result
pre-commit run --files <3 changed files> (ruff, ruff-format, whitespace) passed
Syntax/import check in the uv env (os is already imported in helper.py) ok
Platform tests not run (they need the manager and the compiler)
Reviewed against the allowlist check in config.rs check_storage the env class works in both tests: test_runtime_config_edit_restricted starts from a null class, so its != new_value precondition still holds
  • missing (medium): the volume-attributes-class allowlist has the same problem; see the inline comment.
  • missing (low): add the new env var to the platform test README or docs, if they list test env vars, so others can find it.

No feldera-pr-checks gates fail. LGTM once the volume-attributes test is handled or tracked separately.

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM. This is a test-only change. The new knob follows the existing FELDERA_TEST_NUM_WORKERS pattern, and the default does not change behaviour when the variable is unset. No feldera-pr-checks gate fails.

What I ran

  • pre-commit run on the 3 changed files: ruff and ruff-format pass.
  • Imported tests.platform.helper with and without FELDERA_TEST_STORAGE_CLASS=local-path. It resolves to local-path and example as expected.
  • I did not run the platform tests themselves; they need a running pipeline-manager and compiler. The k3d run in the PR description covers test_pipeline_runtime_config.

An api-server with an allowlist refuses the old fixed names. Tests read
the classes from FELDERA_TEST_STORAGE_CLASS and
FELDERA_TEST_VOLUME_ATTRIBUTES_CLASS and skip those checks when unset.
@xiasongh
xiasongh force-pushed the song/test-storage-class branch from 6bef734 to de09028 Compare November 2, 2026 19:29
@xiasongh xiasongh changed the title [python] Read the test storage class from FELDERA_TEST_STORAGE_CLASS [python] Use only real storage and volume attributes classes in tests Nov 2, 2026
@xiasongh
xiasongh enabled auto-merge November 2, 2026 19:30
@xiasongh
xiasongh disabled auto-merge November 2, 2026 19:40
@xiasongh
xiasongh added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 0331385 Nov 3, 2026
1 check passed
@xiasongh
xiasongh deleted the song/test-storage-class branch November 3, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants