apache/beam · error · StopExecutionException

Unknown yamlTestSet: . Must be one of 'data', 'databases'…

Error message

Unknown yamlTestSet: ${currentTestSet}. Must be one of 'data', 'databases', 'messaging', or 'e2e'.

What it means

The Beam Python YAML integration test Gradle task accepts a -PyamlTestSet argument and selects a test directory via a switch. If the value is not one of 'data', 'databases', 'messaging', or 'e2e', the Gradle build aborts immediately with StopExecutionException before running pytest.

Solutions

  1. Re-run with one of the valid values, e.g. ./gradlew :sdks:python:test-suites... -PyamlTestSet=data
  2. Check for typos and case sensitivity (values are lowercase).
  3. In CI, print/echo the interpolated yamlTestSet value to see what is actually passed.
  4. Consult current Beam docs for the exact supported test sets.

Example fix

// before
./gradlew yamlIntegrationTest -PyamlTestSet=integration
// after
./gradlew yamlIntegrationTest -PyamlTestSet=data
Defensive patterns

Strategy: validation

Validate before calling

VALID_SETS = {"data", "databases", "messaging", "e2e"}
assert yaml_test_set in VALID_SETS, f"yamlTestSet must be one of {sorted(VALID_SETS)}, got {yaml_test_set!r}"

Prevention

When it happens

Trigger: Running the yaml integration test Gradle task with -PyamlTestSet=<anything other than data|databases|messaging|e2e>, including typos, wrong case, or passing the flag empty.

Common situations: Typo in the property name/value; copying a command from older docs where the allowed sets differed; CI scripts passing interpolated values that resolve to blank or unknown strings.

Understand the failure class

Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/f8d91d36aea35ca0. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/build.gradle:206

    def testSetsToRun = testSetInput.tokenize(',').collect { it.trim() }.findAll { !it.isEmpty() }
    testSetsToRun.each { currentTestSet ->
      def test_files_dir

      switch (currentTestSet) {
        case 'data':
          test_files_dir = 'extended_tests/data'
          break
        case 'databases':
          test_files_dir = 'extended_tests/databases'
          break
        case 'messaging':
          test_files_dir = 'extended_tests/messaging'
          break
        case 'e2e':
          test_files_dir = 'extended_tests/e2e'
          break
        default:
          throw StopExecutionException("Unknown yamlTestSet: ${currentTestSet}. Must be one of 'data', 'databases', 'messaging', or 'e2e'.")
      }
      exec {
        executable 'sh'
        args '-c', "${envdir}/bin/pytest -v apache_beam/yaml/integration_tests.py --test_files_dir='${test_files_dir}'"
      }
    }
  }
}

// Create Python wheels for given platform and Python version
// build identifiers for cibuildwheel
def platform_identifiers_map = [
  linux: 'manylinux_*64*', // e.g. manylinux_x86_64, manylinux_aarch64
  macos:'macosx_*64*',     // e.g. macosx_x86_64, macosx_arm64
  windows: 'win_*64*',     // e.g. win_amd64, win_arm64
]

platform_identifiers_map.each { platform, idsuffix ->

View on GitHub (pinned to 12126d8942)