internal/rosa: annotate blocked updates
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m47s
Test / Hakurei (push) Successful in 3m58s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m39s
Test / Flake checks (push) Successful in 1m22s
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m47s
Test / Hakurei (push) Successful in 3m58s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m39s
Test / Flake checks (push) Successful in 1m22s
These situations, while unfortunate, are inevitable at a larger scale. This change enables annotation and optional hiding of blocked updates. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -360,7 +360,10 @@ func main() {
|
||||
)
|
||||
|
||||
{
|
||||
var flagJobs int
|
||||
var (
|
||||
flagJobs int
|
||||
flagNoBlock bool
|
||||
)
|
||||
c.NewCommand("updates", command.UsageInternal, func([]string) error {
|
||||
var (
|
||||
errsMu sync.Mutex
|
||||
@@ -379,6 +382,11 @@ func main() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !flagNoBlock && meta.Blocked != "" {
|
||||
msg.Verbosef("%s is blocked: %s", meta.Name, meta.Blocked)
|
||||
continue
|
||||
}
|
||||
|
||||
v, err := meta.GetVersions(ctx)
|
||||
if err != nil {
|
||||
errsMu.Lock()
|
||||
@@ -419,9 +427,23 @@ func main() {
|
||||
&flagJobs,
|
||||
"j", command.IntFlag(32),
|
||||
"Maximum number of simultaneous connections",
|
||||
).Flag(
|
||||
&flagNoBlock,
|
||||
"ignore-block", command.BoolFlag(false),
|
||||
"Inhibit update blocking",
|
||||
)
|
||||
}
|
||||
|
||||
c.NewCommand("blocked", command.UsageInternal, func([]string) error {
|
||||
for _, p := range rosa.Native().CollectAll() {
|
||||
meta, _ := rosa.Native().Std().Load(p)
|
||||
if meta.Blocked != "" {
|
||||
fmt.Printf("%s: %s\n", meta.Name, meta.Blocked)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
c.NewCommand(
|
||||
"daemon",
|
||||
"Service artifact IR with Rosa OS extensions",
|
||||
|
||||
Reference in New Issue
Block a user