id
stringlengths
2
7
text
stringlengths
17
51.2k
title
stringclasses
1 value
c177300
volumeType, oldVolumeName), fmt.Sprintf("%s/%s_%s", poolName, volumeType, newVolumeName)) if err != nil { return err } return nil }
c177301
fmt.Sprintf("%s/%s_%s@%s", poolName, volumeType, volumeName, oldSnapshotName), fmt.Sprintf("%s/%s_%s@%s", poolName, volumeType, volumeName, newSnapshotName)) if err != nil { return err } return nil }
c177302
"snap", "rm", fmt.Sprintf("%s_%s@%s", volumeType, volumeName, snapshotName)) if err != nil { return err } return nil }
c177303
:= shared.RunCommand( "rbd", "--id", userName, "--cluster", clusterName, "cp", oldVolumeName, newVolumeName) if err != nil { return err } return nil }
c177304
var data []map[string]interface{} err = json.Unmarshal([]byte(msg), &data) if err != nil { return []string{}, err } snapshots := []string{} for _, v := range data { _, ok := v["name"] if !ok { return []string{}, fmt.Errorf("No \"name\" property found") } name, ok := v["name"].(string) if !ok { return []string{}, fmt.Errorf("\"name\" property did not have string type") } name = strings.TrimSpace(name) snapshots = append(snapshots, name) } if len(snapshots) == 0 { return []string{}, db.ErrNoSuchObject } return snapshots, nil }
c177305
to default value. if sz == 0 { sz, _ = shared.ParseByteSizeString("10GB") } return fmt.Sprintf("%dB", sz), nil }
c177306
if s.pool.Config["volume.block.filesystem"] != "" { return s.pool.Config["volume.block.filesystem"] } return "ext4" }
c177307
targetContainerName, s.pool.Name, err) return err } targetContainerMountPoint := getContainerMountPoint(target.Project(), s.pool.Name, target.Name()) err = createContainerMountpoint(targetContainerMountPoint, target.Path(), target.IsPrivileged()) if err != nil { return err } ourMount, err := target.StorageStart() if err != nil { return err } if ourMount { defer target.StorageStop() } err = target.TemplateApply("copy") if err != nil { logger.Errorf(`Failed to apply copy template for container "%s": %s`, target.Name(), err) return err } logger.Debugf(`Applied copy template for container "%s"`, target.Name()) logger.Debugf(`Created non-sparse copy of RBD storage volume for container "%s" to "%s" without snapshots`, source.Name(), target.Name()) return nil }
c177308
sourceContainerOnlyName, storagePoolVolumeTypeNameContainer, snapshotName, s.OSDPoolName, targetContainerName, storagePoolVolumeTypeNameContainer, s.UserName) if err != nil { logger.Errorf(`Failed to clone new RBD storage volume for container "%s": %s`, targetContainerName, err) return err } // Re-generate the UUID err = s.cephRBDGenerateUUID(projectPrefix(target.Project(), target.Name()), storagePoolVolumeTypeNameContainer) if err != nil { return err } // Create mountpoint targetContainerMountPoint := getContainerMountPoint(target.Project(), s.pool.Name, target.Name()) err = createContainerMountpoint(targetContainerMountPoint, target.Path(), target.IsPrivileged()) if err != nil { return err } ourMount, err := target.StorageStart() if err != nil { return err } if ourMount { defer target.StorageStop() } err = target.TemplateApply("copy") if err != nil { logger.Errorf(`Failed to apply copy template for container "%s": %s`, target.Name(), err) return err } logger.Debugf(`Applied copy template for container "%s"`, target.Name()) logger.Debugf(`Created sparse copy of RBD storage volume for container "%s" to "%s" without snapshots`, source.Name(), target.Name()) return nil }
c177309
switch format { case "json": // already done case "yaml": output, err = yaml.JSONToYAML(output) if err != nil { return fmt.Errorf("could not convert json to yaml: %v", err) } default: return fmt.Errorf("invalid output format: %v", format) } fmt.Println(string(output)) return nil }), } getConfig.Flags().StringVarP(&format, "output-format", "o", "json", "output "+ "format (\"json\" or \"yaml\")") return cmdutil.CreateAlias(getConfig, "auth get-config") }
c177310
return errors.New("must set input file (use \"-\" to read from stdin)") } // Try to parse config as YAML (JSON is a subset of YAML) var config auth.AuthConfig if err := yaml.Unmarshal(configBytes, &config); err != nil { return fmt.Errorf("could not parse config: %v", err) } // TODO(msteffen): try to handle empty config? _, err = c.SetConfiguration(c.Ctx(), &auth.SetConfigurationRequest{ Configuration: &config, }) return grpcutil.ScrubGRPC(err) }), } setConfig.Flags().StringVarP(&file, "file", "f", "-", "input file (to use "+ "as the new config") return cmdutil.CreateAlias(setConfig, "auth set-config") }
c177311
return newSharder(discoveryClient, numShards, namespace) }
c177312
return newRouter( sharder, dialer, localAddress, ) }
c177313
err != nil { return err } defer client.Close() // avoid leaking connections client = client.WithCtx(ctx) client.SetAuthToken(adminToken) _, err = client.AuthAPIClient.ExtendAuthToken(client.Ctx(), &auth.ExtendAuthTokenRequest{ Token: userToken, TTL: int64(ttl.Seconds()), }) if err != nil { return err } return nil }
c177314
os.MkdirAll(root, 0755); err != nil { return nil, err } return &localClient{root}, nil }
c177315
opentracing.ChildOf(parentSpan.Context())) tagSpan(span, kvs) return span, opentracing.ContextWithSpan(ctx, span) } return nil, ctx }
c177316
// addTraceIfTracingEnabled (defined below) to skip sampling every RPC // unless the PACH_ENABLE_TRACING environment variable is set Sampler: &jaegercfg.SamplerConfig{ Type: "const", Param: 1, }, Reporter: &jaegercfg.ReporterConfig{ LogSpans: true, BufferFlushInterval: 1 * time.Second, CollectorEndpoint: jaegerEndpoint, }, } // configure jaeger logger logger := jaeger.Logger(jaeger.NullLogger) if !onUserMachine { logger = jaeger.StdLogger } // Hack: ignore second argument (io.Closer) because the Jaeger // implementation of opentracing.Tracer also implements io.Closer (i.e. the // first and second return values from cfg.New(), here, are two interfaces // that wrap the same underlying type). Instead of storing the second return // value here, just cast the tracer to io.Closer in CloseAndReportTraces() // (below) and call 'Close()' on it there. tracer, _, err := cfg.New(JaegerServiceName, jaegercfg.Logger(logger)) if err != nil { panic(fmt.Sprintf("could not install Jaeger tracer: %v", err)) } opentracing.SetGlobalTracer(tracer) }) }
c177317
racing.GlobalTracer(), otgrpc.IncludingSpans(addTraceIfTracingEnabled)) }
c177318
opentracing.GlobalTracer(), otgrpc.IncludingSpans(addTraceIfTracingEnabled)) }
c177319
racing.GlobalTracer(), otgrpc.IncludingSpans(addTraceIfTracingEnabled)) }
c177320
opentracing.GlobalTracer(), otgrpc.IncludingSpans(addTraceIfTracingEnabled)) }
c177321
opentracing.GlobalTracer().(io.Closer); ok { c.Close() } }
c177322
[]func([]*DataRef) error{}, buf: &bytes.Buffer{}, hash: hash, splitMask: (1 << uint64(AverageBits)) - 1, } }
c177323
*ConstantBackOff { b.MaxElapsedTime = maxElapsed return b }
c177324
We have to grab the method's name here before we // enter the goro's stack go l.ReportMetric(getMethodName(), duration, err) }
c177325
error) { return f(entry) }
c177326
&GRPCLogWriter{ logger: logger, source: source, } }
c177327
== "" { fmt.Printf("No UserID present in config. Generating new UserID and "+ "updating config at %s\n", p) uuid, err := uuid.NewV4() if err != nil { return nil, err } c.UserID = uuid.String() if err := c.Write(); err != nil { return nil, err } } return c, nil }
c177328
not stat parent directory (%v)", p, err) } } else { // using the default config path, create the config directory err = os.MkdirAll(defaultConfigDir, 0755) if err != nil { return err } } return ioutil.WriteFile(p, rawConfig, 0644) }
c177329
return err } return proto.Unmarshal(buf, val) }
c177330
return 0, err } return r.WriteBytes(bytes) }
c177331
&readWriter{r: rw, w: rw} }
c177332
DialOptions: client.DefaultDialOptions(), }) if err != nil { return err } hook, err := github.New() if err != nil { return err } s := &gitHookServer{ hook, c, etcdClient, ppsdb.Pipelines(etcdClient, etcdPrefix), } return http.ListenAndServe(fmt.Sprintf(":%d", GitHookPort), s) }
c177333
p.serverWriter = io.Pipe() p.serverReader = io.TeeReader(p.serverReader, &p.ClientToServerBuf) return p }
c177334
{ return l.r.Read(b) }
c177335
{ return l.w.Write(b) }
c177336
already been called on this TestListener") } return conn, nil }
c177337
l.connMu.Unlock() c := <-l.connCh if c != nil { close(l.connCh) } return nil }
c177338
error { return &hashTreeError{ code: c, s: fmt.Sprintf(fmtStr, args...), } }
c177339
env.kubeEg.Go(env.initKubeClient) return env // env is not ready yet }
c177340
env can't connect, there's no sensible way to recover } if env.etcdClient == nil { panic("service env never connected to etcd") } return env.etcdClient }
c177341
env can't connect, there's no sensible way to recover } if env.kubeClient == nil { panic("service env never connected to kubernetes") } return env.kubeClient }
c177342
jobModulus, PipelineModulus: pipelineModulus, } }
c177343
{ return uint64(adler32.Checksum([]byte(jobID))) % s.JobModulus }
c177344
{ return uint64(adler32.Checksum([]byte(pipelineName))) % s.PipelineModulus }
c177345
[]*pps.WorkerStatus for _, workerClient := range workerClients { status, err := workerClient.Status(ctx, &types.Empty{}) if err != nil { return nil, err } result = append(result, status) } return result, nil }
c177346
jobID, DataFilters: dataFilter, }) if err != nil { return err } if resp.Success { success = true } } if !success { return fmt.Errorf("datum matching filter %+v could not be found for jobID %s", dataFilter, jobID) } return nil }
c177347
err != nil { return nil, err } var result []*grpc.ClientConn for _, kv := range resp.Kvs { conn, err := grpc.Dial(fmt.Sprintf("%s:%d", path.Base(string(kv.Key)), workerGrpcPort), append(client.DefaultDialOptions(), grpc.WithInsecure())...) if err != nil { return nil, err } result = append(result, conn) } return result, nil }
c177348
} var result []Client for _, conn := range conns { result = append(result, newClient(conn)) } return result, nil }
c177349
port), append(client.DefaultDialOptions(), grpc.WithInsecure())...) if err != nil { return Client{}, err } return newClient(conn), nil }
c177350
cmd.Usage() } else { if err := run(args); err != nil { ErrorAndExit("%v", err) } } } }
c177351
%d\n\n", min, max, len(args)) cmd.Usage() } else { if err := run(args); err != nil { ErrorAndExit("%v", err) } } } }
c177352
:= run(args); err != nil { ErrorAndExit(err.Error()) } } }
c177353
{ fmt.Fprintf(os.Stderr, "%s\n", errString) } os.Exit(1) }
c177354
Name: parts[0], }, ID: "", } if len(parts) == 2 { commit.ID = parts[1] } return commit, nil }
c177355
nil, err } return &pfs.Branch{Repo: commit.Repo, Name: commit.ID}, nil }
c177356
2) if commitAndPath[0] == "" { return nil, fmt.Errorf("invalid format \"%s\": commit cannot be empty", arg) } file.Commit.ID = commitAndPath[0] if len(commitAndPath) > 1 { file.Path = commitAndPath[1] } } return file, nil }
c177357
*r = append(*r, s) return nil }
c177358
func(s string) string { format := fmt.Sprintf("%%-%ds", maxCommandPath+1) return fmt.Sprintf(format, s) }, "associated": func() []*cobra.Command { return associated }, } text := `Associated Commands:{{range associated}}{{if .IsAvailableCommand}} {{pad .CommandPath}} {{.Short}}{{end}}{{end}}` t := template.New("top") t.Funcs(templateFuncs) template.Must(t.Parse(text)) return t.Execute(cmd.Out(), cmd) }) }
c177359
_, err = pachClient.StartCommit(in.Cron.Repo, "master") if err != nil { return err } if in.Cron.Overwrite { // If we want to "overwrite" the file, we need to delete the file with the previous time err := pachClient.DeleteFile(in.Cron.Repo, "master", latestTime.Format(time.RFC3339)) if err != nil && !isNotFoundErr(err) && !isNilBranchErr(err) { return fmt.Errorf("delete error %v", err) } } // Put in an empty file named by the timestamp _, err = pachClient.PutFile(in.Cron.Repo, "master", next.Format(time.RFC3339), strings.NewReader("")) if err != nil { return fmt.Errorf("put error %v", err) } err = pachClient.FinishCommit(in.Cron.Repo, "master") if err != nil { return err } // set latestTime to the next time latestTime = next } }
c177360
name) if span != nil { defer span.Finish() } return o.Client.Writer(ctx, name) }
c177361
offset), "size", fmt.Sprintf("%d", size)) defer tracing.FinishAnySpan(span) return o.Client.Reader(ctx, name, offset, size) }
c177362
name) defer tracing.FinishAnySpan(span) return o.Client.Delete(ctx, name) }
c177363
ctx := tracing.AddSpanToAnyExisting(ctx, o.provider+".Walk", "prefix", prefix) defer tracing.FinishAnySpan(span) return o.Client.Walk(ctx, prefix, fn) }
c177364
name) defer tracing.FinishAnySpan(span) return o.Client.Exists(ctx, name) }
c177365
base64.URLEncoding.EncodeToString(hash.Sum(nil)), } }
c177366
nil, fmt.Errorf("server not ready") } return &types.Empty{}, nil }
c177367
{ return clean(path.Dir(p)), base(p) }
c177368
fmt.Errorf("path (%v) invalid: globbing character (%v) not allowed in path", path, globRegex.FindString(path)) } return nil }
c177369
filter { for _, datum := range data { if dataFilter == datum.Path || dataFilter == base64.StdEncoding.EncodeToString(datum.Hash) || dataFilter == hex.EncodeToString(datum.Hash) { continue dataFilters // Found, move to next filter } } matchesData = false break } return matchesData }
c177370
shards, } groupcache.RegisterPeerPicker(func() groupcache.PeerPicker { return server }) return server }
c177371
the output repo doesn't exist // (if it did exist, we'd have to check that the user has permission to write // to it, and this is simpler) var required auth.Scope switch operation { case pipelineOpCreate: if _, err := pachClient.InspectRepo(output); err == nil { return fmt.Errorf("cannot overwrite repo \"%s\" with new output repo", output) } else if !isNotFoundErr(err) { return err } case pipelineOpListDatum, pipelineOpGetLogs: required = auth.Scope_READER case pipelineOpUpdate: required = auth.Scope_WRITER case pipelineOpDelete: required = auth.Scope_OWNER default: return fmt.Errorf("internal error, unrecognized operation %v", operation) } if required != auth.Scope_NONE { resp, err := pachClient.Authorize(ctx, &auth.AuthorizeRequest{ Repo: output, Scope: required, }) if err != nil { return err } if !resp.Authorized { return &auth.ErrNotAuthorized{ Subject: me.Username, Repo: output, Required: required, } } } return nil }
c177372
= result.Value return nil }, b); err != nil { panic(fmt.Sprintf("couldn't get PPS superuser token: %v", err)) } }) // Copy pach client, but keep ctx (to propagate cancellation). Replace token // with superUserToken superUserClient := pachClient.WithCtx(pachClient.Ctx()) superUserClient.SetAuthToken(superUserToken) return f(superUserClient) }
c177373
tokens[0] } } }) if pipelineInfo.OutputBranch == "" { // Output branches default to master pipelineInfo.OutputBranch = "master" } if pipelineInfo.CacheSize == "" { pipelineInfo.CacheSize = "64M" } if pipelineInfo.ResourceRequests == nil && pipelineInfo.CacheSize != "" { pipelineInfo.ResourceRequests = &pps.ResourceSpec{ Memory: pipelineInfo.CacheSize, } } if pipelineInfo.MaxQueueSize < 1 { pipelineInfo.MaxQueueSize = 1 } if pipelineInfo.DatumTries == 0 { pipelineInfo.DatumTries = DefaultDatumTries } }
c177374
} else { oldGen, err := strconv.Atoi(string(resp.Kvs[0].Value)) if err != nil { return err } newGen := oldGen + 1 if _, err := a.env.GetEtcdClient().Put(ctx, client.GCGenerationKey, strconv.Itoa(newGen)); err != nil { return err } } return nil }
c177375
etcdClient: etcdClient, etcdPrefix: etcdPrefix, workerGrpcPort: workerGrpcPort, } }
c177376
&types.Empty{}) return grpcutil.ScrubGRPC(err) }
c177377
* objectCacheShares, } objectGroupName := "object" tagGroupName := "tag" objectInfoGroupName := "objectInfo" blockGroupName := "block" if test { uuid := uuid.New() objectGroupName += uuid tagGroupName += uuid objectInfoGroupName += uuid blockGroupName += uuid } s.objectCache = groupcache.NewGroup(objectGroupName, oneCacheShare*objectCacheShares, groupcache.GetterFunc(s.objectGetter)) s.tagCache = groupcache.NewGroup(tagGroupName, oneCacheShare*tagCacheShares, groupcache.GetterFunc(s.tagGetter)) s.objectInfoCache = groupcache.NewGroup(objectInfoGroupName, oneCacheShare*objectInfoCacheShares, groupcache.GetterFunc(s.objectInfoGetter)) s.blockCache = groupcache.NewGroup(blockGroupName, oneCacheShare*blockCacheShares, groupcache.GetterFunc(s.blockGetter)) if !test { RegisterCacheStats("tag", &s.tagCache.Stats) RegisterCacheStats("object", &s.objectCache.Stats) RegisterCacheStats("object_info", &s.objectInfoCache.Stats) } go s.watchGC(etcdAddress) return s, nil }
c177378
stream closed unexpectedly") } newGen, err := strconv.Atoi(string(ev.Value)) if err != nil { return fmt.Errorf("error converting the generation number: %v", err) } s.setGeneration(newGen) } }, b, func(err error, d time.Duration) error { logrus.Errorf("error running GC watcher in block server: %v; retrying in %s", err, d) return nil }) }
c177379
} return fmt.Sprintf("%s.%s.%d", key[:prefixLength], key[prefixLength:], gen) }
c177380
ansiterm.NewTabWriter(w, 0, 1, 1, ' ', 0) tabwriter.Write([]byte(header)) return &Writer{ w: tabwriter, lines: 1, // 1 because we just printed the header header: []byte(header), } }
c177381
{ return 0, err } w.lines++ } w.lines += bytes.Count(buf, []byte{'\n'}) return w.w.Write(buf) }
c177382
RepoAuthHeader) return } fmt.Fprint(w, RepoHeader) }
c177383
} fmt.Fprintf(w, "%s\t", units.BytesSize(float64(repoInfo.SizeBytes))) if repoInfo.AuthInfo != nil { fmt.Fprintf(w, "%s\t", repoInfo.AuthInfo.AccessLevel.String()) } fmt.Fprintln(w) }
c177384
{{.Created}}{{else}} Created: {{prettyAgo .Created}}{{end}} Size of HEAD on master: {{prettySize .SizeBytes}}{{if .AuthInfo}} Access level: {{ .AuthInfo.AccessLevel.String }}{{end}} `) if err != nil { return err } err = template.Execute(os.Stdout, repoInfo) if err != nil { return err } return nil }
c177385
"%s\t\n", branchInfo.Head.ID) } else { fmt.Fprintf(w, "-\t\n") } }
c177386
} if fullTimestamps { fmt.Fprintf(w, "%s\t", commitInfo.Started.String()) } else { fmt.Fprintf(w, "%s\t", pretty.Ago(commitInfo.Started)) } if commitInfo.Finished != nil { fmt.Fprintf(w, fmt.Sprintf("%s\t", pretty.TimeDifference(commitInfo.Started, commitInfo.Finished))) fmt.Fprintf(w, "%s\t\n", units.BytesSize(float64(commitInfo.SizeBytes))) } else { fmt.Fprintf(w, "-\t") // Open commits don't have meaningful size information fmt.Fprintf(w, "-\t\n") } }
c177387
Started: {{.Started}}{{else}} Started: {{prettyAgo .Started}}{{end}}{{if .Finished}}{{if .FullTimestamps}} Finished: {{.Finished}}{{else}} Finished: {{prettyAgo .Finished}}{{end}}{{end}} Size: {{prettySize .SizeBytes}}{{if .Provenance}} Provenance: {{range .Provenance}} {{.Commit.Repo.Name}}@{{.Commit.ID}} ({{.Branch.Name}}) {{end}} {{end}} `) if err != nil { return err } err = template.Execute(os.Stdout, commitInfo) if err != nil { return err } return nil }
c177388
} else { fmt.Fprint(w, "dir\t") } if fileInfo.Committed == nil { fmt.Fprintf(w, "-\t") } else if fullTimestamps { fmt.Fprintf(w, "%s\t", fileInfo.Committed.String()) } else { fmt.Fprintf(w, "%s\t", pretty.Ago(fileInfo.Committed)) } fmt.Fprintf(w, "%s\t\n", units.BytesSize(float64(fileInfo.SizeBytes))) }
c177389
Type: {{fileType .FileType}} Size: {{prettySize .SizeBytes}} Children: {{range .Children}} {{.}} {{end}} `) if err != nil { return err } return template.Execute(os.Stdout, fileInfo) }
c177390
{ return fmt.Sprintf("%s~%d", s, ancestors) }
c177391
nil { return nil } if next = b.NextBackOff(); next == Stop { return err } if notify != nil { if err := notify(err, next); err != nil { return err } } time.Sleep(next) } }
c177392
if err := r.Close(); err != nil && retErr == nil { retErr = err } }() return NewWriter(w).Copy(NewReader(r, filter)) }
c177393
c.Cache.Delete(fmt.Sprint(id)) }
c177394
%d / %d\t", jobInfo.DataProcessed, jobInfo.DataSkipped, jobInfo.DataTotal) } fmt.Fprintf(w, "%s\t", pretty.Size(jobInfo.Stats.DownloadBytes)) fmt.Fprintf(w, "%s\t", pretty.Size(jobInfo.Stats.UploadBytes)) if jobInfo.State == ppsclient.JobState_JOB_FAILURE { fmt.Fprintf(w, "%s: %s\t\n", jobState(jobInfo.State), safeTrim(jobInfo.Reason, jobReasonLen)) } else { fmt.Fprintf(w, "%s\t\n", jobState(jobInfo.State)) } }
c177395
if fullTimestamps { fmt.Fprintf(w, "%s\t", pipelineInfo.CreatedAt.String()) } else { fmt.Fprintf(w, "%s\t", pretty.Ago(pipelineInfo.CreatedAt)) } fmt.Fprintf(w, "%s / %s\t\n", pipelineState(pipelineInfo.State), jobState(pipelineInfo.LastJobState)) }
c177396
fmt.Fprintf(w, "%s\t", workerStatus.Started.String()) } else { fmt.Fprintf(w, "%s\t", pretty.Ago(workerStatus.Started)) } fmt.Fprintf(w, "%d\t\n", workerStatus.QueueSize) }
c177397
.Stats.UploadTime}} Datum Timeout: {{.DatumTimeout}} Job Timeout: {{.JobTimeout}} Worker Status: {{workerStatus .}}Restarts: {{.Restart}} ParallelismSpec: {{.ParallelismSpec}} {{ if .ResourceRequests }}ResourceRequests: CPU: {{ .ResourceRequests.Cpu }} Memory: {{ .ResourceRequests.Memory }} {{end}} {{ if .ResourceLimits }}ResourceLimits: CPU: {{ .ResourceLimits.Cpu }} Memory: {{ .ResourceLimits.Memory }} {{ if .ResourceLimits.Gpu }}GPU: Type: {{ .ResourceLimits.Gpu.Type }} Number: {{ .ResourceLimits.Gpu.Number }} {{end}} {{end}} {{ if .Service }}Service: {{ if .Service.InternalPort }}InternalPort: {{ .Service.InternalPort }} {{end}} {{ if .Service.ExternalPort }}ExternalPort: {{ .Service.ExternalPort }} {{end}} {{end}}Input: {{jobInput .}} Transform: {{prettyTransform .Transform}} {{if .OutputCommit}} Output Commit: {{.OutputCommit.ID}} {{end}} {{ if .StatsCommit }} Stats Commit: {{.StatsCommit.ID}} {{end}} {{ if .Egress }} Egress: {{.Egress.URL}} {{end}} `) if err != nil { return err } err = template.Execute(os.Stdout, jobInfo) if err != nil { return err } return nil }
c177398
Number: {{ .ResourceLimits.Gpu.Number }} {{end}} {{end}} Datum Timeout: {{.DatumTimeout}} Job Timeout: {{.JobTimeout}} Input: {{pipelineInput .PipelineInfo}} {{ if .GithookURL }}Githook URL: {{.GithookURL}} {{end}} Output Branch: {{.OutputBranch}} Transform: {{prettyTransform .Transform}} {{ if .Egress }}Egress: {{.Egress.URL}} {{end}} {{if .RecentError}} Recent Error: {{.RecentError}} {{end}} Job Counts: {{jobCounts .JobCounts}} `) if err != nil { return err } err = template.Execute(os.Stdout, pipelineInfo) if err != nil { return err } return nil }
c177399
totalTime = units.HumanDuration(client.GetDatumTotalTime(datumInfo.Stats)) } fmt.Fprintf(w, "%s\t%s\t%s\n", datumInfo.Datum.ID, datumState(datumInfo.State), totalTime) }