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> |
||
---|---|---|
.. | ||
auth | ||
cmdgroup | ||
cmdio | ||
databrickscfg | ||
dbr | ||
diag | ||
dyn | ||
env | ||
errs | ||
exec | ||
fakefs | ||
filer | ||
fileset | ||
flags | ||
folders | ||
git | ||
iamutil | ||
jsonschema | ||
locker | ||
log | ||
notebook | ||
process | ||
python | ||
set | ||
sync | ||
tags | ||
template | ||
terraform | ||
testfile | ||
textutil | ||
vfs |