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

Migration Integrity #234

Open
jkeon opened this issue Apr 30, 2023 · 2 comments
Open

Migration Integrity #234

jkeon opened this issue Apr 30, 2023 · 2 comments

Comments

@jkeon
Copy link
Member

jkeon commented Apr 30, 2023

Building off of #232

  • Integrity.
    • As we talked about, we should be able to build a lookup of all Entity references before the Migration occurs. After the Migration, we can run through that lookup and see if anything of our references were broken.
    • Either A) We referred to something that left us behind.
    • Or B) We referred to something that we left behind.
    • We can then alert the developer who didn't clean up before the migration.
@jkeon jkeon mentioned this issue Apr 30, 2023
2 tasks
@mbaker3
Copy link
Member

mbaker3 commented May 1, 2023

If you have a sec to quickly jot down a high level potential approach that will help get this done when we pick this up some day way down the road.

@jkeon
Copy link
Member Author

jkeon commented May 1, 2023

Sure!

Most likely as part of the reflection pass at the beginning with the other migration functionality we'll scan the types and nested types and nested collections to find where any Entity references could be hiding and we'll build a map of that.

Then before actually migrating, we'll run a job to collect the TaskDriver data and EntityPersistentData that has Entity references and we'll store what we were referencing.

If we were referencing Entity.Null, that's all good, just means the slot was empty.
If we were referencing a real Entity, then we'll want to check to make sure that:
- A) If we moved, who we were referencing moved too and is now a valid entity in the new world.
- B) If our referenced entity moved and we didn't, that's a problem.

We actually do the move, and then we collect everything that stayed in the old world and find any breaks and we collect everything in the new world and find any breaks there.

High level architecture should look like a pre and post job on either side of the actual move. One to build the current state, and then the post to check it.

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

No branches or pull requests

2 participants