Skip to content

Commit

Permalink
chore: fix typo vertex (#1799)
Browse files Browse the repository at this point in the history
* chore: fix typo vertex

Signed-off-by: Keming <kemingyang@tensorchord.ai>

* fix build

Signed-off-by: Keming <kemingyang@tensorchord.ai>

---------

Signed-off-by: Keming <kemingyang@tensorchord.ai>
  • Loading branch information
kemingy committed Nov 30, 2023
1 parent 5328b3a commit b99a180
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling with custom config file
uses: crate-ci/typos@v1.16.21
uses: crate-ci/typos@v1.16.23
with:
config: ./typos.toml
lint:
Expand Down
12 changes: 6 additions & 6 deletions pkg/progress/progressui/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ type trace struct {
w io.Writer
startTime *time.Time
localTimeDiff time.Duration
vertexes []*vertex
vertices []*vertex
byDigest map[digest.Digest]*vertex
updates map[digest.Digest]struct{}
modeConsole bool
Expand Down Expand Up @@ -378,7 +378,7 @@ func newTrace(w io.Writer, modeConsole bool) *trace {

func (t *trace) warnings() []client.VertexWarning {
var out []client.VertexWarning
for _, v := range t.vertexes {
for _, v := range t.vertices {
out = append(out, v.warnings...)
}
return out
Expand Down Expand Up @@ -478,7 +478,7 @@ func (t *trace) update(s *client.SolveStatus, termWidth int) {
if t.localTimeDiff == 0 {
t.localTimeDiff = time.Since(*v.Started)
}
t.vertexes = append(t.vertexes, t.byDigest[v.Digest])
t.vertices = append(t.vertices, t.byDigest[v.Digest])
}
// allow a duplicate initial vertex that shouldn't reset state
if !(prev != nil && prev.isStarted() && v.Started == nil) {
Expand Down Expand Up @@ -509,7 +509,7 @@ func (t *trace) update(s *client.SolveStatus, termWidth int) {
continue
}
if newlyRevealed {
t.vertexes = append(t.vertexes, group.vertex)
t.vertices = append(t.vertices, group.vertex)
}
if changed {
group.update(1)
Expand Down Expand Up @@ -584,7 +584,7 @@ func (t *trace) update(s *client.SolveStatus, termWidth int) {
}

func (t *trace) printErrorLogs(f io.Writer) {
for _, v := range t.vertexes {
for _, v := range t.vertices {
if v.Error != "" && !strings.HasSuffix(v.Error, context.Canceled.Error()) {
fmt.Fprintln(f, "------")
fmt.Fprintf(f, " > %s:\n", v.Name)
Expand Down Expand Up @@ -625,7 +625,7 @@ func (t *trace) displayInfo() (d displayInfo) {
}
}

for _, v := range t.vertexes {
for _, v := range t.vertices {
if v.jobCached {
d.jobs = append(d.jobs, v.jobs...)
continue
Expand Down
2 changes: 1 addition & 1 deletion pkg/progress/progressui/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (p *textMux) print(t *trace) {
}
}

// fair split between vertexes
// fair split between vertices
if 1.0/(1.0-stats[current].share)*antiFlicker.Seconds() < stats[current].blockTime.Seconds() {
p.printVtx(t, max)
return
Expand Down
2 changes: 2 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ extend-exclude = ["CHANGELOG.md", "go.mod", "go.sum"]
[default.extend-words]
iterm = "iterm"
WRONLY = "WRONLY"
# this typo is introduced in the upstream library
vertexes = "vertexes"

0 comments on commit b99a180

Please sign in to comment.