Skip to content

Commit

Permalink
Merge branch 'master' into rgl-fix-docker-compose-boots-ports
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobweinstock authored Jun 22, 2021
2 parents b45f465 + 1808ad6 commit b7def80
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@

This repository is [Experimental](https://github.com/packethost/standards/blob/master/experimental-statement.md) meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.

## License

Tinkerbell is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text. Some of the projects used by the Tinkerbell project may be governed by a different license, please refer to its specific license.

Tinkerbell is part of the CNCF Projects.

[![CNCF](https://github.com/cncf/artwork/blob/master/other/cncf/horizontal/color/cncf-color.png)](https://landscape.cncf.io/?selected=tinkerbell)

## Community

The Tinkerbell community meets bi-weekly on Tuesday. The meeting details can be found [here][7].

Community Resources:

- [Community Slack](https://eqix-metal-community.slack.com/)
- [CNCF #tinkerbell](https://app.slack.com/client/T08PSQ7BQ/C01SRB41GMT)
- [YouTube Channel (demos, meeting recordings, virtual meetups)](https://www.youtube.com/channel/UCTzWInTQPvzH21KHS8jrq7A/featured)

## What's Powering Tinkerbell?

The Tinkerbell stack consists of several microservices, and a gRPC API:
Expand Down Expand Up @@ -60,3 +78,4 @@ For complete documentation, please visit the Tinkerbell project hosted at [tinke
[4]: https://github.com/tinkerbell/osie
[5]: https://github.com/tinkerbell/hook
[6]: https://github.com/tinkerbell/pbnj
[7]: https://docs.google.com/document/d/1cEObfvQ9Tdp8zIIIg9O7P5i3CKaSj2t3JTxEufDxwWs/
10 changes: 5 additions & 5 deletions db/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"fmt"
"time"

"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/google/uuid"
"github.com/pkg/errors"
tb "github.com/tinkerbell/tink/protos/template"
wflow "github.com/tinkerbell/tink/workflow"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
)

// CreateTemplate creates a new workflow template
Expand Down Expand Up @@ -83,8 +83,8 @@ func (d TinkDB) GetTemplate(ctx context.Context, fields map[string]string, delet
)
err = row.Scan(&id, &name, &data, &createdAt, &updatedAt)
if err == nil {
crAt, _ := ptypes.TimestampProto(createdAt)
upAt, _ := ptypes.TimestampProto(updatedAt)
crAt := timestamppb.New(createdAt)
upAt := timestamppb.New(updatedAt)
return &tb.WorkflowTemplate{
Id: id,
Name: name,
Expand Down Expand Up @@ -160,8 +160,8 @@ func (d TinkDB) ListTemplates(filter string, fn func(id, n string, in, del *time
return err
}

tCr, _ := ptypes.TimestampProto(createdAt)
tUp, _ := ptypes.TimestampProto(updatedAt)
tCr := timestamppb.New(createdAt)
tUp := timestamppb.New(updatedAt)
err = fn(id, name, tCr, tUp)
if err != nil {
return err
Expand Down
12 changes: 6 additions & 6 deletions db/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"strings"
"time"

"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/google/uuid"
"github.com/pkg/errors"
pb "github.com/tinkerbell/tink/protos/workflow"
wflow "github.com/tinkerbell/tink/workflow"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
)

// Workflow represents a workflow instance in database
Expand Down Expand Up @@ -351,8 +351,8 @@ func (d TinkDB) GetWorkflow(ctx context.Context, id string) (Workflow, error) {
)
err := row.Scan(&tmp, &tar, &crAt, &upAt)
if err == nil {
createdAt, _ := ptypes.TimestampProto(crAt)
updatedAt, _ := ptypes.TimestampProto(upAt)
createdAt := timestamppb.New(crAt)
updatedAt := timestamppb.New(upAt)
return Workflow{
ID: id,
Template: tmp,
Expand Down Expand Up @@ -449,8 +449,8 @@ func (d TinkDB) ListWorkflows(fn func(wf Workflow) error) error {
Template: tmp,
Hardware: tar,
}
wf.CreatedAt, _ = ptypes.TimestampProto(crAt)
wf.UpdatedAt, _ = ptypes.TimestampProto(upAt)
wf.CreatedAt = timestamppb.New(crAt)
wf.UpdatedAt = timestamppb.New(upAt)
err = fn(wf)
if err != nil {
return err
Expand Down Expand Up @@ -645,7 +645,7 @@ func (d TinkDB) ShowWorkflowEvents(wfID string, fn func(wfs *pb.WorkflowActionSt
d.logger.Error(err)
return err
}
createdAt, _ := ptypes.TimestampProto(evTime)
createdAt := timestamppb.New(evTime)
wfs := &pb.WorkflowActionStatus{
WorkerId: id,
TaskName: tName,
Expand Down

0 comments on commit b7def80

Please sign in to comment.