Skip to content

Add build time launch file schema constraints from allowed tunable properties#1735

Draft
adedoyinNteligen wants to merge 4 commits into
apache:mainfrom
ctc-oss:Add-build-time-launch-file-schema-constraints-from-allowed-tunable-properties
Draft

Add build time launch file schema constraints from allowed tunable properties#1735
adedoyinNteligen wants to merge 4 commits into
apache:mainfrom
ctc-oss:Add-build-time-launch-file-schema-constraints-from-allowed-tunable-properties

Conversation

@adedoyinNteligen

@adedoyinNteligen adedoyinNteligen commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #455

Description

[Please include a summary of the change and which issue is fixed. Also include relevant context or motivation.]

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

  1. 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

  2. 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

  • [] I have determined that no documentation updates are needed for these changes
  • I have added the following documentation for these changes

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

  1. Add a invalid tunable to the launch.json manually

  2. Open the wizard and scroll to where tunables are listed. You should see a invalid warning.

  3. Try to save. This should fail

  4. Edit the tunable to be valid. Save should now work

  5. The launch json should be updated to the valid tunable.

  6. Add a invalid tunable to launch.json manually

  7. Try to run dfdl extension. You should fail with two options

  8. 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.]

@adedoyinNteligen

Copy link
Copy Markdown
Collaborator Author

Add screenshots
Create enhancement ticket
Add docs on tunables.json to wiki

@adedoyinNteligen adedoyinNteligen marked this pull request as draft June 26, 2026 01:53
@hdalsania hdalsania moved this to In Review in daffodil-vscode v1.6.0 Jun 27, 2026
@hdalsania hdalsania added this to the 1.6.0 milestone Jun 27, 2026
@hdalsania hdalsania moved this from In Review to In Progress in daffodil-vscode v1.6.0 Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Add build-time launch file schema constraints from allowed tunable properties

2 participants