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

Fix the issue of logs not being output #9135

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

manifestListByConfig, err := r.Render(ctx, io.Discard, bRes, false)
if err != nil {
return err
log.Entry(ctx).Debugf("skip render error: %v", err)

Check failure on line 58 in cmd/skaffold/app/cmd/delete.go

View workflow job for this annotation

GitHub Actions / PR linters, checks

undefined: log (typecheck)
}
return r.Cleanup(ctx, out, dryRun, manifestListByConfig, opts.Command)
})
Expand Down
12 changes: 10 additions & 2 deletions pkg/skaffold/deploy/helm/helm.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
"bytes"
"context"
"fmt"
"github.com/cenkalti/backoff"

Check failure on line 24 in pkg/skaffold/deploy/helm/helm.go

View workflow job for this annotation

GitHub Actions / unit tests (linux)

cannot query module due to -mod=vendor

Check failure on line 24 in pkg/skaffold/deploy/helm/helm.go

View workflow job for this annotation

GitHub Actions / PR unit tests (windows)

cannot query module due to -mod=vendor

Check failure on line 24 in pkg/skaffold/deploy/helm/helm.go

View workflow job for this annotation

GitHub Actions / PR integration tests (linux) (3.5.4, 0.4.0, 1.21.0, 1.0.0-beta.24, 1.30.1, 410.0.0, 1.8.0, 0)

cannot query module due to -mod=vendor

Check failure on line 24 in pkg/skaffold/deploy/helm/helm.go

View workflow job for this annotation

GitHub Actions / PR unit tests (darwin)

cannot query module due to -mod=vendor

Check failure on line 24 in pkg/skaffold/deploy/helm/helm.go

View workflow job for this annotation

GitHub Actions / PR integration tests (linux) (3.5.4, 0.4.0, 1.21.0, 1.0.0-beta.24, 1.30.1, 410.0.0, 1.8.0, 2)

cannot query module due to -mod=vendor
"io"
"os"
"os/exec"
"path/filepath"
"sort"
"strings"
"time"

"github.com/blang/semver"
"github.com/cenkalti/backoff/v4"
apimachinery "k8s.io/apimachinery/pkg/runtime/schema"

"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/access"
Expand Down Expand Up @@ -572,7 +573,14 @@

olog.Entry(ctx).Debug(b.String())

return b.Bytes(), err
grepCmd := exec.Command("grep", "-v", "This is insecure")
if err != nil {
return b.Bytes(), err
}

grepCmd.Stdin = &b

return grepCmd.Output()
}

// packageChart packages the chart and returns the path to the resulting chart archive
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/deploy/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
endTrace(instrumentation.TraceEndError(err))
return err
}
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(k.transformableAllowlist, k.transformableDenylist))

k.TrackBuildArtifacts(builds, deployedImages)
k.statusMonitor.RegisterDeployManifests(manifests)
Expand Down
Loading