-
Notifications
You must be signed in to change notification settings - Fork 72
feat: add cvat migration template #286
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
Conversation
- Per testing, a migration error does not happen with an Azure deployment.
cd6cec2 to
56856ca
Compare
| } | ||
|
|
||
| for _, namespace := range namespaces { | ||
| if err := client.DeleteWorkspace(namespace.Name, cvatTemplateName); err != nil { |
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.
@aleksandrmelnikov @Vafilor is this supposed to be client.ArchiveWorkspaceTemplate? If so, the JupyterLab one needs to be fixed too.
Also note the changes I made in the this PR: 7b570f8
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.
Two thoughts:
- If we want to support running the "down" migration after they make DB / K8S changes (or they've done some work), then yes. I think we need to make this change.
- If they do this immediately on creation, then this is fine.
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.
Pushed up a possible change.
- This will add the goose command with the ".go" migration files. This is needed to run goose down commands. goose.go is needed to generate an executable.
- If extra errors, add them as text.
- The passed in name was not converted to the UID format, so the code could never find the relevant data.
- This is if there are no workspaces in the database.
- This code was re-arranged to focus on archiving the k8s components first, then the database. - Also, workspace components are archived first, because they rely on the workflow templates being present. If workflow template is archived first, then the clean-up can't resume to run again if some error is thrown. This arrangement will ensure that if an error occurs during clean-up, it can be re-run without throwing an error of missing prerequisite data. - Removed an early return statement, which prevented the rest of the clean-up - Added extra code to not return an error if no workflow templates are found in the database. This is to ensure k8s cleanup can continue.
- Fixed various error message responses - Added code to grab the WorkspaceTemplate versions Then, code will run through these versions and grab workspaces that use that version. Then, code will try to Archive those workspaces (delete k8s resources, archive database entries). Finally, code cleans up the related WorkflowTemplate. - Updated method docs
- Migrations should not go on if there is an error
|
@aleksandrmelnikov I keep getting this error when I try this in an existing cluster. I've used multiple names to make sure there is no conflict. |
What type of PR is this?
/kind enhancement
What this PR does:
This PR adds CVAT as a workspace template to the template builder.
This also includes fixes to the JupyterLab migraiton
Which issue(s) this PR fixes:
closes #317
Special notes for your reviewer:
Make sure you carry out the steps here first:
If you want to test on your cluster directly
make dockerto push the image to docker./goose statusto verify that cvat migration is executedNote: If you're seeing crash loops, check the onepanel-core logs. The jupyter and cvat migrations throw a fatal log if an error is encountered while executing.
Assuming the initial migration up ran without errors:
goose downinside the pod.If you are developing locally, off of code
npm install,ng serveAssuming the initial migration up ran without errors:
cmd/goose.go, run./goose down./goose up, creating more cvat, then./goose down