Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Updated the helm-operator to store release state in kubernetes secrets in the same namespace of the custom resource that defines the release. ([#1102](https://github.com/operator-framework/operator-sdk/pull/1102))
- **WARNING**: Users with active CRs and releases who are upgrading their helm-based operator should not skip this version. Future versions will not seamlessly transition release state to the persistent backend, and will instead uninstall and reinstall all managed releases.
- Change `namespace-manifest` flag in scorecard subcommand to `namespaced-manifest` to match other subcommands
- Subcommands of [`operator-sdk generate`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#generate) are now verbose by default. ([#1271](https://github.com/operator-framework/operator-sdk/pull/1271))

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions cmd/operator-sdk/internal/genutil/genutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func runGoBuildCodegen(binDir, repoDir, genDir string) error {
cmd.Env = append(os.Environ(), projutil.GoFlagsEnv+"="+gf)
}

// Only print binary build info if verbosity is explicitly set.
if projutil.IsGoVerbose() {
return projutil.ExecCmd(cmd)
}
Expand Down
19 changes: 2 additions & 17 deletions cmd/operator-sdk/internal/genutil/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package genutil

import (
"fmt"
"io/ioutil"
"os/exec"
"path/filepath"
"strings"
Expand Down Expand Up @@ -84,14 +83,7 @@ func deepcopyGen(binDir, repoPkg, hf string, gvMap map[string][]string) (err err
"--go-header-file", hf,
}
cmd := exec.Command(filepath.Join(binDir, "deepcopy-gen"), args...)
if projutil.IsGoVerbose() {
err = projutil.ExecCmd(cmd)
} else {
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
err = cmd.Run()
}
if err != nil {
if err = projutil.ExecCmd(cmd); err != nil {
return fmt.Errorf("failed to perform deepcopy code-generation: %v", err)
}
return nil
Expand All @@ -107,14 +99,7 @@ func defaulterGen(binDir, repoPkg, hf string, gvMap map[string][]string) (err er
"--go-header-file", hf,
}
cmd := exec.Command(filepath.Join(binDir, "defaulter-gen"), args...)
if projutil.IsGoVerbose() {
err = projutil.ExecCmd(cmd)
} else {
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
err = cmd.Run()
}
if err != nil {
if err = projutil.ExecCmd(cmd); err != nil {
return fmt.Errorf("failed to perform defaulter code-generation: %v", err)
}
return nil
Expand Down
10 changes: 1 addition & 9 deletions cmd/operator-sdk/internal/genutil/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package genutil

import (
"fmt"
"io/ioutil"
"os/exec"
"path/filepath"
"strings"
Expand Down Expand Up @@ -114,14 +113,7 @@ func openAPIGen(binDir, hf string, fqApis []string) (err error) {
"--go-header-file", hf,
}
cmd := exec.Command(cgPath, args...)
if projutil.IsGoVerbose() {
err = projutil.ExecCmd(cmd)
} else {
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
err = cmd.Run()
}
if err != nil {
if err = projutil.ExecCmd(cmd); err != nil {
return fmt.Errorf("failed to perform openapi code-generation: %v", err)
}
}
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ func TestMemcached(t *testing.T) {
"api",
"--api-version=cache.example.com/v1alpha1",
"--kind=Memcached")
// Generators will print errors if -v is set.
if !projutil.IsGoVerbose() {
os.Setenv(projutil.GoFlagsEnv, os.Getenv(projutil.GoFlagsEnv)+" -v")
}
cmd.Env = os.Environ()
cmdOut, err = cmd.CombinedOutput()
if err != nil {
Expand Down