Skip to content

Commit

Permalink
fix(GenerateDAG): new algorithm and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Gelloz committed Oct 15, 2024
1 parent da3b77a commit e7f0f28
Show file tree
Hide file tree
Showing 31 changed files with 600 additions and 463 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/aws/aws-sdk-go-v2 v1.32.1
github.com/aws/aws-sdk-go-v2/config v1.27.42
github.com/aws/aws-sdk-go-v2/service/s3 v1.65.1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/docker/cli v27.3.1+incompatible
github.com/google/uuid v1.6.0
github.com/mholt/archiver/v3 v3.5.1
Expand Down Expand Up @@ -58,7 +59,6 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v26.1.1+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions pkg/dag/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ type Image struct {
ExtraTags []string `yaml:"extra_tags,flow,omitempty"`
Dockerfile *dockerfile.Dockerfile `yaml:"dockerfile,omitempty"`
IgnorePatterns []string `yaml:"ignore_patterns,flow,omitempty"`
ContextFiles []string `yaml:"-"`
SkipBuild bool `yaml:"-"`
NeedsRebuild bool `yaml:"-"`
NeedsTests bool `yaml:"-"`
RetagDone bool `yaml:"-"`
Expand Down
5 changes: 0 additions & 5 deletions pkg/dag/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type NodeVisitorFuncErr func(*Node) error
// Node represents a node of a graph.
type Node struct {
Image *Image
Files []string

waitCond *sync.Cond
done bool
Expand Down Expand Up @@ -96,7 +95,3 @@ func (n *Node) walkInDepth(visitor NodeVisitorFunc) {
}
visitor(n)
}

func (n *Node) AddFile(file string) {
n.Files = append(n.Files, file)
}
Loading

0 comments on commit e7f0f28

Please sign in to comment.