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

[GKE] Enable Log dumping #59

Merged
merged 2 commits into from
Sep 23, 2020
Merged

Conversation

amwat
Copy link
Contributor

@amwat amwat commented Sep 22, 2020

Move repo-root to top-level since it's also required by dumplogs.
Add automatic log dumping on cluster create.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 22, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amwat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 22, 2020
@amwat
Copy link
Contributor Author

amwat commented Sep 23, 2020

@@ -38,6 +38,16 @@ func (d *deployer) Up() error {
return err
}

defer func() {
if d.RepoRoot == "" {
klog.Warningf("repo-root not supplied, skip dumping cluster logs")
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel this should be Info since it's normal for non-k8s projects to skip dumping clusters logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Usually info comments are used for more verbose explanation of steps being carried out.
Whereas here we'll be missing a key part of the deployer lifecycle, feels like it should be a warning.

@@ -9,16 +9,12 @@ import (
type BuildOptions struct {
Strategy string `flag:"~strategy" desc:"Determines the build strategy to use either make or bazel."`
StageLocation string `flag:"~stage" desc:"Upload binaries to gs://bucket/ci/job-suffix if set"`
RepoRoot string `flag:"~repo-root" desc:"Path to root of the kubernetes repo. Used with --build."`

RepoRoot string `flag:"-"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain how - works here? Is this change related to the other RepoRoot field added in the deployer struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, - means this field will not be exposed as a flag: https://github.com/octago/sflags#options-for-flag-tag
now that the top level field is exposed.

@chizhg
Copy link
Contributor

chizhg commented Sep 23, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 23, 2020
@k8s-ci-robot k8s-ci-robot merged commit e0ffa6a into kubernetes-sigs:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants