Repository navigation
[migrate] Restore standard Draft-07 SDK validation - #10603
Draft
mahakjain314 wants to merge 1 commit into
Draft
mahakjain314 wants to merge 1 commit into
mahakjain314 wants to merge 1 commit into
Conversation
Restore the pinned JSON Schema SDK approach from 28846b7 on latest main. Replace custom conditional matching and export transformations with strict Draft-07 validation, preserve independent workload contexts and draft saving, and restore reproducible offline bundling and focused tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d53ebcbc-f948-464f-8d13-d12fbed0619f
Contributor
|
Thank you for your contribution mahakjain314! We will review the pull request and get back to you soon. |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Hi mahakjain314, |
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.
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az migrate runbook parameter configureaz migrate runbook execution parameter configureSummary
Restore the standard JSON Schema SDK approach from commit
28846b7f53b187d8f6ec4c7419923ddb3686cd03in #10487 as a separate draft comparison PR, based on latestmain(d87a4bb1d1fff6fd3a4e38d8593fd6c601d1db5cat implementation time).The current editor implements only a custom subset of conditional rules. This draft replaces that matcher with the original pinned
@cfworker/json-schema4.1.1 SDK, bundled into each generated HTML file with its MIT license and Draft-07 meta-schema. No CDN, runtime npm requirement, network access, or dynamic code generation is needed.The SDK handles Draft-07 conditions and assertions, including
if/then/else, nestedallOf/anyOf/oneOf/not, dependencies, array assertions, boolean schemas, and local references. Schemas are meta-validated; malformed schemas, other dialects, unresolved references, and the pinned SDK's unsupported$refwith sibling$idcombination fail visibly.Intentional behavior differences from main
This restores the referenced SDK implementation's strict semantics, not the later custom-rule behavior:
properties: { "field": false }rejects a present property, including a null value; it does not mean hide the control or replace its value with null.requiredchecks property presence. Schemas must also use constraints such astype,minLength, orminItemsif null/empty values should fail.Legacy descriptor validation and partial-update command preparation remain when no Draft-07 validation failures exist. Schema failures block upload-command preparation, while invalid work can still be saved as a draft.
The newer local-execution support on main is preserved. No release version, changelog, or extension-index change is included in this draft; the package version remains
3.0.0b7.Implementation and regressions
Validation
src\migrate..\..\env\Scripts\python.exe -m pytest .\azext_migrate\tests\latest\runbook\test_runbook_unit.py -qsrc\migrate..\..\env\Scripts\python.exe .\scripts\runbook_coverage.pypython -m azdev style migratepython -m azdev linter migratesrc\migrate\scripts\schema-validatornpm cifollowed bynpm run buildgitblob SHA95fe082fd4b21444a441b1cbeb6a53e0073e6f54).git --no-pager diff --checkCoverage:
The modified Python renderer is 98% covered (47 statements, 1 missed); no coverage drop in modified code.
Additional verification:
setup.py build ... bdist_wheel ...completed successfully without changing the release version. The built wheel's renderer, HTML template, SDK JavaScript, and license were verified byte-for-byte against source.unsafe-evalor external script resource was added.python scripts/ci/test_index.py -qwas not run; this draft does not changesrc/index.jsonor release metadata.General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
Not applicable: this modifies the existing migrate extension.
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.Engineering review
$ref/sibling-$idlimitation fail visibly rather than silently falling back. No unverified implementation behavior is claimed.