<#3190 Add support for providing a default instanc...
# flyte-github
c
#3190 Add support for providing a default instance to the databricks agent Pull request opened by andrei-trandafir ## Tracking issue Closes flyteorg/flyte#6253 ## Why are the changes needed? At the moment, the Databricks agent expects the users to provide a databricks instance as part of their task configuration when running Databricks tasks. Considering that databricks tokens are tied to the a specific instance and that the token is always provided through secrets to the agent, this PR adds the option to provide a default instance so that users don't need to specify it themselves, simplifying the user experience. This means that users don't have to register a task for each databricks instance that might be available for them. ## What changes were proposed in this pull request? Modify the
create
method of the Databricks agent to use a default databricks instance provided through an environment variable if available and if the users haven't specified an instance themselves. ## How was this patch tested? The following tests were added: • Tested that the agent uses an instance provided through env variables if users haven't specified in the task config • Tested that the agent throws an exception if neither the user or the agent have an instance available. The changes have also been tested in our own deployed instance of Flyte, and it works as expected. ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ### Summary by Bito This PR adds support for a default Databricks instance in the Flyte Databricks agent, allowing fallback to an environment variable when not specified in task configuration. The implementation includes proper error handling and enhanced test coverage for both default instance usage and exception scenarios. Unit tests added: True Estimated effort to review (1-5, lower is better): 2 flyteorg/flytekit