DAB dynvar: cannot parse resource keys starting with digits when permissions are set

Đang mở
#7,387 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

Start by tracing how the CLI parses resource references such as ${resources.jobs.00_clear_silver_and_gold.id} while planning resource permissions, then compare that path with the case where permissions are absent. Reproduce with the YAML example using databricks bundle plan or deploy; done when a resource key beginning with digits plans successfully with permissions.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

Resource keys starting with a digit (e.g. 00_clear_silver_and_gold) fail with cannot parse when permissions are defined on the resource.

Error message:
Error: cannot plan resources.jobs.00_clear_silver_and_gold.permissions: cannot parse "/jobs/${resources.jobs.00_clear_silver_and_gold.id}" Error: planning failed

The same key works fine without permissions. Renaming the key to not start with a digit (e.g. clear_silver_and_gold) while keeping name: 00_clear_silver_and_gold resolves the issue.

Reproduction

CLI version: 1.7.0

resources:
  jobs:
    00_clear_silver_and_gold:
      name: 00_clear_silver_and_gold
      permissions:
        - group_name:  engineer-group
          level: CAN_MANAGE
        - group_name: admin-group
          level: CAN_MANAGE
      tasks:
        - task_key: example_task
          notebook_task:
            notebook_path: ${workspace.file_path}/src/example

Running databricks bundle deploy or databricks bundle plan produces:
Error: cannot plan resources.jobs.00_clear_silver_and_gold.permissions: cannot parse "/jobs/${resources.jobs.00_clear_silver_and_gold.id}"

Expected behavior
Resource keys starting with digits should be supported, consistent with how Terraform and the Databricks API handle job names.

Ngôn ngữ chính
Go
Star
427
Fork
267
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
233

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/cli

Tất cả issue của databricks/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.