Skip to content
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

Support running the old transformer in timelinetestutil #145

Draft
wants to merge 234 commits into
base: main
Choose a base branch
from

Conversation

nick4598
Copy link
Collaborator

Also includes a test that I was working on with regards to old versioning behavior. Not sure its actually useful but I added it as a separate commit so we can easily revert it.

MichaelBelousov and others added 27 commits September 13, 2023 11:04
#126)

Added methods that allow derived transformer classes to query
synchronization version and provenance Scope aspect.

- Federation guid branch is not backwards compatible when it comes to
supporting old branches. Exposing api to access scope aspect is
necessary so that derived classes can fake the synchronization version
themselves.
- Exporting TargetScopeProvenanceJsonProps for derived classes to make
sense of 'Scope' aspect's jsonProps.
- explicitly calling `initialize` will throw errors if scope provenance
is not initialized in change processing workflow. Exposed
`initScopeProvenance` to derived classes.
This change allows processing of changes where Element CodeValues have
been switched with one another
…ssing (#128)

While experimenting locally, I found out that
`IModelExporter.sourceDbChanges` is cleaned up before aspects are
processed. It doesn't brake existing strategies, but if another strategy
is added or package consumers add their own custom strategy it might
lead to bugs.
…ight after then syncing (#127)

findRangeContaining uses binary search, added tests for algo.ts, fix bug
where range is just a single point and we don't skip over it.
resolve todo: move to clonerelationship in imodelclonecontext
fixme: delete relationship and delete element right after. includes fix
to not throw if aspect is not found

---------

Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
…e multiple iModels and instead reuse the same one. (#129)

before:
compare imodels from BranchProvenanceInitializer and traditional branch
init
✔ branch provenance init with
relSourceHasFedGuid,relTargetHasFedGuid,createFedGuidsForMaster (1789ms)
✔ branch provenance init with relSourceHasFedGuid,relTargetHasFedGuid
(2519ms)
✔ branch provenance init with
relSourceHasFedGuid,createFedGuidsForMaster (1530ms)
    ✔ branch provenance init with relSourceHasFedGuid (2535ms)
✔ branch provenance init with
relTargetHasFedGuid,createFedGuidsForMaster (1598ms)
    ✔ branch provenance init with relTargetHasFedGuid (2498ms)
    ✔ branch provenance init with createFedGuidsForMaster (1559ms)
    ✔ branch provenance init with  (2598ms)
 
after:
compare imodels from BranchProvenanceInitializer and traditional branch
init
✔ branch provenance init with branchProvenance,createFedGuidsForMaster
(1238ms)
    ✔ branch provenance init with branchProvenance (165ms)
✔ branch provenance init with
classicTransformerProvenance,createFedGuidsForMaster (324ms)
    ✔ branch provenance init with classicTransformerProvenance (222ms)
✔ should have identityTransformation between branchProvenance and
classic transformer provenance when createFedGuidsForMaster is false
(1464ms)
    
There are less test cases, but within each test case all permutations of
sourceHasFedguid, targetHasFedGuid are still tested.

---------

Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
…changed (#135)

Keeping the PR as draft at the moment, because waiting on a change from
Affan to the changesetECAdaptor to not error out when there is no
ECClassId and instead fall back to the ecclassid of the root class.

The above scenario occurs when the element is no longer present in the
database (because it was deleted in some future changeset that isn't
currently being processed) so it can't be queried for its ecclassid.

EDIT: In 4.3.3 there is a different issue with classIdPresentInChange.
See below PR
iTwin/itwinjs-core#6341

---------

Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
… tests surrounding deleting relationships (#139)

I believe most/all of the non prettier changes are package.json,
pnpm-lock, eslint configs,
and some tests in imodeltransformerhub.test.ts:
1) it("should be able to handle relationship delete using new
relationship provenance method with no fedguids"
1) it("should be able to handle relationship delete using fedguids"
1) it("should be able to handle relationship delete using old
relationship provenance method with no fedguids"

---------

Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
…s as the condition before running detectElementDeletes/detectRelationshipDeletes (#141)
…ceDb (#140)

Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
Co-authored-by: Michael Belousov <mike.belousov@bentley.com>
Base automatically changed from federation-guid-optimization to main April 17, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants