Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Merge/6.2.0 #691

Merged
merged 29 commits into from
Sep 27, 2023
Merged

Merge/6.2.0 #691

merged 29 commits into from
Sep 27, 2023

Conversation

MartijnR
Copy link
Member

@MartijnR MartijnR commented Jul 19, 2023

Merges enketo/enketo-express 6.2.0.

Todo:

For posterity, since this was quite a headache to figure out:

There was an issue with the build output. I had to set splitting: false to be able to load OC's enketo-core extensions. This fixed the functionality in real-life. Update: after fixing all the other things that were wrong, I was able to switch back to splitting: true!

However, the tests were still failing (not loading OC's enketo-core's extensions). Eventually, I found that I had to tweak the files array items order in the karma config back to the way it was before.

eyelidlessness and others added 25 commits April 3, 2023 12:31
…toolbox#543)

* Added exp backoff when submission failed attempt

* Some cleanup

* Exponential backoff tests and refinements

To aid understanding the existing code and support these changes, `uploadQueue` has been converted from `Promise`s to `async`/`await`.

- Adds tests for retry-specific behavior, and related behavior affected by these changes

- Renames some properties/variables in exponential backoff to be more explicit/clear

- Corrects the retry delay calculation. It previously would retry immediately after initial failure

- Moves all retry/timing logic into exponential-backoff.js. It previously implicitly depended on a session-global `setInterval` long-polling call in records-queue.js. Being session-global, its timing relative to the exponential backoff itself would be unpredictable

- Attempts to upload existing queued records on page load, immediately after determing whether there are queued records to upload

- Cancels retries/backing off when the user attempts to submit a record

- Initiates retries when offline as determined by `connection.getOnlineStatus`

- Cancels retries/backing off when connectivity is restored, as determined by `connection.getOnlineStatus`

* Retry submission on partial failure

* Fix: offline-capable upload messaging consistency

- Consistently display success banner, whether on load, user submission, or post-backoff success

- Consistently display failure alert whether caused by being offline or a non-auth error

- Display dialog for auth error, with wording updated to reflect queueing success (rather than warning about losing unsaved data, as there should not be at submission time)

---------

Co-authored-by: Anji Tong <[email protected]>
feat(app): add enketo namespace to all debug statements
Largely based on getodk/javarosa#707. The biggest divergence besides obvious language/API differences is the validation approach. And `@ts-check` was added to ensure the validation and types actually match the expected runtime values.
Use Core version with performance optimizations
Make pdf generation timeout configurable
# Conflicts:
#	Gruntfile.js
#	app/controllers/transformation-controller.js
#	app/views/surveys/webform.pug
#	docs/tutorial-12-ordinals.html
#	package-lock.json
#	public/js/src/enketo-webform.js
@MartijnR
Copy link
Member Author

MartijnR commented Jul 20, 2023

Quite a few changes and it was difficult to resolve merge issues. No known issues remaining, but there is higher-than-normal likelihood for regressions. Lesson learned is that we need to merge from enketo/enketo-express more often (or in smaller successive steps).

@MartijnR MartijnR marked this pull request as ready for review July 21, 2023 20:44
@pbowen-oc
Copy link

@kkrumlian @MartijnR - Do you recommend merging this now?

@MartijnR
Copy link
Member Author

MartijnR commented Sep 19, 2023 via email

@kkrumlian kkrumlian merged commit 11db986 into master Sep 27, 2023
4 checks passed
@kkrumlian kkrumlian mentioned this pull request Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants