Skip to content
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

Remove polling for Enketo IDs #865

Closed
matthew-white opened this issue Sep 19, 2023 · 4 comments · Fixed by #987
Closed

Remove polling for Enketo IDs #865

matthew-white opened this issue Sep 19, 2023 · 4 comments · Fixed by #987
Assignees
Labels
refactor Improves code without altering behavior

Comments

@matthew-white
Copy link
Member

The most complicated part of the FormShow component is polling Backend for Enketo IDs for a form or form draft that's missing them. With getodk/central#385 in place, it should be the case that Backend returns Enketo IDs immediately in the vast majority of cases, making that polling much less useful. If that proves to be true in experience, I think we should strongly consider removing that polling from Frontend as a source of complexity that's outlived its usefulness. That polling is also noisy during local development if you don't have Enketo set up.

EnketoPreview and EnketoFill already recommend refreshing, so I don't think any text would need to change:

"processing": "Preview has not finished processing for this Form. Please refresh later and try again.",

"processing": "Web Form is not available yet. It has not finished being processed. Please refresh later and try again.",

@matthew-white matthew-white added the refactor Improves code without altering behavior label Sep 19, 2023
@github-project-automation github-project-automation bot moved this to 🕒 backlog in ODK Central Dec 20, 2023
@matthew-white
Copy link
Member Author

If that proves to be true in experience

@lognaturel, how have things been going in terms of Backend being able to fetch Enketo IDs synchronously instead of async? If it's now rare that Enketo IDs are fetched async, I'd love to remove this polling from Frontend.

@lognaturel
Copy link
Member

Can you please remind me what action I was supposed to take? 🫣 It's my believe that Enketo's response has always been immediate and synchronous. Maybe I should verify in the Enketo source?

@matthew-white
Copy link
Member Author

Mostly I'm curious about what you've seen in practice. When you create a form or create a form draft or replace an existing form draft or publish a form draft, are the buttons in Frontend that link to Enketo enabled right away? I guess if Enketo's response is immediate, that should mean that the buttons in Frontend are enabled right away. I don't think you necessarily need to verify that in the source; mostly I'm interested in your observations in practice. (Assuming that enough time has passed since v2023.4 to make that determination.) I'm eager to remove the polling described above from Frontend, but first I want to confirm that it is useful only rarely if ever.

@lognaturel
Copy link
Member

lognaturel commented Jan 9, 2024

I use all of the buttons mentioned all the time and have never seen them disabled since the 2023.4 changes! It has greatly, greatly improved my life.

@ktuite ktuite moved this from 🕒 backlog to ✏️ in progress in ODK Central May 1, 2024
@github-project-automation github-project-automation bot moved this from ✏️ in progress to ✅ done in ODK Central May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improves code without altering behavior
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

3 participants