Repository navigation
fix(spark): drop the stray argument passed to _backend_config in the advanced-options example - #786
Merged
google-oss-prow[bot] merged 1 commit intoOct 2, 2026
Conversation
`_backend_config()` takes no parameters, but example 5
(`example_combined_options`) calls it as
`_backend_config("spark-production")`, which raises
TypeError: _backend_config() takes 0 positional arguments but 1 was given
The other four call sites in this file all invoke it with no arguments.
Because `main()` wraps every example in a broad `except Exception`, the
failure surfaces as a misleading "make sure you have Spark Operator
installed / RBAC configured" message and example 5 never runs.
The namespace has to stay environment-driven so the in-cluster E2E run
keeps using `SPARK_TEST_NAMESPACE`, and this example already names its
session through the `Name(_e2e_session_name("prod-etl-session"))` option,
so the extra argument is simply dropped to match the sibling call sites.
Signed-off-by: Tai An <antai12232931@outlook.com>
Contributor
|
🎉 Welcome to the Kubeflow SDK! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
Member
|
/ok-to-test |
Member
|
Thanks! |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
digvijay-y
pushed a commit
to digvijay-y/sdk
that referenced
this pull request
Oct 17, 2026
…advanced-options example (kubeflow#786) `_backend_config()` takes no parameters, but example 5 (`example_combined_options`) calls it as `_backend_config("spark-production")`, which raises TypeError: _backend_config() takes 0 positional arguments but 1 was given The other four call sites in this file all invoke it with no arguments. Because `main()` wraps every example in a broad `except Exception`, the failure surfaces as a misleading "make sure you have Spark Operator installed / RBAC configured" message and example 5 never runs. The namespace has to stay environment-driven so the in-cluster E2E run keeps using `SPARK_TEST_NAMESPACE`, and this example already names its session through the `Name(_e2e_session_name("prod-etl-session"))` option, so the extra argument is simply dropped to match the sibling call sites. Signed-off-by: Tai An <antai12232931@outlook.com> Signed-off-by: digvijay-y <144053736+digvijay-y@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
examples/spark/spark_advanced_options.pydefines the helper with no parameters:Four of the five call sites invoke it correctly, but example 5 passes an argument:
_backend_config()_backend_config()_backend_config()_backend_config()_backend_config("spark-production")Line 217 raises:
main()wraps every example in a broadexcept Exception, so the user neversees the
TypeErroritself — example 5 silently never runs and the scriptprints the misleading advice instead:
ALL EXAMPLES COMPLETE!is never printed. The in-cluster E2E run is unaffectedbecause
SPARK_E2E_RUN_IN_CLUSTER=1skips example 5, which is why this has goneunnoticed in CI.
Fix
Drop the stray argument so line 217 matches the other four call sites.
I deliberately did not make
_backend_configaccept a namespace: thenamespace must stay environment-driven (
SPARK_TEST_NAMESPACE) for thein-cluster E2E run, and this example already names its session through the
options pattern it is demonstrating:
Verification
Signature replay against
main(3febcd7):After the patch, no call site passes an argument. Diff is one line.
🤖 Generated with Claude Code