Python models access_control_list argument is not working as intended

未关闭 适合新手
#1,003 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
半天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
authorization

调研方向

从 dbt/adapters/databricks/api_client.py 第 333 行附近开始,使用所示的 Python 模型配置重现该问题。比较 job_spec 中的 ACL 字典与 additional_job_settings,然后验证预期的 grants 或 access_control_list 是否应用于创建的 job,而不是被当作任务设置处理。

由索引模型根据 Issue 内容生成。

描述

bug
Describe the bug

The access_control_list and python_job_config/grants config options are not working. I did some digging and found the ACLs are being added as a task setting instead of the job itself in the API call.

Steps To Reproduce

Running a python model using the following config

dbt.config(
        materialized='table'
        , python_job_config={'grants': {'run': [{'service_principal_name': 'pamons_test_sp_python_job_config'}]}}
       # OR
        , access_control_list=[{'service_principal_name': 'pamons_test_sp_access_control_list', 'permission_level': 'CAN_MANAGE'}]
        , submission_method='job_cluster'
    )
Expected behavior

Job ACLs specified in the config should be set in the job created by the model

System information

The output of dbt --version:

1.10.1

The operating system you're using:
Mac
The output of python --version:
3.11.11

Additional context

Link to code
The ACL dictionary are in the job_spec var but not in the additional_job_settings var

主要语言
Python
星标
391
派生
231
平均合并
9 天 7 小时
30 天内合并 PR
29

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

databricks/dbt-databricks 的其他 Issue

查看 databricks/dbt-databricks 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。