-
Notifications
You must be signed in to change notification settings - Fork 228
WIP - Major change to dynamic schema fails schema import #8164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
RohitPtnkr1996
wants to merge
13
commits into
master
Choose a base branch
from
rohitptnkr/major-schema-upgrade-investigation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
40983c5
Added tests
RohitPtnkr1996 ec15f2d
Added changelog
RohitPtnkr1996 f117033
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 b92a25e
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 9124086
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 922e5ed
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 0b25645
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 25c46c3
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 1d5e1ca
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 5bea24c
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 29a1fa6
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 16d01b5
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 7c5c291
Merge branch 'master' into rohitptnkr/major-schema-upgrade-investigation
RohitPtnkr1996 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...s/@itwin/core-backend/rohitptnkr-major-schema-upgrade-investigation_2025-05-30-09-25.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@itwin/core-backend", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@itwin/core-backend" | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though this did not work as well. But my understanding is that dynamic schema does not require major version on schema to change to make major version change. That why we have flag
AllowMajorSchemaUpgradeForDynamicSchemas
other wise why we have this flag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note another case is that the stored schema that got upgraded was of ECXML 2.0
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I exported and then imported it again with delete properties. I did follow two both failed where i got error that schema upgrade failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if this helps you reproduce it. I have a dataset and schema on disk so maybe you can use that to reproduce it.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite.
We have a blanket ban on all major version changes with the DisallowMajorSchemaUpgrade flag in iModelPlatform.
We relaxed this only for dynamic schemas.
The flag "AllowMajorSchemaUpgradeForDynamicSchemas" (defaults to true) was just to have some added control over dynamic schema major upgrades to disable/re-enable it in the future.
However, the general rules of major version change like incrementing read version are still in effect for all dynamic and non-dynamic schemas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the change to allow dynamic schemas to make major changes without requiring a read version increment.
Native PR: iTwin/imodel-native#1144