balena-io / pensieve

A tool for managing and viewing structured documents, backed by the power of git
7 stars 5 forks source link

Saved entries disappear from the list immediately after saving and reappear after reload #175

Open lekkas opened 6 years ago

lekkas commented 6 years ago

Opening this as a placeholder it could be that I'm simply getting an older pensieve.js version (see https://github.com/resin-io/pensieve/issues/174 )

lekkas commented 6 years ago

cc @sonyagreen who I think hit this with Scratchpad as well

lekkas commented 6 years ago

While I haven't been able to consistently reproduce the entry disappearing issue as described in the title (i.e. immediately after saving), I've been able to consistently reproduce this which looks related:

sonyagreen commented 6 years ago

@dfunckt ran into this today. Even refreshing, he didn't see it. When I refreshed, I could see it when he couldn't.

LucianBuzzo commented 6 years ago

In theory https://github.com/resin-io/pensieve/pull/187 should help this issue

sonyagreen commented 6 years ago

I recreated this today.

Labeled degrades-ux because the entry does save (thus not a blocker).

brownjohnf commented 6 years ago

I experienced this today:

I assume i actually hit this issue, but didn't attempt to create any new entries so I didn't see the 409 error.

lurch commented 6 years ago

The entry will appear, but will disappear on page reload. Entry showed up again (for good) within 30 seconds.

Kinda sounds like there's a latency issue between writes (to GitHub) and reads (from GitHub)? If the latency can't be solved (GitHub API issues?) perhaps Pensieve could display some kind of "busy" status until it's sure that GitHub is "fully refreshed"? (this is just my naive un-informed opinion :wink: )

Perhaps @hedss will have more info about / experience with GitHub API latency issues?

hedss commented 6 years ago

Yes, this is not a shock to me, Github def. has an issue with latency between a 200 from a POST of data, and being able to retrieve that data.

The best hope you have for this is to request webhook events and then wait for an event informing you that the data's been committed. However, the bad news is I've seen issues where an event's been posted but the data isn't actually available yet. :( The best you can do here is to retry a fetch until you get the data or for a timeout and complain something's up (which is what VersionBot does). Sucks, but there you go. :(