diff --git a/Makefile b/Makefile index c6e1f34..f54c6ea 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TARGET = ./cc-backend VAR = ./var CFG = config.json .env FRONTEND = ./web/frontend -VERSION = 1.3.0 +VERSION = 1.3.1 GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development') CURRENT_TIME = $(shell date +"%Y-%m-%d:T%H:%M:%S") LD_FLAGS = '-s -X main.date=${CURRENT_TIME} -X main.version=${VERSION} -X main.commit=${GIT_HASH}' @@ -28,7 +28,7 @@ SVELTE_SRC = $(wildcard $(FRONTEND)/src/*.svelte) \ $(wildcard $(FRONTEND)/src/plots/*.svelte) \ $(wildcard $(FRONTEND)/src/joblist/*.svelte) -.PHONY: clean distclean test tags frontend $(TARGET) +.PHONY: clean distclean test tags frontend swagger graphql $(TARGET) .NOTPARALLEL: @@ -40,6 +40,15 @@ frontend: $(info ===> BUILD frontend) cd web/frontend && npm install && npm run build +swagger: + $(info ===> GENERATE swagger) + @go run github.com/swaggo/swag/cmd/swag init -d ./internal/api,./pkg/schema -g rest.go -o ./api + @mv ./api/docs.go ./internal/api/docs.go + +graphql: + $(info ===> GENERATE graphql) + @go run github.com/99designs/gqlgen + clean: $(info ===> CLEAN) @go clean diff --git a/ReleaseNotes.md b/ReleaseNotes.md index a4f085e..547a1f4 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,12 +1,11 @@ -# `cc-backend` version 1.3.0 +# `cc-backend` version 1.3.1 Supports job archive version 1 and database version 7. -This is a minor release of `cc-backend`, the API backend and frontend +This is a bugfix release of `cc-backend`, the API backend and frontend implementation of ClusterCockpit. For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/). ## Breaking changes -* This release fixes bugs in the MySQL/MariaDB database schema. For this reason - you have to migrate your database using the `-migrate-db` switch. +None diff --git a/cmd/cc-backend/main.go b/cmd/cc-backend/main.go index ed471ac..ad69c58 100644 --- a/cmd/cc-backend/main.go +++ b/cmd/cc-backend/main.go @@ -34,10 +34,10 @@ import ( "github.com/ClusterCockpit/cc-backend/internal/metricdata" "github.com/ClusterCockpit/cc-backend/internal/repository" "github.com/ClusterCockpit/cc-backend/internal/routerConfig" - "github.com/ClusterCockpit/cc-backend/internal/runtimeEnv" "github.com/ClusterCockpit/cc-backend/internal/util" "github.com/ClusterCockpit/cc-backend/pkg/archive" "github.com/ClusterCockpit/cc-backend/pkg/log" + "github.com/ClusterCockpit/cc-backend/pkg/runtimeEnv" "github.com/ClusterCockpit/cc-backend/pkg/schema" "github.com/ClusterCockpit/cc-backend/web" "github.com/go-co-op/gocron" @@ -662,5 +662,5 @@ func main() { } runtimeEnv.SystemdNotifiy(true, "running") wg.Wait() - log.Print("Gracefull shutdown completed!") + log.Print("Graceful shutdown completed!") } diff --git a/internal/runtimeEnv/setup.go b/pkg/runtimeEnv/setup.go similarity index 100% rename from internal/runtimeEnv/setup.go rename to pkg/runtimeEnv/setup.go diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index 8ed8089..84d6efe 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -101,7 +101,10 @@ // Calculate Avg from jobMetrics const jm = jobMetrics.find((jm) => jm.name === fm && jm.scope === "node"); if (jm?.metric?.statisticsSeries) { - mv = round(mean(jm.metric.statisticsSeries.mean), 2); + const noNan = jm.metric.statisticsSeries.mean.filter(function (val) { + return val != null; + }); + mv = round(mean(noNan), 2); } else if (jm?.metric?.series?.length > 1) { const avgs = jm.metric.series.map((jms) => jms.statistics.avg); mv = round(mean(avgs), 2);