Adding Boskos / Mason configuration and tools#690
Adding Boskos / Mason configuration and tools#690sebastienvas merged 20 commits intoistio:masterfrom
Conversation
|
/retest |
chxchx
left a comment
There was a problem hiding this comment.
Now I see why checking in vendor might be a bad idea
boskos/cmd/mason_client/main.go
Outdated
| c1, acquireCancel := context.WithTimeout(context.Background(), timeout) | ||
| c2, updateCancel := context.WithCancel(context.Background()) | ||
| defer acquireCancel() | ||
| defer updateCancel() |
There was a problem hiding this comment.
I think stacked defers are executed in LIFO order so I think it makes more sense to move defer updateCancel() after error checking on acquire().
| }, | ||
| }, | ||
| }, | ||
| ServiceAccounts: []*compute.ServiceAccount{ |
There was a problem hiding this comment.
I thought you need something like
ServiceAccounts: []*compute.ServiceAccount{
&compute.ServiceAccount{
Email: "default",
Scopes: config.Scopes,
},
},
so we know the element we put in the slice is a pointer?
There was a problem hiding this comment.
gometalinter will complain if you do that.
boskos/gcp/gcloud.go
Outdated
| "github.com/sirupsen/logrus" | ||
| ) | ||
|
|
||
| func runCommand(name string, args ...string) error { |
There was a problem hiding this comment.
Why not use the existing Shell() utility we have in test-infra?
If you insist, perhaps make this a util as well?
boskos/gcp/gke.go
Outdated
| return err | ||
| } | ||
| switch newOp.Status { | ||
| case "DONE": |
There was a problem hiding this comment.
Are these string standardized? Maybe define they as enum instead of hardcoding?
There was a problem hiding this comment.
are there no other values? default?
boskos/gcp/test-configs.yaml
Outdated
| - http-server | ||
| - https-server | ||
| scopes: | ||
| - https://www.googleapis.com/auth/cloud-platform No newline at end of file |
There was a problem hiding this comment.
pro tip: config your editor to always add new line at the end
scripts/set-boskos-project.sh
Outdated
| # Print commands | ||
| set -x | ||
|
|
||
| USERS=() |
There was a problem hiding this comment.
just curious, how is this different from
USERS=(
'serviceAccount:boskos@istio-testing.iam.gserviceaccount.com'
'serviceAccount:istio-prow-test-job@istio-testing.iam.gserviceaccount.com'
'group:mdb.istio-testing@google.com'
)
scripts/update-e2e-cluster.sh
Outdated
| CLUSTER_NAME="${REPO}-e2e-rbac-rotation-${i}" | ||
| result=$(gcloud container clusters create ${CLUSTER_NAME} --zone ${ZONE} --project ${PROJECT_NAME} --cluster-version ${CLUSTER_VERSION} \ | ||
| --machine-type ${MACHINE_TYPE} --num-nodes ${NUM_NODES} --no-enable-legacy-authorization --enable-kubernetes-alpha --quiet \ | ||
| // Passing KUBECONFIG as an env will override default ~/.kube/config |
There was a problem hiding this comment.
Is this meant to be a comment? Start with # instead?
Using scripts/update_deps.sh
boskos/cmd/mason/main.go
Outdated
| @@ -0,0 +1,62 @@ | |||
| // Copyright 2017 Istio Authors | |||
There was a problem hiding this comment.
change 2017 to 2018 here and elsewhere for new files.
boskos/cmd/mason_client/main.go
Outdated
| @@ -0,0 +1,191 @@ | |||
| // Copyright 2017 Istio Authors | |||
boskos/gcp/gke.go
Outdated
| return err | ||
| } | ||
| switch newOp.Status { | ||
| case "DONE": |
There was a problem hiding this comment.
are there no other values? default?
boskos/README.md
Outdated
|
|
||
| Boskos runs on a kubernetes cluster. Initially only Prow jobs will be using | ||
| Boskos. Since Boskos service is only available intra cluster, it is important | ||
| that Boskos runs in the same cluster were test jobs are running. |
There was a problem hiding this comment.
where test jobs are running.
boskos/README.md
Outdated
| ## Mason | ||
|
|
||
| Mason is used for resources that have resources dependency. Mason resource are | ||
| virtual, they only exist inside other resources. An example is a mason resource |
There was a problem hiding this comment.
An example of a mason resource
| case operationDone: | ||
| return nil | ||
| case "ABORTING": | ||
| case operationAborting: |
There was a problem hiding this comment.
any other operations status that we need to care about? do we need default?
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rkpagadala The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/lgtm cancel //PR changed after LGTM, removing LGTM. @rkpagadala @sebastienvas |

In order to review, please look at the commits as the vendor update hides all the changes.