Add build time launch file schema constraints from allowed tunable properties#1735
Open
adedoyinNteligen wants to merge 1 commit into
Conversation
Collaborator
Author
|
Add screenshots |
a15b6f0 to
b99e844
Compare
lrbarber
requested changes
Jun 29, 2026
lrbarber
left a comment
Collaborator
There was a problem hiding this comment.
Some of the Daffodil tunables seem to be missing from the list used for validating entries -- mostly from the bottom of the list provided at https://daffodil.apache.org/tunables/
Also (minor) when the tunable name is invalid, the error message changes the vertical spacing so that the value field is lower than then name field.
Collaborator
Author
|
The validation of values in the wizard is not very strong, to avoid blocking from someone from submitting something that may be omitted in documentation accidentally. this can always be improved upon, but runs the risk of a valid value being omitted. |
changes to scripts.js dont let users save invalud key or value move tunables.json and add feature Document allowed tunables and error handling Added section on allowed tunables and their validation process. Exclude tunables.json from RAT and prettier documentation + more tunables + verifiy values
b99e844 to
a40d571
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #455
Description
If a user adds a invalid tunable their launch.json either by wizard or manually dfdl extension does not fail gracefully.
This PR is meant to prevent users from adding invalid tunables that would crash dfdl. From the wizard, users wont be allowed to save invalid tunables and are alerted if the tunable is invalid. In case a user creates the launch.json manually, when they try to run dfdl, they will get a error box with two options
Ignore Invalid tunables. This option will run dfdl and ignore the invalid tunables in the launch.json. It does NOT remove the tunable from the launch.json, just runs the config without the tunable attached
Cancel. This stops dfdl from running and the user goes back to correct their config.
The list of valid tunables is in constants/tunables.json . This will be updated according to DFDL tunables with each release. A future will be created in the future to give users a way to bypass or add new tunables to the allowed list in case the .json is not updated properly. (The current recommendation is a switch in the launch.json which defaults to true, and the user can set it to false and tunables wont be validated anymore. This way users can remove the guiderails at their own risk )
#1736
The enhancement ticket is listed above
Wiki
Constants/tunables.json is a list of valid tunables. This file will be updated as necessary with each version of DFDL
Review Instructions including Screenshots
[Add review instructions including screenshots or GIFs to help explain the change visually.]
Confirmation Testing
Add a invalid tunable to the launch.json manually
Open the wizard and scroll to where tunables are listed. You should see a invalid warning.
Try to save. This should fail
Edit the tunable to be valid. Save should now work
The launch json should be updated to the valid tunable.
Add a invalid tunable to launch.json manually
Try to run dfdl extension. You should fail with two options
Ignore valid tunable should allow you to proceed with running. Cancel should fail
Regression Testing
[OPTIONAL: Describe any regression testing performed to ensure existing functionality was not broken.
List relevant test suites, manual checks, or validation steps.]