mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
Fix
Signed-off-by: co63oc <co63oc@users.noreply.github.com>
This commit is contained in:
parent
4ed1e07f16
commit
7925a96726
@ -34,7 +34,7 @@ import (
|
|||||||
// The layout of the resulting HCL source is derived from the ordering of
|
// The layout of the resulting HCL source is derived from the ordering of
|
||||||
// the struct fields, with blank lines around nested blocks of different types.
|
// the struct fields, with blank lines around nested blocks of different types.
|
||||||
// Fields representing attributes should usually precede those representing
|
// Fields representing attributes should usually precede those representing
|
||||||
// blocks so that the attributes can group togather in the result. For more
|
// blocks so that the attributes can group together in the result. For more
|
||||||
// control, use the hclwrite API directly.
|
// control, use the hclwrite API directly.
|
||||||
func EncodeIntoBody(val interface{}, dst *hclwrite.Body) {
|
func EncodeIntoBody(val interface{}, dst *hclwrite.Body) {
|
||||||
rv := reflect.ValueOf(val)
|
rv := reflect.ValueOf(val)
|
||||||
|
@ -622,7 +622,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opts map[
|
|||||||
// This is fallback for some very old buildkit versions.
|
// This is fallback for some very old buildkit versions.
|
||||||
// Note that the mediatype isn't really correct as most of the time it is image manifest and
|
// Note that the mediatype isn't really correct as most of the time it is image manifest and
|
||||||
// not manifest list but actually both are handled because for Docker mediatypes the
|
// not manifest list but actually both are handled because for Docker mediatypes the
|
||||||
// mediatype value in the Accpet header does not seem to matter.
|
// mediatype value in the Accept header does not seem to matter.
|
||||||
s, ok = r.ExporterResponse[exptypes.ExporterImageDigestKey]
|
s, ok = r.ExporterResponse[exptypes.ExporterImageDigestKey]
|
||||||
if ok {
|
if ok {
|
||||||
descs = append(descs, specs.Descriptor{
|
descs = append(descs, specs.Descriptor{
|
||||||
|
@ -13,8 +13,8 @@ import (
|
|||||||
type BuildxController interface {
|
type BuildxController interface {
|
||||||
Build(ctx context.Context, options *controllerapi.BuildOptions, in io.ReadCloser, progress progress.Writer) (ref string, resp *client.SolveResponse, inputs *build.Inputs, err error)
|
Build(ctx context.Context, options *controllerapi.BuildOptions, in io.ReadCloser, progress progress.Writer) (ref string, resp *client.SolveResponse, inputs *build.Inputs, err error)
|
||||||
// Invoke starts an IO session into the specified process.
|
// Invoke starts an IO session into the specified process.
|
||||||
// If pid doesn't matche to any running processes, it starts a new process with the specified config.
|
// If pid doesn't match to any running processes, it starts a new process with the specified config.
|
||||||
// If there is no container running or InvokeConfig.Rollback is speicfied, the process will start in a newly created container.
|
// If there is no container running or InvokeConfig.Rollback is specified, the process will start in a newly created container.
|
||||||
// NOTE: If needed, in the future, we can split this API into three APIs (NewContainer, NewProcess and Attach).
|
// NOTE: If needed, in the future, we can split this API into three APIs (NewContainer, NewProcess and Attach).
|
||||||
Invoke(ctx context.Context, ref, pid string, options *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error
|
Invoke(ctx context.Context, ref, pid string, options *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error
|
||||||
Kill(ctx context.Context) error
|
Kill(ctx context.Context) error
|
||||||
|
@ -39,7 +39,7 @@ func (p *Process) Done() <-chan error {
|
|||||||
return p.errCh
|
return p.errCh
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manager manages a set of proceses.
|
// Manager manages a set of processes.
|
||||||
type Manager struct {
|
type Manager struct {
|
||||||
container atomic.Value
|
container atomic.Value
|
||||||
processes sync.Map
|
processes sync.Map
|
||||||
|
@ -90,7 +90,7 @@ func ListRunningPods(ctx context.Context, client clientcorev1.PodInterface, depl
|
|||||||
for i := range podList.Items {
|
for i := range podList.Items {
|
||||||
pod := &podList.Items[i]
|
pod := &podList.Items[i]
|
||||||
if pod.Status.Phase == corev1.PodRunning {
|
if pod.Status.Phase == corev1.PodRunning {
|
||||||
logrus.Debugf("pod runnning: %q", pod.Name)
|
logrus.Debugf("pod running: %q", pod.Name)
|
||||||
runningPods = append(runningPods, pod)
|
runningPods = append(runningPods, pod)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user