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

stability: add scale & upgrade case functions #309

Merged
merged 5 commits into from
Mar 18, 2019

Conversation

zyguan
Copy link
Contributor

@zyguan zyguan commented Mar 12, 2019

I just implement two case functions for OperationActions, PTAL.

@CLAassistant
Copy link

CLAassistant commented Mar 12, 2019

CLA assistant check
All committers have signed the CLA.

tests/actions.go Outdated Show resolved Hide resolved
return nil
}

func (oa *operatorActions) UpgradeTidbCluster(info *TidbClusterInfo) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

change to UpgradeTidbClusterTo(info *TidbClusterInfo,version string)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But how to upgrade only one component (eg. just upgrade tidb) ?

@weekface
Copy link
Contributor

Add it the the main func to ensure it works as expected.

return "/charts/" + tag + "/" + name
}

func (oa *operatorActions) ScaleTidbCluster(info *TidbClusterInfo) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

change to ScaleTidbClusterTo(info *TidbClusterInfo,pdReplicas int,tikvReplicas int,tidbReplicas int) is more reasonable

@xiaojingchen
Copy link
Contributor

xiaojingchen commented Mar 13, 2019

each test case consists of two parts, triggering the event first, and then checking for success.the scale and upgrade method have not contained checking logic.

@tennix tennix added the test/stability stability tests label Mar 13, 2019
@zyguan
Copy link
Contributor Author

zyguan commented Mar 13, 2019

Add it the the main func to ensure it works as expected.

I'm working on it, however check for an upgrade often timeout.

each test case consists of two parts, triggering the event first, and then checking for success.the scale and upgrade method have not contained checking logic.

I thought CheckTidbClusterStatus is an all-in-one check method, should we add checks to OperatorActions for each operation ? @weekface

perror(oa.DeployTidbCluster(clusterInfo))
perror(oa.CheckTidbClusterStatus(clusterInfo))

clusterInfo = clusterInfo.ScaleTiDB(3)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should scale in and scale out all the components: pd, tikv and tidb.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you can do this in another PR.

@weekface
Copy link
Contributor

weekface commented Mar 14, 2019

@zyguan For scale and upgrade, there are many other checks that need to do other than the basic checks, for details you can see here and here and here.

But for the first commit, i think this PR is ok to merging.

Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

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

LGTM

@zyguan
Copy link
Contributor Author

zyguan commented Mar 14, 2019

@zyguan For scale and upgrade, there are many other checks that need to do other than the basic checks, for details you can see here and here and here.

But for the first commit, i think this PR is ok to merging.

I'm already working on it, also, I'm trying to port ddl test as a workload. I'll commit these works in the next few PRs.

@weekface
Copy link
Contributor

Great!

Copy link
Contributor

@xiaojingchen xiaojingchen left a comment

Choose a reason for hiding this comment

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

LGTM

@weekface weekface merged commit da93efd into pingcap:stability Mar 18, 2019
weekface pushed a commit to weekface/tidb-operator that referenced this pull request Mar 21, 2019
tennix pushed a commit that referenced this pull request Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/stability stability tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants