Skip to content

chore(migration): migration generic store sample implementation [WIP DO_NOT_MERGE]#7387

Closed
dashrews78 wants to merge 14 commits intodashrews/migration-generic-storefrom
dashrews/migration-generic-store-test-implementation
Closed

chore(migration): migration generic store sample implementation [WIP DO_NOT_MERGE]#7387
dashrews78 wants to merge 14 commits intodashrews/migration-generic-storefrom
dashrews/migration-generic-store-test-implementation

Conversation

@dashrews78
Copy link
Contributor

@dashrews78 dashrews78 commented Aug 10, 2023

Description

An example of what a migration may look like if we had a generic store. I created a generic migration store in #7382. This is a sample of what #7371 would look like with the generic store vs using Gorm.

I copied the policies stores for simplicity and quickness, but in reality we simply need to create an object that implements the insert and/or copy methods. All the delete, walks, etc are handled by the generic store. In my estimation that eliminates the need to do the before and after stores like we used to. The get in the generic will retrieve the proto and since those must be backwards compatible, we should only need to worry about writing the data to the new table structure.

Checklist

  • Investigated and inspected CI test results
  • Unit test and regression tests added
  • Evaluated and added CHANGELOG entry if required
  • Determined and documented upgrade steps
  • Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.

Testing Performed

TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why
you did not do so. Valid reasons include, for example, "CI is sufficient",
"No testable changes". Feel free to attach JSON snippets, curl commands,
screenshots.

In addition to reviewing your code, reviewers must also review your testing
instructions and make sure they are sufficient.

@openshift-ci
Copy link

openshift-ci bot commented Aug 10, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ghost
Copy link

ghost commented Aug 10, 2023

Images are ready for the commit at cb1cd68.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.1.x-758-gcb1cd68a2f.

@dashrews78 dashrews78 changed the base branch from master to dashrews/migration-generic-store August 11, 2023 10:06
@dashrews78 dashrews78 changed the base branch from dashrews/migration-generic-store to master August 11, 2023 10:07
@dashrews78 dashrews78 force-pushed the dashrews/migration-generic-store-test-implementation branch from d715a3d to 17c6115 Compare August 14, 2023 18:07
@dashrews78 dashrews78 changed the base branch from master to dashrews/migration-generic-store August 15, 2023 18:36
@dashrews78 dashrews78 force-pushed the dashrews/migration-generic-store branch from 93a3093 to afd4fd9 Compare August 17, 2023 17:14
@dashrews78 dashrews78 closed this Dec 20, 2023
@dashrews78 dashrews78 deleted the dashrews/migration-generic-store-test-implementation branch September 10, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant