Skip to content

Conversation

@machichima
Copy link
Member

@machichima machichima commented Jun 4, 2025

Tracking issue

Closes flyteorg/flyte#6471

Why are the changes needed?

Using Databricks connector without setting optional spark_conf field will cause KeyError: 'sparkConf'

What changes were proposed in this pull request?

If sparkConf is empty, use {}

How was this patch tested?

Added unit test for DatabricksV2 with and without spark_conf

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

This pull request resolves a KeyError in Databricks tasks by using an empty dictionary when the optional spark_conf field is absent. It also includes unit tests for the new DatabricksV2 configuration to ensure functionality in both scenarios.

plugin_requires = [
"apache-airflow<3.0.0",
"apache-airflow-providers-google<12.0.0",
"sqlalchemy-spanner!=1.12.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

It's not in the scope of this PR, but adding this to make the airflow plugin CI pass

@machichima machichima force-pushed the 6471-databricks-without-sparkconf branch from 67dd7c3 to 93ebc24 Compare June 5, 2025 16:14
@flyte-bot
Copy link
Contributor

Bito Review Skipped - No Changes Detected

Bito didn't review this pull request because we did not detect any changes in the pull request to review.

Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@pingsutw pingsutw merged commit 3da26d9 into flyteorg:master Jun 6, 2025
114 of 115 checks passed
Atharva1723 pushed a commit to Atharva1723/flytekit that referenced this pull request Oct 5, 2025
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.

[BUG] KeyError: 'sparkConf' occurs when running a Databricks task without spark_conf

3 participants