mirror of https://github.com/databricks/cli.git
0ad790e468
## Changes Since there is no .git directory in Workspace file system, we need to make an API call to api/2.0/workspace/get-status?return_git_info=true to fetch git the root of the repo, current branch, commit and origin. Added new function FetchRepositoryInfo that either looks up and parses .git or calls remote API depending on env. Refactor Repository/View/FileSet to accept repository root rather than calculate it. This helps because: - Repository is currently created in multiple places and finding the repository root is becoming relatively expensive (API call needed). - Repository/FileSet/View do not have access to current Bundle which is where WorkplaceClient is stored. ## Tests - Tested manually by running "bundle validate --json" inside web terminal within Databricks env. - Added integration tests for the new API. --------- Co-authored-by: Andrew Nester <andrew.nester@databricks.com> Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com> |
||
---|---|---|
.. | ||
all_resources_have_values.go | ||
files_to_sync.go | ||
files_to_sync_test.go | ||
folder_permissions.go | ||
folder_permissions_test.go | ||
job_cluster_key_defined.go | ||
job_cluster_key_defined_test.go | ||
job_task_cluster_spec.go | ||
job_task_cluster_spec_test.go | ||
single_node_cluster.go | ||
single_node_cluster_test.go | ||
unique_resource_keys.go | ||
validate.go | ||
validate_sync_patterns.go |