Skip to content

Adding Boskos / Mason configuration and tools#690

Merged
sebastienvas merged 20 commits intoistio:masterfrom
sebastienvas:boskos
Feb 27, 2018
Merged

Adding Boskos / Mason configuration and tools#690
sebastienvas merged 20 commits intoistio:masterfrom
sebastienvas:boskos

Conversation

@sebastienvas
Copy link
Copy Markdown
Contributor

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

@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Feb 14, 2018
@ldemailly
Copy link
Copy Markdown
Member

ldemailly commented Feb 15, 2018

screen shot 2018-02-14 at 11 50 16 pm

👍

too bad the repo history will carry those forever ;-)

@sebastienvas
Copy link
Copy Markdown
Contributor Author

/retest

Copy link
Copy Markdown
Contributor

@chxchx chxchx left a comment

Choose a reason for hiding this comment

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

Now I see why checking in vendor might be a bad idea

c1, acquireCancel := context.WithTimeout(context.Background(), timeout)
c2, updateCancel := context.WithCancel(context.Background())
defer acquireCancel()
defer updateCancel()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

},
},
},
ServiceAccounts: []*compute.ServiceAccount{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

@sebastienvas sebastienvas Feb 23, 2018

Choose a reason for hiding this comment

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

gometalinter will complain if you do that.

"github.com/sirupsen/logrus"
)

func runCommand(name string, args ...string) error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not use the existing Shell() utility we have in test-infra?
If you insist, perhaps make this a util as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

return err
}
switch newOp.Status {
case "DONE":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are these string standardized? Maybe define they as enum instead of hardcoding?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are there no other values? default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added logging

- http-server
- https-server
scopes:
- https://www.googleapis.com/auth/cloud-platform No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pro tip: config your editor to always add new line at the end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

# Print commands
set -x

USERS=()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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'
)

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this meant to be a comment? Start with # instead?

@@ -0,0 +1,62 @@
// Copyright 2017 Istio Authors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

change 2017 to 2018 here and elsewhere for new files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,191 @@
// Copyright 2017 Istio Authors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

return err
}
switch newOp.Status {
case "DONE":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

where test jobs are running.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

An example of a mason resource

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

case operationDone:
return nil
case "ABORTING":
case operationAborting:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

any other operations status that we need to care about? do we need default?

Copy link
Copy Markdown
Contributor Author

@sebastienvas sebastienvas left a comment

Choose a reason for hiding this comment

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

PTAL

@rkpagadala
Copy link
Copy Markdown
Contributor

/lgtm
assuming you will fix the failure in the tests

@istio-merge-robot
Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@istio-merge-robot
Copy link
Copy Markdown

/lgtm cancel //PR changed after LGTM, removing LGTM. @rkpagadala @sebastienvas

@sebastienvas sebastienvas merged commit 100ca90 into istio:master Feb 27, 2018
@sebastienvas sebastienvas deleted the boskos branch February 27, 2018 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants