New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recovering from auto save should check the commit-sha #187
Comments
In addition to |
There is yet another bug here: If we have un-pushed commit, they are autosaved by using the commit-sha of the local un-pushed commit. Since, there is not corresponding commit-sha in the remote repo, there is not way to recover the autosaved branch because its commit-sha does not exist in the remote repo. Possible solution would be to use the commit-sha of the remote repo when creating autosaved branches. |
There is another potential bug: if the user creates a branch but doesn't push it, there is no way to recover from an autosave for that branch. |
I thought it is using the commit-sha that the server was started from? |
No, it uses the commit-sha of the current local branch. From
|
right, @jachro and I had some discussions about this - we need to think carefully what the expected behavior would be. My impression is that we should be saving/restoring based on the branch/commit that the server was started from. |
@rokroskar why do you think it's better? I'd care that much about what the user did after starting the session. I think it could be quite confusing if a user is currently working on branch B but the autosave branch would be pointing to branch A (I know it's just a name). |
To me also it does not make sense to use the initial branch/commit. They might be stale at the time of autosave. The user has to start from that branch/commit to have the autosaved branch restored. |
Actually, we need both local and remote commit-shas here. This is needed to restore an autosaved branch for un-pushed commits. The remote commit-sha is needed to check for autosave and local remote-sha is needed to restore the un-pushed commits. |
There is one side-effect here: assume that commit |
Right, unless we push the unpushed commits to remote, we can't resume from there. So maybe the autosave should be from whatever the latest commit that both local and remote branch have in common? In any case, it would be nice if the UI could show that an autosave exists for a particular branch/commit combo. |
I agree, and it shouldn't be that difficult considering we use the branch name to identify the project, branch and commit. Should we only inform the user about this or give him the possibility to choose between starting from the autosaved branch or throwing it away? I personally prefer the first option, since the user may want to check what is in the autosave first |
P.S. we generally use the 8 chars commit, is there a reason why the autosave branch uses 7 chars instead? |
Oh at some point we were using 7 characters in the notebook service... |
Let's discuss this issue tomorrow and make a final decision about it. |
We agreed that:
|
Closed by #190 |
The autosave branch should only be restored if the commit-sha of the autosave equals the requested commit-sha.
See errors reported in SwissDataScienceCenter/renku-ui#472.
The text was updated successfully, but these errors were encountered: