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

Tests for tenant restore progress; definition of API types; Fix lints #68

Merged
merged 9 commits into from
Sep 21, 2023

Conversation

powerfooI
Copy link
Collaborator

@powerfooI powerfooI commented Sep 20, 2023

Summary

  • Add test cases for tenant restore and make them pass

  • Create API type OBTenantOperation for tenants tiny jobs

  • Complete API type definitions according to design draft

  • Update .golangci.yaml, disable unused and gosimple linters and exported, struct-tag, var-naming, comment-spacings and unused-receiver 5 rules of revive linter.

  • Fix other lint errors

  • Install golangci-lint with Makefile target

//+kubebuilder:default=PRIMARY
TenantRole constants.TenantRole `json:"tenantRole,omitempty"`
Source *TenantSourceSpec `json:"source,omitempty"`
Credentials []corev1.SecretReference `json:"credentials,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to specify certain users when create tenant

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's ok to store users' information in credentials.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok, but certain users must be specified, like root and standbyro

Copy link
Collaborator Author

@powerfooI powerfooI Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users' credentials in tenant will be implemented on next step. Some designs are not clear now, maybe user management will be put in OBTenantOperation CR.

I decide to focus on tenant restore first :)

api/v1alpha1/obtenant_types.go Outdated Show resolved Hide resolved
api/v1alpha1/obtenant_types.go Outdated Show resolved Hide resolved

type OBTenantOpChangePwdSpec struct {
Tenant string `json:"tenant"`
SecretRef corev1.SecretReference `json:"secretRef"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will be stored in secret, username and password?

Copy link
Collaborator Author

@powerfooI powerfooI Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Username and password will be here, it's possible to contain other information. Designs for tenant credentials are in pending, now they are just placeholders here hahah.

api/v1alpha1/obtenantrestore_types.go Outdated Show resolved Hide resolved
api/v1alpha1/obtenantrestore_types.go Outdated Show resolved Hide resolved
cmd/main.go Outdated Show resolved Hide resolved
@powerfooI powerfooI changed the title Tests for tenant restore progress; definition of API types Tests for tenant restore progress; definition of API types; Fix lints Sep 21, 2023
@powerfooI powerfooI linked an issue Sep 21, 2023 that may be closed by this pull request
2 tasks
Copy link
Member

@chris-sun-star chris-sun-star left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chris-sun-star chris-sun-star merged commit 0624ec5 into oceanbase:2.0.x_dev Sep 21, 2023
2 checks passed
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.

[Feat.]: implement backup and restore management
2 participants