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

CI: Running on TiDB Operator Nodes. #1653

Merged
merged 5 commits into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions ci/pingcap_tidb_operator_build_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,20 @@ spec:
emptyDir: {}
- name: docker-graph
emptyDir: {}
tolerations:
- effect: NoSchedule
key: tidb-operator
operator: Exists
affinity:
# worker nodes only
# running on nodes for tidb-operator only
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: DoesNotExist
- key: ci.pingcap.com
operator: In
values:
- tidb-operator
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down Expand Up @@ -161,6 +167,8 @@ def call(BUILD_BRANCH, CREDENTIALS_ID, CODECOV_CREDENTIALS_ID) {
container("golang") {
def WORKSPACE = pwd()
dir("${PROJECT_DIR}") {
deleteDir()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we reuse build_go1130_memvolume nodes to build, previous files of other jobs must be deleted first

failure logs on this PR: https://internal.pingcap.net/idc-jenkins/blue/organizations/jenkins/operator_ghpr_e2e_test_kind/detail/operator_ghpr_e2e_test_kind/2667/pipeline/39

2020-02-07T08:38:48.004Z] go vet check

[2020-02-07T08:38:49.901Z] # github.com/pingcap/tidb-operator/pkg/client/listers/pingcap/v1alpha1

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:28:41: undefined: v1alpha1.TidbClusterAutoScaler

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:31:2: undefined: TidbClusterAutoScalerListerExpansion

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:45:78: undefined: v1alpha1.TidbClusterAutoScaler

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:60:41: undefined: v1alpha1.TidbClusterAutoScaler

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:62:21: undefined: v1alpha1.TidbClusterAutoScaler

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:63:2: undefined: TidbClusterAutoScalerNamespaceListerExpansion

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:74:86: undefined: v1alpha1.TidbClusterAutoScaler

[2020-02-07T08:38:49.901Z] pkg/client/listers/pingcap/v1alpha1/tidbclusterautoscaler.go:82:66: undefined: v1alpha1.TidbClusterAutoScaler


stage('Checkout') {
checkout changelog: false,
poll: false,
Expand Down
2 changes: 1 addition & 1 deletion hack/check-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ source $ROOT/hack/lib.sh

hack::ensure_terraform

terraform_modules=$(find ${ROOT}/deploy -not -path '*/\.*' -type f -name variables.tf | xargs -I{} -n1 dirname {})
terraform_modules=$(find ${ROOT}/deploy -mindepth 1 -maxdepth 1 -type d -a -not -name 'modules')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

modules in deploy/modules are referenced by aliyun/gcp/aws, no need to check

Copy link
Contributor Author

Choose a reason for hiding this comment

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


for module in $terraform_modules; do
echo "Checking module ${module}"
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/tidbcluster/tidbcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,10 @@ var _ = ginkgo.Describe("[tidb-operator] TiDBCluster", func() {
f := func(name, namespace string, uid types.UID) (bool, error) {
pod, err := c.CoreV1().Pods(namespace).Get(name, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
// ignore not found error (pod is deleted and recreated again in restarting)
return false, nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixes #1539

return false, err
}
if _, existed := pod.Annotations[label.AnnPodDeferDeleting]; existed {
Expand Down