fix(ui): Replace deprecated overgear/yup-ast package with demvsystems/yup-ast #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
It seems like after upgrading yup from
0.29.1
to1.4.0
, we have broken the its compatibility with the@overgear/yup-ast
package. This package is ancient; it's last published 6 years ago and no longer receives any updates because the original contributors have left the company and do not have any permissions/licenses to continue contributing to them. Their replacement is the@demvsystems/yup-ast
package, which works almost exactly the same as before.This package is used when parsing the
yup
-like schema that's served over an API server endpoint (see https://github.com/caraml-dev/xp/blob/cb06edaaf409077b5abf7fed0b803984b6decf7e/plugins/turing/manager/experiment_manager.go#L38C1-L38C36). We only use this package in one place, when parsing theyup
-like schema off the experiment engines endpoint on the Turing API server (this in turn gets its value from the XP experiment manager plugin, which explains why the file quoted above is found in the XP repository and not in Turing). This parsed schema is then used to validate the XP experiment engine config together with the otheryup
schemas of the Turing router config.More concretely, this broken package is currently causing this problem whereby the
yup
validation that gets triggered when a user clicks on the 'Next' page of an accordion form, to end up permanently stuck:A separate PR in XP has also been created to fix a related bug in the
yup
-like schema quoted above: caraml-dev/xp#81