- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi all,
I'm hitting persistent Git errors in Databricks Git folders (Repos) and would appreciate any advice.
Environment
- Cloud: AWS
- Compute: serverless only
- Repo: private GitHub repository, working on a develop branch
- Contents: a Declarative Automation Bundle with Lakeflow Spark Declarative Pipelines source files (.py / .sql)
What happens
My original Git folder suddenly became unreadable. Every Git operation fails with: "This folder could not be read as a Git repository. Please try again. If the problem persists, you may need to delete and re-clone the Git folder." Running git status returns fatal: not a git repository (or any parent up to mount point /), but the .git contents look valid when I browse them (HEAD points to refs/heads/develop, and the refs, objects and config are all present). The Git dialog also shows a detached HEAD, which doesn't match the HEAD file.
I cloned the repo into a new Git folder. The clone and the checkout of develop worked, and the status was clean.
I then made a one-line edit (added a comment) to a .py file in the new folder. The next Git operation failed with: fatal: .git/index: index file open failed: Input/output error
After that, status still lists the file as modified, but the diff fails every time with: error: open("<path>/sample_trips_dbrain_lakeflow.py"): Input/output error fatal: cannot hash <path>/sample_trips_dbrain_lakeflow.py The workspace editor can still open and read the file.
Other observations
- There is no index.lock left in .git.
- After the edit, ORIG_HEAD appeared in .git and .git/config was rewritten, the same pattern I saw in the original folder before it broke.
What I've tried
- Retrying the operation and refreshing the Git dialog
- Re-cloning into a new Git folder (works until a file is edited)
Questions
- Has anyone seen "Input/output error" on .git/index or on working-tree files in Git folders? Is this a known issue?
- Could the file being part of a pipeline or bundle source folder matter (for example, the pipeline editor holding the file)?
- Is there a workaround other than repeatedly re-cloning?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
My First Recommendation: Test Git CLI Instead of the Standard Git Folder
Databricks offers a feature called Git CLI access, currently in Public Preview.
It allows you to execute Git commands directly on Serverless Compute, including through the Web Terminal.
According to the documentation:
Git Folders created through the UI automatically receive Git CLI access when the workspace is eligible.
Clones performed through the Web Terminal always have Git CLI access.
This feature allows you to perform standard Git operations directly in the Serverless environment.
Reference: Databricks on AWS – Git CLI access.
I would run this test before trying anything else.
Procedure:
Open the Databricks Web Terminal.
Clone the repository into a new directory:
cd /Workspace/Users/<username>
git clone --branch develop \
https://github.com/<org>/<repo>.git \
repo-testNavigate to the cloned repository:
cd repo-testMake a small change to a .py file:
echo "# git test" >> sample_trips_dbrain_lakeflow.pyRun the following commands:
git status
git diff
git add sample_trips_dbrain_lakeflow.py
git statusHow to interpret the results:
If everything works: This strongly suggests an issue specific to the standard Git Folder implementation or its integration with the workspace editor.
If the same Input/output error occurs: The issue may be broader, potentially involving filesystem access within the Databricks workspace.
This test does not guarantee a fix, but it should help isolate the root cause.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Thank you so much !
It finally worked for me !!
