detached 38090f1

build(deps): bump ermite-api to the merged run name; log unreadable registered workflow names at debug

commit
38090f16af867192017f80551bb50e22c92ca5f5
author
brice · · 2026-10-13 03:51 UTC
parent
20985cc
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +36 -15
M go.mod +1 -1
@@ -13,7 +13,7 @@ tool (
1313
1414 require (
1515 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1
16- bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af445
16+ bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6
1717 bnema.dev/ermite-git v0.1.0
1818 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c3
1919 connectrpc.com/connect v1.21.0
@@ -13,7 +13,7 @@ tool (
13 13
14 require (14 require (
15 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d115 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1
16- bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af44516+ bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6
17 bnema.dev/ermite-git v0.1.017 bnema.dev/ermite-git v0.1.0
18 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c318 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c3
19 connectrpc.com/connect v1.21.019 connectrpc.com/connect v1.21.0
M go.sum +2 -2
@@ -1,7 +1,7 @@
11 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1 h1:Hlhzfg9MoJLU7At9TBl4Vz0RkEI3+cY7dwLD2QzpRJw=
22 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1/go.mod h1:qoIB/Iz4xKdLUG4R6wuBDk6cemdugR+UEo5bpSJJYh4=
3-bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af445 h1:2/CnA0nZs7mTBqN1hN7WbNuvCp57S6wd7olJDC9253w=
4-bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af445/go.mod h1:L5smjt+IAigyAo3Ny2EnFB9IwvIGOPT1GoByZNgbDa8=
3+bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6 h1:S7Zk7maQJoOUxY2BU4CKeAaWorDOhNXGw7sbT76Yft8=
4+bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6/go.mod h1:L5smjt+IAigyAo3Ny2EnFB9IwvIGOPT1GoByZNgbDa8=
55 bnema.dev/ermite-git v0.1.0 h1:8GNhQDj0MxyvrI4kHewZ9k0rT86e9348T3BJ49WHfmI=
66 bnema.dev/ermite-git v0.1.0/go.mod h1:m9d4VYHm28mrY6VxVqWQMRIsadGq80FeLub/nrZX6Cg=
77 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c3 h1:PVTDOWTg9JJZrnJznTHSCB1Vcc+x2n6zMgZkKiFwvuw=
@@ -1,7 +1,7 @@
1 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1 h1:Hlhzfg9MoJLU7At9TBl4Vz0RkEI3+cY7dwLD2QzpRJw=1 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1 h1:Hlhzfg9MoJLU7At9TBl4Vz0RkEI3+cY7dwLD2QzpRJw=
2 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1/go.mod h1:qoIB/Iz4xKdLUG4R6wuBDk6cemdugR+UEo5bpSJJYh4=2 bnema.dev/ermite-actions v0.0.0-20261013033114-44b8f3fa08d1/go.mod h1:qoIB/Iz4xKdLUG4R6wuBDk6cemdugR+UEo5bpSJJYh4=
3-bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af445 h1:2/CnA0nZs7mTBqN1hN7WbNuvCp57S6wd7olJDC9253w=3+bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6 h1:S7Zk7maQJoOUxY2BU4CKeAaWorDOhNXGw7sbT76Yft8=
4-bnema.dev/ermite-api v0.0.0-20261013033228-5a86d44af445/go.mod h1:L5smjt+IAigyAo3Ny2EnFB9IwvIGOPT1GoByZNgbDa8=4+bnema.dev/ermite-api v0.0.0-20261013034722-4db3b8badaf6/go.mod h1:L5smjt+IAigyAo3Ny2EnFB9IwvIGOPT1GoByZNgbDa8=
5 bnema.dev/ermite-git v0.1.0 h1:8GNhQDj0MxyvrI4kHewZ9k0rT86e9348T3BJ49WHfmI=5 bnema.dev/ermite-git v0.1.0 h1:8GNhQDj0MxyvrI4kHewZ9k0rT86e9348T3BJ49WHfmI=
6 bnema.dev/ermite-git v0.1.0/go.mod h1:m9d4VYHm28mrY6VxVqWQMRIsadGq80FeLub/nrZX6Cg=6 bnema.dev/ermite-git v0.1.0/go.mod h1:m9d4VYHm28mrY6VxVqWQMRIsadGq80FeLub/nrZX6Cg=
7 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c3 h1:PVTDOWTg9JJZrnJznTHSCB1Vcc+x2n6zMgZkKiFwvuw=7 bnema.dev/ermite-kv v0.0.0-20261010031554-5e09b48f81c3 h1:PVTDOWTg9JJZrnJznTHSCB1Vcc+x2n6zMgZkKiFwvuw=
M internal/usecase/ci_trigger.go +33 -12
@@ -477,36 +477,57 @@ func workflowName(wf *workflow.Workflow, path string) string {
477477
478478 // registeredName is the name GitHub shows for a tag run without run-name: the
479479 // name of the workflow registered for the path, here the "name:" of the file on
480-// the default branch (the path when that file has none). It is own, the name of
481-// the workflow of the run, when the default branch has no such file, the file
482-// does not parse, or anything cannot be read.
480+// the default branch (the path when that file has none). It falls back to own,
481+// the name of the workflow of the run, when the default branch has no such
482+// file, the file does not parse, or anything cannot be read; a failure other
483+// than a missing file is logged at debug.
483484 func (c *CI) registeredName(ctx context.Context, repo domain.RepoName, wfPath, own string) string {
484- def, exists, err := c.cfg.Repos.DefaultBranch(ctx, repo)
485- if err != nil || !exists {
485+ name, err := c.registeredNameOf(ctx, repo, wfPath)
486+ if err != nil {
487+ if !errors.Is(err, domain.ErrNotFound) {
488+ log := zerowrap.FromCtx(ctx)
489+ log.Debug().Err(err).Str("workflow", wfPath).Msg("ci tag run title: the registered workflow name is not readable, using the run's own")
490+ }
486491 return own
487492 }
493+ return name
494+}
495+
496+// registeredNameOf is registeredName without the fallback; a missing default
497+// branch or file is domain.ErrNotFound.
498+func (c *CI) registeredNameOf(ctx context.Context, repo domain.RepoName, wfPath string) (string, error) {
499+ def, exists, err := c.cfg.Repos.DefaultBranch(ctx, repo)
500+ if err != nil {
501+ return "", err
502+ }
503+ if !exists {
504+ return "", domain.ErrNotFound
505+ }
488506 tip, err := c.cfg.Git.BranchHead(ctx, repo, def)
489507 if err != nil {
490- return own
508+ return "", err
491509 }
492510 tp, err := domain.ParseTreePath(wfPath)
493511 if err != nil {
494- return own
512+ return "", err
495513 }
496514 _, rc, err := c.cfg.Reader.OpenBlob(ctx, repo, domain.RevisionOf(tip), tp)
497515 if err != nil {
498- return own
516+ return "", err
499517 }
500518 content, err := io.ReadAll(io.LimitReader(rc, maxCIWorkflowBytes+1))
501519 _ = rc.Close()
502- if err != nil || len(content) > maxCIWorkflowBytes {
503- return own
520+ if err != nil {
521+ return "", err
522+ }
523+ if len(content) > maxCIWorkflowBytes {
524+ return "", fmt.Errorf("workflow file over %d bytes", maxCIWorkflowBytes)
504525 }
505526 wf, errs := workflow.Parse(wfPath, content)
506527 if len(errs) > 0 {
507- return own
528+ return "", fmt.Errorf("workflow does not parse: %v", errs[0])
508529 }
509- return workflowName(wf, wfPath)
530+ return workflowName(wf, wfPath), nil
510531 }
511532
512533 // evalRunName evaluates the run-name of a workflow with the github, inputs and
@@ -477,36 +477,57 @@ func workflowName(wf *workflow.Workflow, path string) string {
477 477
478 // registeredName is the name GitHub shows for a tag run without run-name: the478 // registeredName is the name GitHub shows for a tag run without run-name: the
479 // name of the workflow registered for the path, here the "name:" of the file on479 // name of the workflow registered for the path, here the "name:" of the file on
480-// the default branch (the path when that file has none). It is own, the name of480+// the default branch (the path when that file has none). It falls back to own,
481-// the workflow of the run, when the default branch has no such file, the file481+// the name of the workflow of the run, when the default branch has no such
482-// does not parse, or anything cannot be read.482+// file, the file does not parse, or anything cannot be read; a failure other
483+// than a missing file is logged at debug.
483 func (c *CI) registeredName(ctx context.Context, repo domain.RepoName, wfPath, own string) string {484 func (c *CI) registeredName(ctx context.Context, repo domain.RepoName, wfPath, own string) string {
484- def, exists, err := c.cfg.Repos.DefaultBranch(ctx, repo)485+ name, err := c.registeredNameOf(ctx, repo, wfPath)
485- if err != nil || !exists {486+ if err != nil {
487+ if !errors.Is(err, domain.ErrNotFound) {
488+ log := zerowrap.FromCtx(ctx)
489+ log.Debug().Err(err).Str("workflow", wfPath).Msg("ci tag run title: the registered workflow name is not readable, using the run's own")
490+ }
486 return own491 return own
487 }492 }
493+ return name
494+}
495+
496+// registeredNameOf is registeredName without the fallback; a missing default
497+// branch or file is domain.ErrNotFound.
498+func (c *CI) registeredNameOf(ctx context.Context, repo domain.RepoName, wfPath string) (string, error) {
499+ def, exists, err := c.cfg.Repos.DefaultBranch(ctx, repo)
500+ if err != nil {
501+ return "", err
502+ }
503+ if !exists {
504+ return "", domain.ErrNotFound
505+ }
488 tip, err := c.cfg.Git.BranchHead(ctx, repo, def)506 tip, err := c.cfg.Git.BranchHead(ctx, repo, def)
489 if err != nil {507 if err != nil {
490- return own508+ return "", err
491 }509 }
492 tp, err := domain.ParseTreePath(wfPath)510 tp, err := domain.ParseTreePath(wfPath)
493 if err != nil {511 if err != nil {
494- return own512+ return "", err
495 }513 }
496 _, rc, err := c.cfg.Reader.OpenBlob(ctx, repo, domain.RevisionOf(tip), tp)514 _, rc, err := c.cfg.Reader.OpenBlob(ctx, repo, domain.RevisionOf(tip), tp)
497 if err != nil {515 if err != nil {
498- return own516+ return "", err
499 }517 }
500 content, err := io.ReadAll(io.LimitReader(rc, maxCIWorkflowBytes+1))518 content, err := io.ReadAll(io.LimitReader(rc, maxCIWorkflowBytes+1))
501 _ = rc.Close()519 _ = rc.Close()
502- if err != nil || len(content) > maxCIWorkflowBytes {520+ if err != nil {
503- return own521+ return "", err
522+ }
523+ if len(content) > maxCIWorkflowBytes {
524+ return "", fmt.Errorf("workflow file over %d bytes", maxCIWorkflowBytes)
504 }525 }
505 wf, errs := workflow.Parse(wfPath, content)526 wf, errs := workflow.Parse(wfPath, content)
506 if len(errs) > 0 {527 if len(errs) > 0 {
507- return own528+ return "", fmt.Errorf("workflow does not parse: %v", errs[0])
508 }529 }
509- return workflowName(wf, wfPath)530+ return workflowName(wf, wfPath), nil
510 }531 }
511 532
512 // evalRunName evaluates the run-name of a workflow with the github, inputs and533 // evalRunName evaluates the run-name of a workflow with the github, inputs and

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 42

↑↓ moveenter openesc close