mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-14 23:47:09 +08:00
vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
2
vendor/github.com/Microsoft/hcsshim/computestorage/attach.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/attach.go
generated
vendored
@ -18,7 +18,7 @@ import (
|
||||
// `layerData` is the parent read-only layer data.
|
||||
func AttachLayerStorageFilter(ctx context.Context, layerPath string, layerData LayerData) (err error) {
|
||||
title := "hcsshim.AttachLayerStorageFilter"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/destroy.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/destroy.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
// `layerPath` is a path to a directory containing the layer to export.
|
||||
func DestroyLayer(ctx context.Context, layerPath string) (err error) {
|
||||
title := "hcsshim.DestroyLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("layerPath", layerPath))
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/detach.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/detach.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
// `layerPath` is a path to a directory containing the layer to export.
|
||||
func DetachLayerStorageFilter(ctx context.Context, layerPath string) (err error) {
|
||||
title := "hcsshim.DetachLayerStorageFilter"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("layerPath", layerPath))
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/export.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/export.go
generated
vendored
@ -20,7 +20,7 @@ import (
|
||||
// `options` are the export options applied to the exported layer.
|
||||
func ExportLayer(ctx context.Context, layerPath, exportFolderPath string, layerData LayerData, options ExportLayerOptions) (err error) {
|
||||
title := "hcsshim.ExportLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/format.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/format.go
generated
vendored
@ -14,7 +14,7 @@ import (
|
||||
// If the VHD is not mounted it will be temporarily mounted.
|
||||
func FormatWritableLayerVhd(ctx context.Context, vhdHandle windows.Handle) (err error) {
|
||||
title := "hcsshim.FormatWritableLayerVhd"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
|
||||
|
12
vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go
generated
vendored
12
vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go
generated
vendored
@ -70,11 +70,9 @@ func SetupContainerBaseLayer(ctx context.Context, layerPath, baseVhdPath, diffVh
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
syscall.CloseHandle(handle)
|
||||
_ = syscall.CloseHandle(handle)
|
||||
os.RemoveAll(baseVhdPath)
|
||||
if os.Stat(diffVhdPath); err == nil {
|
||||
os.RemoveAll(diffVhdPath)
|
||||
}
|
||||
os.RemoveAll(diffVhdPath)
|
||||
}
|
||||
}()
|
||||
|
||||
@ -148,11 +146,9 @@ func SetupUtilityVMBaseLayer(ctx context.Context, uvmPath, baseVhdPath, diffVhdP
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
syscall.CloseHandle(handle)
|
||||
_ = syscall.CloseHandle(handle)
|
||||
os.RemoveAll(baseVhdPath)
|
||||
if os.Stat(diffVhdPath); err == nil {
|
||||
os.RemoveAll(diffVhdPath)
|
||||
}
|
||||
os.RemoveAll(diffVhdPath)
|
||||
}
|
||||
}()
|
||||
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/import.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/import.go
generated
vendored
@ -20,7 +20,7 @@ import (
|
||||
// `layerData` is the parent layer data.
|
||||
func ImportLayer(ctx context.Context, layerPath, sourceFolderPath string, layerData LayerData) (err error) {
|
||||
title := "hcsshim.ImportLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/initialize.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/initialize.go
generated
vendored
@ -17,7 +17,7 @@ import (
|
||||
// `layerData` is the parent read-only layer data.
|
||||
func InitializeWritableLayer(ctx context.Context, layerPath string, layerData LayerData) (err error) {
|
||||
title := "hcsshim.InitializeWritableLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/computestorage/mount.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/computestorage/mount.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
// GetLayerVhdMountPath returns the volume path for a virtual disk of a writable container layer.
|
||||
func GetLayerVhdMountPath(ctx context.Context, vhdHandle windows.Handle) (path string, err error) {
|
||||
title := "hcsshim.GetLayerVhdMountPath"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
|
||||
|
4
vendor/github.com/Microsoft/hcsshim/computestorage/setup.go
generated
vendored
4
vendor/github.com/Microsoft/hcsshim/computestorage/setup.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
// `options` are the options applied while processing the layer.
|
||||
func SetupBaseOSLayer(ctx context.Context, layerPath string, vhdHandle windows.Handle, options OsLayerOptions) (err error) {
|
||||
title := "hcsshim.SetupBaseOSLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
@ -53,7 +53,7 @@ func SetupBaseOSVolume(ctx context.Context, layerPath, volumePath string, option
|
||||
return errors.New("SetupBaseOSVolume is not present on builds older than 19645")
|
||||
}
|
||||
title := "hcsshim.SetupBaseOSVolume"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(
|
||||
|
Reference in New Issue
Block a user