Skip to content

Commit 4a04b8f

Browse files
committed
move some unnecessary logs to debug
Signed-off-by: Jason Hall <jason@chainguard.dev>
1 parent 0b6b8a0 commit 4a04b8f

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ _output
2323

2424
# SBOM outputs from apko
2525
sbom-*
26+
27+
.DS_Store

internal/cli/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func buildImageComponents(ctx context.Context, workDir string, archs []types.Arc
206206
ic.Archs = types.AllArchs
207207
}
208208
// save the final set we will build
209-
log.Infof("Building images for %d architectures: %+v", len(ic.Archs), ic.Archs)
209+
log.Debugf("Building images for %d architectures: %+v", len(ic.Archs), ic.Archs)
210210

211211
// Probe the VCS URL if it is not set and we are asked to do so.
212212
if o.WithVCS && ic.VCSUrl == "" {

pkg/apk/apk/implementation.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ func DiscoverKeys(ctx context.Context, client *http.Client, auth auth.Authentica
849849

850850
rc := retryablehttp.NewClient()
851851
rc.HTTPClient = client
852+
rc.Logger = clog.FromContext(ctx)
852853
discoveryResponse, err := rc.StandardClient().Do(discoveryRequest)
853854
if err != nil {
854855
return nil, fmt.Errorf("failed to perform key discovery: %w", err)

pkg/apk/apk/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (a *APK) SetRepositories(ctx context.Context, repos []string) error {
105105
ctx, span := otel.Tracer("go-apk").Start(ctx, "SetRepositories")
106106
defer span.End()
107107

108-
clog.InfoContextf(ctx, "setting apk repositories: %v", repos)
108+
clog.DebugContextf(ctx, "setting apk repositories: %v", repos)
109109

110110
if len(repos) == 0 {
111111
return fmt.Errorf("must provide at least one repository")

pkg/build/oci/publish.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ func LoadImage(ctx context.Context, image oci.SignedImage, tags []string) (name.
5656
if err != nil {
5757
return name.Digest{}, err
5858
}
59-
if strings.HasPrefix(localSrcTag.Name(), fmt.Sprintf("%s/", LocalDomain)) {
60-
log.Warnf("skipping local domain tagging %s as %s", localSrcTag.Name(), localDstTag.Name())
61-
} else {
59+
if !strings.HasPrefix(localSrcTag.Name(), fmt.Sprintf("%s/", LocalDomain)) {
6260
log.Infof("tagging local image %s as %s", localSrcTag.Name(), localDstTag.Name())
6361
if err := daemon.Tag(localSrcTag, localDstTag, daemon.WithContext(ctx)); err != nil {
6462
return name.Digest{}, err

pkg/build/types/image_configuration.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (ic *ImageConfiguration) ProbeVCSUrl(ctx context.Context, imageConfigPath s
4545

4646
if url != "" {
4747
ic.VCSUrl = url
48-
log.Infof("detected %s as VCS URL", ic.VCSUrl)
48+
log.Debugf("detected %s as VCS URL", ic.VCSUrl)
4949
}
5050
}
5151

@@ -179,6 +179,8 @@ func (ic *ImageConfiguration) readLocal(imageconfigPath string, includePaths []s
179179
// Load - loads an image configuration given a configuration file path.
180180
// Populates configHasher with the configuration data loaded from the imageConfigPath and the other referenced files.
181181
// You can pass any dummy hasher (like fnv.New32()), if you don't care about the hash of the configuration.
182+
//
183+
// Deprecated: This will be removed in a future release.
182184
func (ic *ImageConfiguration) Load(ctx context.Context, imageConfigPath string, includePaths []string, configHasher hash.Hash) error {
183185
data, err := ic.readLocal(imageConfigPath, includePaths)
184186
if err != nil {

pkg/build/types/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ type ImageConfiguration struct {
181181
// Optional: Path to a local file containing additional image configuration
182182
//
183183
// The included configuration is deep merged with the parent configuration
184+
//
185+
// Deprecated: This will be removed in a future release.
184186
Include string `json:"include,omitempty" yaml:"include,omitempty"`
185187

186188
// Optional: A list of volumes to configure
@@ -223,6 +225,8 @@ var (
223225

224226
// AllArchs contains the standard set of supported architectures, which are
225227
// used by `apko publish` when no architectures are specified.
228+
//
229+
// Deprecated: This will be removed in a future release.
226230
var AllArchs = []Architecture{
227231
_386,
228232
amd64,

0 commit comments

Comments
 (0)