Hugging Face Space Keeps Using an Old Commit Despite Redeploys

Description

I’m running a FastAPI app in a Docker Space on Hugging Face, and I’m experiencing an issue where my Space keeps using an old commit, even after pushing new commits and triggering a redeploy.

Steps Taken

  1. I have committed and pushed multiple updates:
git add .
git commit -m "Trigger redeploy"
git push origin main
  1. I even removed all remote files and pushed a fresh commit:
git rm -r *
git commit -m "Remove all remote files"
git push origin main
  1. Checked my commit history, and the latest commit is correct:
git log --oneline -n 5
  1. Triggered a Factory Rebuild in my Hugging Face Space.
  2. Despite all this, my Space still picks an old version of my repo when it builds.

Possible Causes?

Question

Has anyone faced this before? How can I force my Hugging Face Space to rebuild with the latest commit?

Thanks in advance for any help! :rocket:

2 Likes

Hey @Martim-Ramos-Neural,
I ran into a similar issue previously where the space was stuck on Building status and even after trying Factory Rebuild and Restart This Space, nothing helped. The only thing that worked for me was creating a new Space and pushing the latest code there.

If feasible, you might want to try this as a last resort.

1 Like

Same here. In my Logs, the Commit SHA shows an old commit.

I have tried Restarting the space, and pushing new commits, but no luck.

Update: I think it was because I was both logged in with both Chrome and Firefox. Only having 1 page open with the HF space while deploying seemed to make a difference. Possible a web socket issue.

2 Likes

" SOLVED ". Only happens with DEV mode enabled.

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.