From e1ff7afa4bd29f8d7b394631873f1aa697b4e582 Mon Sep 17 00:00:00 2001 From: Thanatat Tamtan Date: Wed, 2 Sep 2026 15:03:23 +0700 Subject: [PATCH 1/4] Add metricsource commands and custom alert targets deploys metricsource set/get/list/delete/series/query for Prometheus scrape sources (SPEC-metric-alerts.md Phase 2). Set is a full upsert. alert create/update grow -kind/-source/-series and accept value|rate metrics for kind=custom. Update-merge seeds Kind/Source/Series from get. Pin api to 039b9e7c254328051faddb210ad58980b5ceb890. --- go.mod | 2 +- go.sum | 4 +- internal/runner/alert.go | 57 ++++++++++++++++--- internal/runner/alert_test.go | 54 ++++++++++++++++++ internal/runner/help.go | 16 +++++- internal/runner/help_test.go | 3 + internal/runner/metricsource.go | 84 ++++++++++++++++++++++++++++ internal/runner/metricsource_test.go | 34 +++++++++++ internal/runner/runner.go | 2 + 9 files changed, 242 insertions(+), 14 deletions(-) create mode 100644 internal/runner/metricsource.go create mode 100644 internal/runner/metricsource_test.go diff --git a/go.mod b/go.mod index 9fb3e0d..a1e07a1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploys-app/deploys go 1.27.0 require ( - github.com/deploys-app/api v0.0.0-20260902050821-02959c8ba9ca + github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543 github.com/moonrhythm/toon v0.0.0-20260702100246-6fcdad0a6a12 golang.org/x/mod v0.37.0 golang.org/x/oauth2 v0.14.0 diff --git a/go.sum b/go.sum index cbdee0d..a670f6a 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:W github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploys-app/api v0.0.0-20260902050821-02959c8ba9ca h1:0hWen3W//N1+F/haVxmqyQrUyUZtBfw+u/8jVT/xHVA= -github.com/deploys-app/api v0.0.0-20260902050821-02959c8ba9ca/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= +github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543 h1:BGDsSBSm2x5J4YoQJPhS0l5yDMBqgAaRwk4oRpI5SNs= +github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/internal/runner/alert.go b/internal/runner/alert.go index 5588c03..d9c6a83 100644 --- a/internal/runner/alert.go +++ b/internal/runner/alert.go @@ -7,7 +7,13 @@ import ( "github.com/deploys-app/api" ) -const alertOpFlagHelp = "comparison operator: >=, <=, gte, or lte (default >=; quote '>=' / '<=' in shells)" +const ( + alertOpFlagHelp = "comparison operator: '>=', '<=', gte, or lte (default '>='; quote '>=' / '<=' in shells)" + alertKindFlagHelp = "target kind: deployment or custom (empty = deployment)" + alertMetricFlagHelp = "metric to watch: cpu, memory, requests, or egress (kind=deployment); value or rate (kind=custom)" + alertSourceFlagHelp = "metric source name (kind=custom)" + alertSeriesFlagHelp = "series key (kind=custom)" +) func (rn Runner) alert(args ...string) error { if len(args) == 0 || IsHelpArg(args[0]) { @@ -43,16 +49,20 @@ func (rn Runner) alert(args ...string) error { var req api.AlertCreate f.StringVar(&req.Project, "project", "", "project id") f.StringVar(&req.Name, "name", "", "alert rule name") - f.StringVar(&req.Target.Location, "location", "", "target location") - f.StringVar(&req.Target.Deployment, "deployment", "", "target deployment name") - f.StringVar(&req.Condition.Metric, "metric", "", "metric to watch: cpu, memory, requests, or egress") + f.StringVar(&req.Target.Kind, "kind", "", alertKindFlagHelp) + f.StringVar(&req.Target.Location, "location", "", "target location (kind=deployment)") + f.StringVar(&req.Target.Deployment, "deployment", "", "target deployment name (kind=deployment)") + f.StringVar(&req.Target.Source, "source", "", alertSourceFlagHelp) + f.StringVar(&req.Target.Series, "series", "", alertSeriesFlagHelp) + f.StringVar(&req.Condition.Metric, "metric", "", alertMetricFlagHelp) f.StringVar(&req.Condition.Op, "op", "", alertOpFlagHelp) - f.Float64Var(&req.Condition.Threshold, "threshold", 0, "threshold value (percent 0-100 for cpu/memory, req/min for requests, bytes/min for egress)") + f.Float64Var(&req.Condition.Threshold, "threshold", 0, "threshold value (percent 0-100 for cpu/memory, req/min for requests, bytes/min for egress, gauge for value, per-minute increase for rate)") f.IntVar(&req.Condition.ForMinutes, "for", 0, "minutes the condition must hold continuously (1-60)") f.IntVar(&req.RenotifyMinutes, "renotify", 0, "minutes between re-notifications while still firing (0 = disabled)") f.BoolVar(&req.Disabled, "disabled", false, "create the rule disabled") f.Parse(args[1:]) req.Condition.Op = normalizeAlertOp(req.Condition.Op) + applyAlertTargetKind(&req.Target) resp, err = s.Create(context.Background(), &req) case "update": @@ -62,8 +72,11 @@ func (rn Runner) alert(args ...string) error { // before applying overrides. var ( req api.AlertUpdate + kind string location string deployment string + source string + series string metric string op string threshold float64 @@ -73,11 +86,14 @@ func (rn Runner) alert(args ...string) error { ) f.StringVar(&req.Project, "project", "", "project id") f.StringVar(&req.Name, "name", "", "alert rule name") - f.StringVar(&location, "location", "", "target location") - f.StringVar(&deployment, "deployment", "", "target deployment name") - f.StringVar(&metric, "metric", "", "metric to watch: cpu, memory, requests, or egress") + f.StringVar(&kind, "kind", "", alertKindFlagHelp) + f.StringVar(&location, "location", "", "target location (kind=deployment)") + f.StringVar(&deployment, "deployment", "", "target deployment name (kind=deployment)") + f.StringVar(&source, "source", "", alertSourceFlagHelp) + f.StringVar(&series, "series", "", alertSeriesFlagHelp) + f.StringVar(&metric, "metric", "", alertMetricFlagHelp) f.StringVar(&op, "op", "", alertOpFlagHelp) - f.Float64Var(&threshold, "threshold", 0, "threshold value (percent 0-100 for cpu/memory, req/min for requests, bytes/min for egress)") + f.Float64Var(&threshold, "threshold", 0, "threshold value (percent 0-100 for cpu/memory, req/min for requests, bytes/min for egress, gauge for value, per-minute increase for rate)") f.IntVar(&forMin, "for", 0, "minutes the condition must hold continuously (1-60)") f.IntVar(&renotify, "renotify", 0, "minutes between re-notifications while still firing (0 = disabled)") f.BoolVar(&disabled, "disabled", false, "disable the rule") @@ -95,12 +111,21 @@ func (rn Runner) alert(args ...string) error { req.RenotifyMinutes = cur.RenotifyMinutes req.Disabled = cur.Disabled + if set["kind"] { + req.Target.Kind = kind + } if set["location"] { req.Target.Location = location } if set["deployment"] { req.Target.Deployment = deployment } + if set["source"] { + req.Target.Source = source + } + if set["series"] { + req.Target.Series = series + } if set["metric"] { req.Condition.Metric = metric } @@ -119,6 +144,7 @@ func (rn Runner) alert(args ...string) error { if set["disabled"] { req.Disabled = disabled } + applyAlertTargetKind(&req.Target) resp, err = s.Update(context.Background(), &req) case "delete": @@ -142,6 +168,19 @@ func (rn Runner) alert(args ...string) error { return rn.print(resp) } +// applyAlertTargetKind enforces the API shape after flags are applied: kind=custom +// requires Location/Deployment empty; kind=deployment (or empty) requires Source/ +// Series empty. Empty Kind is left empty (the API treats it as deployment). +func applyAlertTargetKind(t *api.AlertTarget) { + if t.Kind == api.AlertTargetKindCustom { + t.Location = "" + t.Deployment = "" + return + } + t.Source = "" + t.Series = "" +} + // normalizeAlertOp maps CLI-friendly aliases to the API operators. // Shells treat unquoted >= and <= as redirections, so gte/lte are accepted too. func normalizeAlertOp(op string) string { diff --git a/internal/runner/alert_test.go b/internal/runner/alert_test.go index aaf4450..41f180c 100644 --- a/internal/runner/alert_test.go +++ b/internal/runner/alert_test.go @@ -43,3 +43,57 @@ func TestAlertCreateHelpMentionsShellSafeOp(t *testing.T) { } } } + +func TestAlertCreateHelpMentionsKindAndSource(t *testing.T) { + c := lookupCommand("alert") + if c == nil { + t.Fatal("alert group missing") + } + sub := c.lookupSub("create") + if sub == nil { + t.Fatal("alert create missing") + } + for _, want := range []string{"kind", "source", "value", "rate"} { + if !strings.Contains(sub.args, want) { + t.Errorf("create args %q missing %q", sub.args, want) + } + } +} + +func TestApplyAlertTargetKind(t *testing.T) { + custom := api.AlertTarget{ + Kind: api.AlertTargetKindCustom, + Location: "gke.cluster-rcf2", + Deployment: "web", + Source: "app", + Series: `queue_depth{queue="email"}`, + } + applyAlertTargetKind(&custom) + if custom.Kind != api.AlertTargetKindCustom { + t.Errorf("custom kind = %q; want %q", custom.Kind, api.AlertTargetKindCustom) + } + if custom.Location != "" || custom.Deployment != "" { + t.Errorf("custom target kept deployment fields: %+v", custom) + } + if custom.Source != "app" || custom.Series != `queue_depth{queue="email"}` { + t.Errorf("custom target dropped source/series: %+v", custom) + } + + dep := api.AlertTarget{ + Kind: "", + Location: "gke.cluster-rcf2", + Deployment: "web", + Source: "app", + Series: `queue_depth{queue="email"}`, + } + applyAlertTargetKind(&dep) + if dep.Kind != "" { + t.Errorf("empty kind rewritten to %q; want empty", dep.Kind) + } + if dep.Location != "gke.cluster-rcf2" || dep.Deployment != "web" { + t.Errorf("deployment target dropped location/deployment: %+v", dep) + } + if dep.Source != "" || dep.Series != "" { + t.Errorf("deployment target kept custom fields: %+v", dep) + } +} diff --git a/internal/runner/help.go b/internal/runner/help.go index 8b58a01..27f215d 100644 --- a/internal/runner/help.go +++ b/internal/runner/help.go @@ -380,11 +380,23 @@ var commands = []command{ {name: "pull", args: "-name [-ack -limit -follow -poll -interval]", short: "fetch a pull channel's change events (ack to advance; -follow streams over SSE)"}, }, }, + { + name: "metricsource", + short: "Prometheus scrape sources for custom metrics and alerts", + subs: []subcommand{ + {name: "set", args: "-name -location -deployment -port [-path /metrics -disabled]", short: "create or replace a scrape source"}, + {name: "get", args: "-name", short: "show a scrape source"}, + {name: "list", short: "list scrape sources"}, + {name: "delete", args: "-name", short: "delete a scrape source"}, + {name: "series", args: "-name", short: "list discovered series for a scrape source"}, + {name: "query", args: "-name [-series s] [-timerange 1h|6h|12h|1d|7d|30d]", short: "query series for a scrape source"}, + }, + }, { name: "alert", - short: "metric alert rules on a deployment's CPU, memory, requests, or egress", + short: "metric alert rules on a deployment or a custom metric source", subs: []subcommand{ - {name: "create", args: "-name -location -deployment -metric cpu|memory|requests|egress -threshold n -for n [-op gte|lte|'>='|'<=' -renotify n -disabled]", short: "create a metric alert rule"}, + {name: "create", args: "-name [-kind deployment|custom] [-location -deployment | -source -series] -metric cpu|memory|requests|egress|value|rate -threshold n -for n [-op gte|lte|'>='|'<=' -renotify n -disabled]", short: "create a metric alert rule"}, {name: "get", args: "-name", short: "show an alert rule"}, {name: "list", short: "list alert rules"}, {name: "update", args: "-name [flags]", short: "update an alert rule (omitted flags are preserved)"}, diff --git a/internal/runner/help_test.go b/internal/runner/help_test.go index 1c3d7db..ca8169e 100644 --- a/internal/runner/help_test.go +++ b/internal/runner/help_test.go @@ -128,6 +128,9 @@ func TestRunHelpNeedsNoAPI(t *testing.T) { {[]string{"alert"}, "Subcommands:"}, {[]string{"alert", "help"}, "metric alert rules"}, {[]string{"alert", "-h"}, "metric alert rules"}, + {[]string{"metricsource"}, "Subcommands:"}, + {[]string{"metricsource", "help"}, "Prometheus scrape sources"}, + {[]string{"metricsource", "-h"}, "Prometheus scrape sources"}, } for _, tc := range cases { if err := tmp.Truncate(0); err != nil { diff --git a/internal/runner/metricsource.go b/internal/runner/metricsource.go new file mode 100644 index 0000000..57abc6e --- /dev/null +++ b/internal/runner/metricsource.go @@ -0,0 +1,84 @@ +package runner + +import ( + "context" + + "github.com/deploys-app/api" +) + +func (rn Runner) metricSource(args ...string) error { + if len(args) == 0 || IsHelpArg(args[0]) { + return rn.groupUsage("metricsource") + } + + s := rn.API.MetricSource() + + var ( + resp any + err error + ) + + f := rn.subFlagSet("metricsource", args[0]) + switch args[0] { + default: + return rn.unknownSub("metricsource", args[0]) + + case "set": + var req api.MetricSourceSet + f.StringVar(&req.Project, "project", "", "project id") + f.StringVar(&req.Name, "name", "", "metric source name") + f.StringVar(&req.Location, "location", "", "location") + f.StringVar(&req.Deployment, "deployment", "", "deployment to scrape") + f.IntVar(&req.Port, "port", 0, "scrape port") + f.StringVar(&req.Path, "path", "/metrics", "scrape path (must start with /)") + f.BoolVar(&req.Disabled, "disabled", false, "disable scraping") + f.Parse(args[1:]) + resp, err = s.Set(context.Background(), &req) + + case "get": + var req api.MetricSourceGet + f.StringVar(&req.Project, "project", "", "project id") + f.StringVar(&req.Name, "name", "", "metric source name") + f.Parse(args[1:]) + resp, err = s.Get(context.Background(), &req) + + case "list": + var req api.MetricSourceList + f.StringVar(&req.Project, "project", "", "project id") + f.Parse(args[1:]) + resp, err = s.List(context.Background(), &req) + + case "delete": + var req api.MetricSourceDelete + f.StringVar(&req.Project, "project", "", "project id") + f.StringVar(&req.Name, "name", "", "metric source name") + f.Parse(args[1:]) + resp, err = s.Delete(context.Background(), &req) + + case "series": + var req api.MetricSourceSeries + f.StringVar(&req.Project, "project", "", "project id") + f.StringVar(&req.Name, "name", "", "metric source name") + f.Parse(args[1:]) + resp, err = s.Series(context.Background(), &req) + + case "query": + var ( + req api.MetricSourceQuery + series multiFlag + timeRange string + ) + f.StringVar(&req.Project, "project", "", "project id") + f.StringVar(&req.Name, "name", "", "metric source name") + f.Var(&series, "series", "series key (repeatable; omit to let the server pick)") + f.StringVar(&timeRange, "timerange", "1h", "time range (1h, 6h, 12h, 1d, 7d, 30d)") + f.Parse(args[1:]) + req.Series = series + req.TimeRange = timeRange + resp, err = s.Query(context.Background(), &req) + } + if err != nil { + return err + } + return rn.print(resp) +} diff --git a/internal/runner/metricsource_test.go b/internal/runner/metricsource_test.go new file mode 100644 index 0000000..5cb0e81 --- /dev/null +++ b/internal/runner/metricsource_test.go @@ -0,0 +1,34 @@ +package runner + +import ( + "strings" + "testing" +) + +func TestMetricSourceHelp(t *testing.T) { + c := lookupCommand("metricsource") + if c == nil { + t.Fatal("metricsource group missing") + } + for _, name := range []string{"set", "get", "list", "delete", "series", "query"} { + if c.lookupSub(name) == nil { + t.Errorf("metricsource missing subcommand %q", name) + } + } + query := c.lookupSub("query") + if query == nil { + t.Fatal("metricsource query missing") + } + if !strings.Contains(query.args, "timerange") { + t.Errorf("query args %q missing timerange", query.args) + } + set := c.lookupSub("set") + if set == nil { + t.Fatal("metricsource set missing") + } + for _, want := range []string{"location", "deployment", "port", "path"} { + if !strings.Contains(set.args, want) { + t.Errorf("set args %q missing %q", set.args, want) + } + } +} diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 96a81cf..6fdc62a 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -179,6 +179,8 @@ func (rn Runner) Run(args ...string) error { return rn.scheduler(args[1:]...) case "notification": return rn.notification(args[1:]...) + case "metricsource": + return rn.metricSource(args[1:]...) case "alert": return rn.alert(args[1:]...) case "check-update": From 2d372468bf7c9bfa31de75c023af844303694429 Mon Sep 17 00:00:00 2001 From: Thanatat Tamtan Date: Wed, 2 Sep 2026 15:23:15 +0700 Subject: [PATCH 2/4] go.mod: re-pin api to 0522b74 (setCustomUsage flags) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a1e07a1..4331045 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploys-app/deploys go 1.27.0 require ( - github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543 + github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37 github.com/moonrhythm/toon v0.0.0-20260702100246-6fcdad0a6a12 golang.org/x/mod v0.37.0 golang.org/x/oauth2 v0.14.0 diff --git a/go.sum b/go.sum index a670f6a..b5e5263 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:W github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543 h1:BGDsSBSm2x5J4YoQJPhS0l5yDMBqgAaRwk4oRpI5SNs= -github.com/deploys-app/api v0.0.0-20260902074923-039b9e7c2543/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= +github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37 h1:ToV80rIQn7H5CMuilSyZW+2CMk+s904j6n+NviEKquw= +github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From 7325e6018d46f756843e08fe899eea00fe3ad715 Mon Sep 17 00:00:00 2001 From: Thanatat Tamtan Date: Wed, 2 Sep 2026 15:45:18 +0700 Subject: [PATCH 3/4] go.mod: re-pin api to 1e9d694 (series Type on ingest) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4331045..010e7fd 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploys-app/deploys go 1.27.0 require ( - github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37 + github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d github.com/moonrhythm/toon v0.0.0-20260702100246-6fcdad0a6a12 golang.org/x/mod v0.37.0 golang.org/x/oauth2 v0.14.0 diff --git a/go.sum b/go.sum index b5e5263..3c6d7b9 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:W github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37 h1:ToV80rIQn7H5CMuilSyZW+2CMk+s904j6n+NviEKquw= -github.com/deploys-app/api v0.0.0-20260902081931-0522b7474c37/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= +github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d h1:CCpsacjMsWbVfZlbMwPNchFvAq8Kj6L3MgM1eQLXPIA= +github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From f67d24d55d0e41bfa6b94a45b18bc2dc6a157306 Mon Sep 17 00:00:00 2001 From: Thanatat Tamtan Date: Fri, 4 Sep 2026 06:22:07 +0700 Subject: [PATCH 4/4] go.mod: re-pin api to main after #140 Point at the squash-merge on main (5b928d9) instead of the unmerged feat/custom-metrics commit (1e9d694). --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 010e7fd..87f7254 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploys-app/deploys go 1.27.0 require ( - github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d + github.com/deploys-app/api v0.0.0-20260903231343-5b928d9c0434 github.com/moonrhythm/toon v0.0.0-20260702100246-6fcdad0a6a12 golang.org/x/mod v0.37.0 golang.org/x/oauth2 v0.14.0 diff --git a/go.sum b/go.sum index 3c6d7b9..c4c0043 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:W github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d h1:CCpsacjMsWbVfZlbMwPNchFvAq8Kj6L3MgM1eQLXPIA= -github.com/deploys-app/api v0.0.0-20260902083723-1e9d6944453d/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= +github.com/deploys-app/api v0.0.0-20260903231343-5b928d9c0434 h1:kLWE9MLFCICccgsY6NossFoDtdrE1qt2DJdXXc3mXvA= +github.com/deploys-app/api v0.0.0-20260903231343-5b928d9c0434/go.mod h1:QN5lioYbGyxSstxlyrvXrERJch7S2hnNCMNOVAu/6K0= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=