Skip to content

Fix rerendering on invalid form.yml.erb files#5319

Open
andrejcermak wants to merge 3 commits intoOSC:masterfrom
andrejcermak:fix-error-rerendering
Open

Fix rerendering on invalid form.yml.erb files#5319
andrejcermak wants to merge 3 commits intoOSC:masterfrom
andrejcermak:fix-error-rerendering

Conversation

@andrejcermak
Copy link
Copy Markdown
Contributor

This PR aims to fix #5057.

Fix memoisation & UI filtering for malformed Batch Connect apps

  • Memoise form_config correctly using defined?(@form_config) so an empty hash is cached and the ERB is not reparsed on every call.
  • Cache the result of valid? to avoid repeated form_config look‑ups.
  • Filter out apps that fail validation for the saved‑settings dropdown.
  • Harden recently_used_apps_helper:
    • safe valid_batch_connect_app? validity check
    • rescue around session context building

@andrejcermak
Copy link
Copy Markdown
Contributor Author

Even though this is an individual PR, it could also be seen as part of the caching initiative as it caches invalid apps and doesn't allow re-rendering.

@johrstrom
Copy link
Copy Markdown
Contributor

The other PR you have open may be eaiser to merge because it's simpler. This, I'm not so sure about. It'll require some thought, which we don't have a lot to spare given we're trying to merge all our accessibility issues and urgently release 4.2 for the same.

@andrejcermak
Copy link
Copy Markdown
Contributor Author

@johrstrom thats fine by me, I think the other PR was much more important. This is more of a failsafe mechanism and is not urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

Corrupt interactive app form results in slow rendering

3 participants