Template upgrade properties - #3
Open
JC-wk wants to merge 112 commits into
Open
Conversation
This commit aligns the resource upgrade process with the update process by correctly handling conditional properties in the JSON schema. - The schema generation logic in `ConfirmUpgradeResource.tsx` is updated to include conditional blocks (`if`/`then`/`else`) when the condition is based on an existing property. - New read-only properties are now submitted during the upgrade process.
This commit aligns the resource upgrade process with the update process by correctly handling conditional properties in the JSON schema. - The schema generation logic in `ConfirmUpgradeResource.tsx` is updated to include conditional blocks (`if`/`then`/`else`) when the condition is based on an existing property. - New read-only properties are now submitted during the upgrade process. - The `liveOmit` prop is added to the form to prevent the submission of unevaluated properties from conditionally hidden fields.
…1346005040390942732 Fix Upgrade Conditional Properties
Unit Test Results668 tests 668 ✅ 7s ⏱️ Results for commit 2ec1049. ♻️ This comment has been updated with latest results. |
fix: allow upgrades on hidden properties
…property visibility
added 30 commits
July 31, 2026 17:34
…src/utils/schemaUpgradeUtils.ts
• Issue: schemaUpgradeUtils.ts was evaluating conditional allOf schema rules using only newPropertyValues. If a conditional
requirement depended on existing resource properties already on the resource, the condition would evaluate to false and allow
upgrading without requiring the newly required field.
• Fix: Added schemaUpgradeUtils.ts to deeply merge props.resource.properties with newPropertyValues. Updated the Upgrade button's
ConfirmUpgradeResource.tsx check in ConfirmUpgradeResource.tsx to pass this combined state into isPropertyRequiredInState.
• Test: Added unit test in ConfirmUpgradeResource.test.tsx to verify that conditional required rules based on existing resource
properties properly disable the Upgrade button until filled.
2. api_app/db/repositories/resources.py
• Issue: resources.py returned the original resource_template object even when templateVersion was patched and new_template was
fetched and validated, causing downstream callers to receive a stale template object.
• Fix: Updated line 212 of resources.py to return new_template if new_template is not None else resource_template.
• Test: Updated test_resource_repository.py to assert that patch_resource returns new_template on upgrade.
…between unexpected and non-updateable fields
…or resource upgrade
…or resource patch properties
…validate current properties against target template
…rties during template upgrades
…ames and enhance validation in tests
…rties during upgrades
…ty in resource patch
…upgrade components
…er ancestors and apply default values in ConfirmUpgradeResource
…d allow unevaluated properties in final schema
…improve user messaging
…ionality with array property handling
…ested properties and improve validation during upgrades
…and schema validation during upgrades
…ay item properties during upgrades
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.
Resolves HASH_SIGN_FOLLOWED_BY_ISSUE_NUMBER
What is being addressed
Describe the current behavior you are modifying. Please also remember to update any impacted documentation.
How is this addressed