Skip to content

Commit c5d0d67

Browse files
author
Andrew Suderman
authored
Bugfixes. Add update-cli command (#562)
1 parent d570393 commit c5d0d67

File tree

13 files changed

+130
-28
lines changed

13 files changed

+130
-28
lines changed

cmd/root.go

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"os"
2121

2222
"github.com/fatih/color"
23+
"github.com/mattn/go-colorable"
2324
"github.com/spf13/cobra"
2425
"github.com/spf13/pflag"
2526
"gopkg.in/yaml.v3"
@@ -87,10 +88,14 @@ func init() {
8788
getManifestsCmd,
8889
updateCmd,
8990
importCmd,
91+
updateReckonerCmd,
92+
versionCmd,
9093
)
9194

9295
klog.InitFlags(nil)
9396
pflag.CommandLine.AddGoFlag(flag.CommandLine.Lookup("v"))
97+
98+
color.Output = colorable.NewColorableStderr()
9499
}
95100

96101
var rootCmd = &cobra.Command{

cmd/update.go

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package cmd
2+
3+
import (
4+
"os"
5+
6+
"github.com/blang/semver"
7+
"github.com/gookit/color"
8+
"github.com/rhysd/go-github-selfupdate/selfupdate"
9+
"github.com/spf13/cobra"
10+
"k8s.io/klog/v2"
11+
)
12+
13+
var updateReckonerCmd = &cobra.Command{
14+
Use: "update-cli",
15+
Short: "Update reckoner.",
16+
Long: "Updates the reckoner binary to the latest tagged release.",
17+
Run: func(cmd *cobra.Command, args []string) {
18+
klog.V(4).Infof("current version: %s", version)
19+
v, err := semver.Parse(version)
20+
if err != nil {
21+
color.Red.Printf("Could not parse version: %s\n", err.Error())
22+
os.Exit(1)
23+
}
24+
color.Green.Printf("Checking for update. Current version: %s\n", version)
25+
26+
up, err := selfupdate.NewUpdater(selfupdate.Config{})
27+
if err != nil {
28+
color.Red.Println(err)
29+
os.Exit(1)
30+
}
31+
latest, err := up.UpdateSelf(v, "fairwindsops/reckoner")
32+
if err != nil {
33+
color.Red.Println("Update failed:", err)
34+
os.Exit(1)
35+
}
36+
if latest.Version.Equals(v) {
37+
color.Green.Println("Current binary is the latest version", version)
38+
} else {
39+
color.Green.Println("Successfully updated to version", latest.Version)
40+
color.Gray.Println("Release note:\n", latest.ReleaseNotes)
41+
}
42+
},
43+
}

cmd/version.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ var (
2525
)
2626

2727
func init() {
28-
rootCmd.AddCommand(versionCmd)
29-
rootCmd.PersistentFlags().BoolVar(&shortVersion, "short", false, "Display only the version. Useful for automation")
28+
versionCmd.PersistentFlags().BoolVar(&shortVersion, "short", false, "Display only the version. Useful for automation")
3029
}
3130

3231
var versionCmd = &cobra.Command{

end_to_end_testing/tests/07_good_hooks.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ testcases:
1111
reckoner plot -a {{.course}}
1212
assertions:
1313
- result.code ShouldEqual 0
14-
- result.systemout ShouldContainSubstring "Running release pre hook"
15-
- result.systemout ShouldContainSubstring "Running release post hook"
14+
- result.systemerr ShouldContainSubstring "Running release pre hook"
15+
- result.systemerr ShouldContainSubstring "Running release post hook"
1616
- script: |
1717
helm -n {{.namespace}} get all {{.release}}
1818
assertions:

end_to_end_testing/tests/10_git_charts.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ testcases:
1818
- result.systemout ShouldContainSubstring 'another-polaris'
1919
- result.systemout ShouldContainSubstring '10-test'
2020
- result.systemout ShouldContainSubstring 'polaris-release'
21+
- name: 10 - template course
22+
steps:
23+
- script: |
24+
reckoner template -a {{.course}}
25+
assertions:
26+
- result.code ShouldEqual 0
27+
- result.systemout ShouldContainSubstring 'goldilocks'
28+
- result.systemout ShouldContainSubstring 'polaris'
29+
- result.systemout ShouldContainSubstring 'another-polaris'
2130
- name: 10 - cleanup namespace creation
2231
steps:
2332
- script: |

end_to_end_testing/tests/13_schema.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ testcases:
99
reckoner plot -a ../course_files/13_test_bad_schema_repository.yml
1010
assertions:
1111
- result.code ShouldEqual 1
12-
- result.systemout ShouldContainSubstring 'Course file has schema validation errors'
12+
- result.systemerr ShouldContainSubstring 'Course file has schema validation errors'
1313
- name: 13 - plot 13_test_required_schema.yml
1414
steps:
1515
- script: |
1616
reckoner plot -a ../course_files/13_test_required_schema.yml
1717
assertions:
1818
- result.code ShouldEqual 1
19-
- result.systemout ShouldContainSubstring 'Course file has schema validation errors'
19+
- result.systemerr ShouldContainSubstring 'Course file has schema validation errors'
2020
- name: 13 - lint 13_test_lint_bad_secret.yml
2121
steps:
2222
- script: |
2323
reckoner lint ../course_files/13_test_lint_bad_secret.yml
2424
assertions:
2525
- result.code ShouldEqual 1
26-
- result.systemout ShouldContainSubstring 'Course file has schema validation errors'
26+
- result.systemerr ShouldContainSubstring 'Course file has schema validation errors'
2727
2828
- name: 13 - lint 13_test_lint_good_secret.yml
2929
steps:
3030
- script: |
3131
reckoner lint ../course_files/13_test_lint_good_secret.yml
3232
assertions:
3333
- result.code ShouldEqual 0
34-
- result.systemout ShouldContainSubstring 'No schema validation errors found'
34+
- result.systemerr ShouldContainSubstring 'No schema validation errors found'

end_to_end_testing/tests/21_diff.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ testcases:
1414
reckoner diff {{.course}} -o chart-with-namespace
1515
assertions:
1616
- result.code ShouldEqual 0
17-
- result.systemout ShouldContainSubstring "There are no differences in release"
17+
- result.systemerr ShouldContainSubstring "There are no differences in release"
1818
- script: |
1919
reckoner diff {{.course}} -o chart-without-namespace
2020
assertions:
2121
- result.code ShouldEqual 0
22-
- result.systemout ShouldContainSubstring "There are no differences in release"
22+
- result.systemerr ShouldContainSubstring "There are no differences in release"
2323
- name: 21 - cleanup
2424
steps:
2525
- script: |

go.mod

+9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ go 1.17
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1
7+
github.com/blang/semver v3.5.1+incompatible
78
github.com/davecgh/go-spew v1.1.1
89
github.com/fatih/color v1.13.0
910
github.com/go-git/go-git/v5 v5.4.2
11+
github.com/gookit/color v1.5.0
12+
github.com/rhysd/go-github-selfupdate v1.2.3
1013
github.com/sergi/go-diff v1.1.0
1114
github.com/spf13/cobra v1.4.0
1215
github.com/spf13/pflag v1.0.5
@@ -41,9 +44,12 @@ require (
4144
github.com/gogo/protobuf v1.3.2 // indirect
4245
github.com/golang/protobuf v1.5.2 // indirect
4346
github.com/google/go-cmp v0.5.6 // indirect
47+
github.com/google/go-github/v30 v30.1.0 // indirect
48+
github.com/google/go-querystring v1.0.0 // indirect
4449
github.com/google/gofuzz v1.1.0 // indirect
4550
github.com/googleapis/gnostic v0.5.5 // indirect
4651
github.com/imdario/mergo v0.3.12 // indirect
52+
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect
4753
github.com/inconshreveable/mousetrap v1.0.0 // indirect
4854
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
4955
github.com/json-iterator/go v1.1.12 // indirect
@@ -55,9 +61,12 @@ require (
5561
github.com/modern-go/reflect2 v1.0.2 // indirect
5662
github.com/pkg/errors v0.9.1 // indirect
5763
github.com/pmezard/go-difflib v1.0.0 // indirect
64+
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
65+
github.com/ulikunitz/xz v0.5.9 // indirect
5866
github.com/xanzy/ssh-agent v0.3.0 // indirect
5967
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
6068
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
69+
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
6170
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
6271
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
6372
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect

go.sum

+22
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
101101
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
102102
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
103103
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
104+
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
104105
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
105106
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
106107
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
@@ -261,6 +262,10 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
261262
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
262263
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
263264
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
265+
github.com/google/go-github/v30 v30.1.0 h1:VLDx+UolQICEOKu2m4uAoMti1SxuEBAl7RSEG16L+Oo=
266+
github.com/google/go-github/v30 v30.1.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8=
267+
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
268+
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
264269
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
265270
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
266271
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -291,6 +296,8 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0
291296
github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
292297
github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
293298
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
299+
github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw=
300+
github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo=
294301
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
295302
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
296303
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
@@ -326,6 +333,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
326333
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
327334
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
328335
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
336+
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8=
337+
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg=
329338
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
330339
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
331340
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
@@ -419,6 +428,7 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv
419428
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
420429
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
421430
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
431+
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
422432
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
423433
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
424434
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
@@ -458,6 +468,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT
458468
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
459469
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
460470
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
471+
github.com/rhysd/go-github-selfupdate v1.2.3 h1:iaa+J202f+Nc+A8zi75uccC8Wg3omaM7HDeimXA22Ag=
472+
github.com/rhysd/go-github-selfupdate v1.2.3/go.mod h1:mp/N8zj6jFfBQy/XMYoWsmfzxazpPAODuqarmPDe2Rg=
461473
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
462474
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
463475
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
@@ -507,10 +519,14 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
507519
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
508520
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
509521
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
522+
github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPgXBPw=
523+
github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE=
510524
github.com/thoas/go-funk v0.9.2 h1:oKlNYv0AY5nyf9g+/GhMgS/UO2ces0QRdPKwkhY3VCk=
511525
github.com/thoas/go-funk v0.9.2/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=
512526
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
513527
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
528+
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
529+
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
514530
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
515531
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
516532
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -521,6 +537,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:
521537
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
522538
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
523539
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
540+
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
541+
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
524542
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
525543
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
526544
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -579,6 +597,7 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U
579597
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
580598
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
581599
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
600+
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
582601
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
583602
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
584603
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
@@ -670,6 +689,7 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx
670689
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
671690
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
672691
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
692+
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
673693
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
674694
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
675695
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -776,6 +796,7 @@ golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBc
776796
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
777797
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E=
778798
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
799+
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
779800
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
780801
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
781802
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -895,6 +916,7 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv
895916
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
896917
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
897918
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
919+
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
898920
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
899921
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
900922
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=

pkg/course/course.go

+1
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ func OpenCourseFile(fileName string, schema []byte) (*FileV2, error) {
306306
if errConvert != nil {
307307
return nil, fmt.Errorf("could not unmarshal file from v1 or v2 schema:\n\t%s", errConvert.Error())
308308
}
309+
309310
color.Yellow("WARNING: this course file was automatically converted from v1 to v2 at runtime - to convert the file permanently, run \"reckoner convert -i %s\"", fileName)
310311
courseFile = fileV2
311312
}

pkg/helm/helm.go

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func (h Client) UpdateDependencies(path string) error {
109109
if stdErr != "" {
110110
return fmt.Errorf("error running helm dependency update: %s", stdErr)
111111
}
112+
112113
return nil
113114
}
114115

pkg/reckoner/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ func (c *Client) Init(fileName string, initKubeClient bool) error {
103103
c.KubeClient = getKubeClient(courseFile.Context)
104104
}
105105

106-
klog.V(5).Infof("successfully initialized client:")
107-
if klog.V(5).Enabled() {
106+
klog.V(10).Infof("successfully initialized client:")
107+
if klog.V(10).Enabled() {
108108
spew.Dump(c)
109109
}
110110

0 commit comments

Comments
 (0)