<commit_before>package build

import (
	"fmt"
	"strings"

	"github.com/flant/werf/pkg/build/stage"
	imagePkg "github.com/flant/werf/pkg/image"
	"github.com/flant/werf/pkg/logger"
	"github.com/flant/werf/pkg/util"
)

const (
	BuildCacheVersion = "1"

	LocalImageStageImageNameFormat = "image-stage-%s"
	LocalImageStageImageFormat     = "image-stage-%s:%s"
)

func NewSignaturesPhase() *SignaturesPhase {
	return &SignaturesPhase{}
}

type SignaturesPhase struct{}

func (p *SignaturesPhase) Run(c *Conveyor) error {
	return logger.LogServiceProcess("Calculating signatures", logger.LogProcessOptions{WithoutBorder: true}, func() error {
		return logger.WithoutIndent(func() error { return p.run(c) })
	})
}

func (p *SignaturesPhase) run(c *Conveyor) error {
	for _, image := range c.imagesInOrder {
		err := logger.WithTag(image.LogName(), func() error {
			return p.calculateImageSignatures(c, image)
		})
<commit_msg>Update local stage image name format (werf-stages-storage/<PROJECT>)<commit_after>package build

import (
	"fmt"
	"strings"

	"github.com/flant/werf/pkg/build/stage"
	imagePkg "github.com/flant/werf/pkg/image"
	"github.com/flant/werf/pkg/logger"
	"github.com/flant/werf/pkg/util"
)

const (
	BuildCacheVersion = "1"

	LocalImageStageImageNameFormat = "werf-stages-storage/%s"
	LocalImageStageImageFormat     = "werf-stages-storage/%s:%s"
)

func NewSignaturesPhase() *SignaturesPhase {
	return &SignaturesPhase{}
}

type SignaturesPhase struct{}

func (p *SignaturesPhase) Run(c *Conveyor) error {
	return logger.LogServiceProcess("Calculating signatures", logger.LogProcessOptions{WithoutBorder: true}, func() error {
		return logger.WithoutIndent(func() error { return p.run(c) })
	})
}

func (p *SignaturesPhase) run(c *Conveyor) error {
	for _, image := range c.imagesInOrder {
		err := logger.WithTag(image.LogName(), func() error {
			return p.calculateImageSignatures(c, image)
		})

{'fraction_non_alphanumeric': 0.13986380303823992, 'fraction_numerical': 0.0010476689366160294, 'mean_word_length': 5.161290322580645, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5874344', 'n_tokens_mistral': 691, 'n_tokens_neox': 672, 'n_words': 126}