Allow sync.paths to traverse outside of git folder

Abierto
#6,065 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
go
Área
cli

Línea de trabajo

Empieza reproduciendo el problema con el databricks.yml proporcionado y databricks bundle validate, comparando un repositorio Git con una carpeta que no sea de Git. Rastrea el tratamiento de validación de sync.paths y la raíz del repositorio; se considera terminado cuando las rutas fuera de la raíz de Git se validen de forma coherente en ambas configuraciones, con cobertura de regresión para la configuración indicada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

DABs Enhancement
Describe the issue

When pointing a bundle's sync.paths field outside of the bundle root, and if that traverses outside of the git folder root, databricks bundle validate returns with an error Error: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"

However, when pointing to a sync.paths folder that traverses outside of the bundle root when NOT in a git folder, it works as expected.

Configuration
# databricks.yml
bundle:
  name: sync-paths-root-test

sync:
  paths:
    - .
    - ../repo-sibling/
Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Create a databricks bundle in a git folder
  2. Create a databricks.yml in the root of the git folder and point sync.paths to a folder outside of the repo root
  3. Run databricks bundle validate and you will see the error output

Do the same steps but create the bundle in step #1 in a non-git folder. You will not get an error

Expected Behavior

I expect the bundle to validate even when sync.paths traverses outside the Git repository root.

This works when the bundle is located in a non-Git build directory and the bundle folder and dependency folder are siblings. In that pipeline setup, databricks bundle validate succeeds.

However, local validation fails when sync.paths references files outside the Git repository root.

We maintain shared helper scripts in a separate repository from our DABs projects. Based on the documentation, sync.paths should allow those scripts to be included in the bundle deployment. The behavior appears inconsistent depending on whether the bundle is validated inside a Git repository.

Actual Behavior

i receive an error Error: path <path-to-sync-path> is not within repository root "<path-to-git-folder>"

OS and CLI version

Databricks CLI: v1.9.0
OS: Ubuntu 24.04/25.04, Windows 11

Is this a regression?

No

Lenguaje dominante
Go
Estrellas
396
Forks
233
Merge medio
2 d 52 min
PR fusionados (30 d)
276

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de databricks/cli

Todos los issues de databricks/cli

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.