Closed knod closed 2 years ago
Before making a commit, you should close all other playground tabs in your browser on all of your devices. When you make a commit, the files in the Playground can change. This is because the "Commit" button actually does a merge behind the scenes. You don't want to have versions of files "cached" in your browser, because then when you press Save you may be overwriting changes with out of date versions.
That's good advice, but I don't think it applies here. In my case, all of the files were up to date already.
Just to add some data, a possibly related behavior:
So this doesn't go back to a commit previous to the current commit, but it does go back to the state of the file at the most recent commit instead of to the file as it was saved.
[Edit: To be clear, there were absolutely no commits made at any point in here.]
This time it happened without any long waiting in between. I happened just after a commit. The file looked up to date, I made a commit, the file's contents were no longer up to date. I don't think I even refreshed the window, but when I did refresh, the code was still wrong. I was lucky I noticed it. I pulled to get the updated code back.
Next time I'll close my tabs and re-open them. Is there anything I can log to find out what's going on?
The docassemble.log
file logs what the various git
commands are doing.
You should always close all other Playground-related tabs before pressing the Commit button. Behind the scenes, the Playground files are changed according to what is required by the process of merging your edits relative to the latest pull into the current state of the selected branch. The Commit button process ends with a pull, which overwrites the contents of files in the Playground. The commit that was just committed thus becomes the "latest pull."
The latest commit isn't what's in the files, though. That's what I'm finding confusing. The commit before the latest commit is what's in the files that get changed.
New experience that I think may have had nothing to do with commits:
State 1
)State 2
)State 1
again. All work from State 2
was lost.Nothing about the commit should have affected anything. So maybe this has nothing to do with the commits. Could it be something with cookies? Local storage?
Since the commit dealing with the cache I haven't noticed any issues. This may have been caused by a specific plugin and I'm grateful that I'm able to use both Docassemble and my plugins. Thank you!
Sorry, but this happened again. I'm not sure if I've just been missing it happening or if something was different this time. This was a situation where I'd restarted my browser, restoring all tabs.
This time it was even more pronounced because when I downloaded the text of the interview, it was the text from an older version. I pulled the master branch and it took 5 minutes or so for the interview page to get back to normal.
I'm not sure if it's related, but now when I try to download the text it's missing parts of the interview text. Specifically, a piece of text that I can currently visually see on the interview. I haven't gone through the whole text, so I'm not sure what all is missing.
I'll try disabling the plugin, of course, I'm just updating on the current state of the fix.
It may have been to the previous commit, but it may have been further back. It's happened to me three or four times in the past week.
I'm putting what I know of the problem here now so we can narrow it down more moving forward and figure out the next things to test.
You'd think it wouldn't matter so much, but there are some circumstances that are very frustrating:
Replicating
Evidence
Because human minds and memories are frail, this is how I confirm when this has happened. When I suspect files have been reverted and then those reversions saved:
I know, it's confusing. I welcome suggestions on how to clarify.
Other things to know
How to get back to the most recent commit
If you haven't yet made any changes that you really want to keep, you can just go to the
Packages
and pull from the branch that you've been working on. For me it's mostlymaster
.What to do when you've made some changes you want to keep