devcontainer: Implement remote support for git checkpoint operations#48896
devcontainer: Implement remote support for git checkpoint operations#48896oliverbarnes wants to merge 6 commits intozed-industries:mainfrom
Conversation
Add request handlers for create, restore, compare, and diff checkpoint operations on remote repositories. Define protobuf messages for each operation and wire them through the entity request system. Implement diff_checkpoints for FakeGitRepository and add integration tests covering the full remote round-trip.
|
After latest merges I'm getting a panic when testing manually and opening the devcontainer. Looking into it |
|
Seems to be independent from this PR and to happen upstream, on main. I've created an issue and am working on a fix for it: #49055 |
…ce entity lease (#49058) Closes #49055 **Heads up**: This might be a naïve solution. I ran into the issue after merging latest main into #48896, and confirming that it was unrelated to that PR and incoming from upstream. Agent one-shot the fix, it works and tests pass. But I'm still wrapping my head around the changes that led to the bug. I figured the breakage is bad enough (I couldn't open devcontainers at all) to submit a possibly naïve fix. ## Fix Hoists the `find_devcontainer_configs` call out of `new_dev_container` and into the call site, where we already have a direct `&mut Workspace` reference that doesn't go through the entity map. The computed configs are passed into `new_dev_container` as an argument. ## What was happening After #48800 ("Re-add MultiWorkspace"), `with_active_or_new_workspace` nests a `Workspace` entity lease inside a `MultiWorkspace` entity lease. The `OpenDevContainer` handler was also changed from async to sync in the same PR, so `RemoteServerProjects::new_dev_container` now runs while `Workspace` is leased. Inside `new_dev_container`, a `WeakEntity<Workspace>::read_with` call tries to read `Workspace` through the entity map, finds it already leased, and panics. Release Notes: - Fixed a panic when opening the dev container modal via the `OpenDevContainer` action.
|
@cole-miller I just merged in latest main with the fix and double-checked the checkpoint is still working on devcontainers here. Ready for review again :) One question about review process - when something like this comes up (an upstream bug breaks an open PR under review), would it be better to set it as draft again until the PR is back working again? |
|
@cole-miller will you be able to review this PR this week? |
|
@oliverbarnes I am not sure if the Zed team still reviews contributor PRs. 🤔 |
|
@secondl1ght they do, I've been in touch with them over Discord and they're still welcoming PRs and reviewing them, once they get to it. There's a flood of PRs, most likely because of AI as with other OSS projects, and they're figuring out how to deal with the surge. I'm part of the problem :) I've myself submitted more PRs in a short period of time than I usually would have, because agents. It's not an easy one to tackle, so we need to be patient |
|
@oliverbarnes do you want to resolve conflicts and pull the latest? |
@secondl1ght I think I'll wait until the solution is validated by the team before doing so. Hydrating the open PRs and resolving upstream conflicts has been quite an amount of work due to how long the PRs have been taking to get a review. No criticism implied, I'd just rather resolve conflicts in one last batch, addressing any issues with the solution if they are raised. Thanks for staying on top of it! |
|
OK sadly I lose hope for this one then 😢 unless @cole-miller responds, but he was assigned a few weeks ago. It is a really frustrating one because users who pay Zed for AI features cannot have this super important restore checkpoint functionality... this is their main source of revenue, but if it doesn't work then we can't continue paying for it. 🤷🏼♂️ |
…in-devcontainer # Conflicts: # crates/proto/proto/git.proto # crates/proto/proto/zed.proto # crates/remote_server/src/remote_editing_tests.rs
|
Alright, alright... :) Went ahead and fixed the conflicts. They weren't so bad in the end |
…in-devcontainer # Conflicts: # crates/proto/proto/zed.proto # crates/remote_server/src/remote_editing_tests.rs
Closes #47907
Implements the four git checkpoint operations (
create,restore,compare,diff) that had been stubbed out for remote repositories, and related test infrastructure.Testing steps:
.devcontainerconfiguration and connect to the Dev ContainerRelease Notes: