-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[WIP]feat(backend): add Make & scripts for automated dev DB deployment #12056
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
base: master
Are you sure you want to change the base?
Conversation
This commit migrates the entire ORM layer of the Kubeflow Pipelines backend from github.com/jinzhu/gorm (v1) to gorm.io/gorm (v2). It covers all core model definitions under backend/src/apiserver/, as well as full migration of the Execution Cache system under backend/src/cache/. Key changes: - Updated struct tags to GORM v2 conventions (e.g., primaryKey, type, uniqueIndex). - GORM size tags are replaced with type tag to be more semantic. - The indexed columns are explicitly limited in length in order to be indexable in MySQL. - Replaced deprecated AddForeignKey() with `constraint` tags - Dropped AddIndex() and AddUniqueIndex() in favor of declarative tags - Migrated DropIndex, ModifyColumn via GORM v2 Migrator interface - Introduced helper for composite unique constraints Other fixes: - Replaced sql.NullInt64 with int64 to match NOT NULL tag schema - Removed deprecated NewRecord() check; replaced with Create().Scan() Co-authored-by: Humair Khan <[email protected]> Signed-off-by: kaikaila <[email protected]>
Signed-off-by: kaikaila <[email protected]>
Signed-off-by: kaikaila <[email protected]>
This commit migrates the entire ORM layer of the Kubeflow Pipelines backend from github.com/jinzhu/gorm (v1) to gorm.io/gorm (v2). It covers all core model definitions under backend/src/apiserver/, as well as full migration of the Execution Cache system under backend/src/cache/. Key changes: - Updated struct tags to GORM v2 conventions (e.g., primaryKey, type, uniqueIndex) - Replaced deprecated AddForeignKey() with `constraint` tags - Dropped AddIndex() and AddUniqueIndex() in favor of declarative tags - Migrated DropIndex, ModifyColumn via GORM v2 Migrator interface - Introduced helper for composite unique constraints Other fixes: - Replaced sql.NullInt64 with int64 to match NOT NULL tag schema - Removed deprecated NewRecord() check; replaced with Create().Scan() This sets the foundation for schema portability, cross-DB testing, and future PostgreSQL support. Signed-off-by: kaikaila <[email protected]>
Co-authored-by: Humair Khan <[email protected]> Signed-off-by: Yunkai Li <[email protected]>
Signed-off-by: kaikaila <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @kaikaila. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
🚫 This command cannot be processed. Only organization members or owners can use the commands. |
Overview
This PR adds Makefile targets and helper scripts to provision and tear down development databases (PostgreSQL or MySQL) via Helm, streamlining both local development and CI testing.
Key Changes
Scripts
backend/scripts/start-dev-db.shDB_TYPE(default: postgres).DB_NAMESPACE(default:<DB_TYPE>-test) to isolate resources.app.kubernetes.io/instance=<release>to become ready.backend/scripts/stop-dev-db.shMakefile Targets
Helm Chart Metadata
• Added backend/helm-charts/postgresql/Chart.yaml with apiVersion, name, and version.
• Retained values.yaml for custom PostgreSQL settings.
Documentation
• Updated backend/README.md with a Local Database Deployment section.
• Usage details are covered there—please refer to the README.
Next Steps