You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过GitHub Action部署ADF Databricks链接服务时clusterOption自动重置问题

ADF链接服务部署后Databricks集群Autoscaling配置丢失问题排查

问题概述

通过GitHub Action推送Databricks池集群的ADF链接服务配置时,已在JSON中明确设置"clusterOption": "Autoscaling",但部署到生产环境后:

  • clusterOption配置项从链接服务代码中消失
  • 集群模式自动切换为默认的"Fixed"
  • newClusterNumOfWorker值从推送的"1:16"被修改为"1:2"
    该问题在所有环境中均存在。

推送的原始配置

{
    "name": "ADF_cluster_Test",
    "properties": {
        "annotations": [],
        "type": "AzureDatabricks",
        "typeProperties": {
            "domain": "https://adb-<masked>.azuredatabricks.net",
            "authentication": "MSI",
            "workspaceResourceId": "/subscriptions/<masked>/resourceGroups/<masked>/providers/Microsoft.Databricks/workspaces/<masked>",
            "instancePoolId": "<masked>",
            "newClusterNumOfWorker": "1:16",
            "newClusterSparkEnvVars": {
                "PYSPARK_PYTHON": "/databricks/python3/bin/python3"
            },
            "newClusterVersion": "12.2.x-scala2.12",
            "clusterOption": "Autoscaling",
            "newClusterInitScripts": []
        },
        "connectVia": {
            "referenceName": "<masked>",
            "type": "IntegrationRuntimeReference"
        }
    },
    "type": "Microsoft.DataFactory/factories/linkedservices"
}

部署后的配置变更

{
    "name": "ADF_cluster_Test",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "type": "AzureDatabricks",
        "typeProperties": {
            "domain": "https://adb-<masked>.azuredatabricks.net",
            "authentication": "MSI",
            "workspaceResourceId": "/subscriptions/<masked>/resourceGroups/<masked>/providers/Microsoft.Databricks/workspaces/<masked>",
            "instancePoolId": "<masked>",
            "newClusterVersion": "12.2.x-scala2.12",
            "newClusterNumOfWorker": "1:2",
            "newClusterSparkEnvVars": {
                "PYSPARK_PYTHON": "/databricks/python3/bin/python3"
            },
            "newClusterInitScripts": []
        },
        "connectVia": {
            "referenceName": "<masked>",
            "type": "IntegrationRuntimeReference"
        },
        "annotations": []
    }
}

可能原因及解决方案

1. 实例池配置覆盖ADF侧设置

当使用Databricks实例池(instancePoolId)时,ADF链接服务的clusterOption和newClusterNumOfWorker会被实例池本身的配置覆盖:

  • 登录Databricks工作区,进入目标实例池的配置页面,检查是否已开启自动伸缩,并设置了正确的最小/最大worker节点数
  • 若实例池已配置自动伸缩,无需在ADF链接服务中设置clusterOption,直接依赖实例池的配置即可

2. ADF部署引擎的字段校验逻辑冲突

ADF部署引擎对实例池模式下的链接服务有特定校验规则,clusterOption字段会被判定为无效并自动移除:

  • 移除ADF链接服务JSON中的clusterOption字段,确保配置与实例池模式兼容
  • 若需要在ADF侧控制自动伸缩,改用现有集群模式而非实例池,此时clusterOption字段可正常生效

3. 部署工具版本兼容性问题

旧版本的Azure CLI或ADF工具包可能不支持实例池与clusterOption的组合配置:

  • 执行az upgrade将Azure CLI更新至最新版本
  • 使用最新版的azure-data-factory-utilities工具重新生成部署模板,再通过GitHub Action推送

4. Azure集成兼容性Bug

该问题可能属于ADF与Databricks集成的已知兼容性问题:

  • 通过Azure支持提交工单,提供部署前后的配置对比、环境信息及重现步骤,请求官方排查修复
  • 临时解决方案:部署完成后手动进入ADF控制台,将链接服务的集群模式重新设置为Autoscaling

内容的提问来源于stack exchange,提问作者nasir

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 23:33:20