Commit Graph

  • ca68cf6c18 refactor: extend TypedMap and migrate MeasComputeState onto it - add LoadOrStore, Len, and All (range-over-func) to util.TypedMap - embed util.TypedMap in MeasComputeState, dropping its hand-written sync.Map wrappers and per-call-site type assertions - iterate graphOverview via All() instead of Range in PrintGrapMap - remove unused Set/Comparer/OrderedSet/HashSet code from redis_zset.go - update deploy.md to replace Promtail with Grafana Alloy in the observability stack chore/modelrt-dockerfile-smoke-test douxu 2026-06-18 16:06:06 +0800
  • c82ad773a3 refactor: lowercase channel name suffixes and rename PS to PF - change all ChannelSuffix values from uppercase to lowercase - rename ChannelSuffixPS ("PS") to ChannelSuffixPF ("pf") - align channel suffix naming with downstream measurement keys douxu 2026-06-17 10:47:35 +0800
  • 82622d0d85 refactor: add generic helpers and type-safe TypedMap wrapper - add util.TypedMap, a generic wrapper over sync.Map to drop call-site type assertions - add generic util.MapSlice and reuse it in ConvertZSetMembersToFloat64 - make GetKeysFromSet/SliceToSet/RemoveTargetsFromSliceSimple/DeduplicateAndReportDuplicates generic - migrate graphOverview to util.TypedMap[int64, *Graph] - build redis suggestions via util.MapSlice in measurement group recommend douxu 2026-06-16 16:15:28 +0800
  • 908c713565 chore: add rabbitmq cert secret script and plugins configmap - add rabbitmq-certs-secret.sh helper to create the server cert secret - add rabbitmq-plugins-config.yaml ConfigMap enabling ssl auth, management, prometheus, and web dispatch plugins - rename rabbitmq Deployment from `eventrt-rabbitmq` to `rabbitmq` - document the secret-creation script in deploy.md douxu 2026-06-12 11:20:58 +0800
  • 64b6562784 docs: overhaul deploy.md cleanup and pg verification sections - add pg connection verification commands (pg_isready, psql queries) - renumber pg subsections (4.4.2→4.4.5) to accommodate new section - remove MongoDB deploy section (section 4.5) from modelRT deploy guide - remove MongoDB SSH tunnel port-forward entries (27017/30017) - rewrite section 8 cleanup guide: split into local Docker, local run, and K8s(Minikube) categories with scale-down and full-delete options - add one-liner kubectl delete -f deploy/k8s/ for full teardown douxu 2026-06-10 16:42:29 +0800
  • 05c64dda14 chore: add imagePullPolicy and migrate WaitGroup to wg.Go - add imagePullPolicy: IfNotPresent to all k8s Deployments, DaemonSet (grafana, jaeger, loki, rabbitmq, redis, promtail) - migrate wg.Add(1)/go/defer wg.Done() pattern to wg.Go() (Go 1.25+) in logger/loki_syncer.go and task/worker.go - simplify redundant map existence check before delete in diagram/graph.go - update deploy.md to reflect pg PVC size (6Gi) and resource limits douxu 2026-06-10 16:40:50 +0800
  • c4e892f1c7 fix: correct typo in Jaeger K8s service name - rename `jaeger-serivce` to `jaeger-service` in jaeger-service.yaml douxu 2026-06-08 17:05:21 +0800
  • 195150d9b1 fix: fix K8s service names, deployment command, and GORM logger - rename all K8s services to xxx-service convention and update all configmap references (postgres, mongodb, loki, jaeger) - add explicit command: ["/app/modelrt"] to deployment to prevent args from being treated as the executable (no ENTRYPOINT in Dockerfile) - set deploy_env to development to bypass Redis empty-password guard in non-production Minikube environment - fix GormLogger Info/Warn/Error to use fmt.Sprintf(msg, data...) so GORM printf-style messages are formatted correctly and avoid json: unsupported type: func() time.Time serialization panic - expand pg PVC storage from 2Gi to 6Gi - rename loop variable msg to task in PushTaskToRabbitMQ for clarity - align comment indentation in queue_producer.go douxu 2026-06-03 17:11:54 +0800
  • 3309e53653 docs: document Dockerfile smoke tests and load workflow for Minikube - add 3-stage build table (builder/certs/scratch) with image size note - add build-arg USER_ID override example in section 5.1 - add section 5.1.1 with smoke-test commands (size check, inspect, dry run, full start) - add workflow for loading pre-built local images into Minikube directly - bump builder base image from golang:1.25-alpine to golang:1.26-alpine - normalize inline Dockerfile comments to lowercase - remove example config COPY from final scratch stage douxu 2026-06-02 16:35:13 +0800
  • c6545e29ba style: normalize log messages to lowercase across task package - lowercase first letter of all logger.Info/Warn/Error message strings in task/worker.go, task/retry_queue.go, task/handler_factory.go, task/metrics_logger.go, task/retry_manager.go, task/queue_producer.go, task/initializer.go, task/test_task.go, and main.go - fix inline comments in main.go that mixed Chinese and uppercase English - align Dockerfile comment casing with project convention douxu 2026-06-01 15:50:11 +0800
  • c17ddb80b9 feat: merge bay-realtime-data-calc into develop develop douxu 2026-06-01 14:10:10 +0800
  • 57d1111a83 refactor: modernize Go idioms and add MongoDB K8s manifests - replace interface{} with any across ~30 files for Go 1.18+ style - adopt for-range-over-int loops in place of explicit index loops - use maps.Copy from stdlib to replace manual map copy loops - use min() builtin for exponential backoff delay cap in retry_manager - add MongoDB 7.0 K8s manifests (StatefulSet, Service, PVC, Secret) - document PostgreSQL and MongoDB deploy steps in deploy.md with SSH tunnel port mappings feature/bay-realtime-data-calc douxu 2026-05-29 14:28:58 +0800
  • bacd43617e chore: bind sensitive config to env vars and bump Go image to 1.25 - bind postgres.password to POSTGRES_PASSWORD env var via viper BindEnv - bind service.secret_key to SERVICE_SECRET_KEY env var via viper BindEnv - upgrade builder base image from golang:1.24-alpine to golang:1.25-alpine douxu 2026-05-29 10:56:17 +0800
  • 9c4dcd29e4 chore: bump Go to 1.26.3 - upgrade go directive in go.mod from 1.25.0 to 1.26.3 douxu 2026-05-28 16:36:51 +0800
  • 57371fbf1f docs: add Minikube PostgreSQL manifests and clean deploy markdown - add split PostgreSQL K8s manifests for ConfigMap, Service, PVC, and StatefulSet - expose PostgreSQL through NodePort for local Minikube access - replace deploy.md LaTeX text syntax with Markdown inline code formatting - keep deployment documentation rendering stable in Wiki.js and Markdown viewers douxu 2026-05-27 16:51:00 +0800
  • 4a2666aa3b fix: correct caller frames in GORM logger and DB arg in main - add *Skip variants (logSkip, makeLogFieldsSkip, getLoggerCallerInfoSkip) so wrapper functions report the true call site, not logger internals - switch GormLogger.Trace to use ErrorSkip/WarnSkip/InfoSkip with extraSkip=1 so SQL log lines point to GORM caller rather than the logger facade - pass postgresDBClient instead of tx to GetFullMeasurementSet in main douxu 2026-05-19 17:38:22 +0800
  • d051c161b7 perf: parallelize GetFullMeasurementSet with errgroup - run 5 independent DB queries concurrently via errgroup.WithContext - add ctx parameter and bind db with WithContext for cancellation support - replace silent error swallowing (if err == nil) with wrapped error returns - promote golang.org/x/sync to direct dependency in go.mod douxu 2026-05-18 16:49:46 +0800
  • 42956d1793 feat: add dedicated message-exchange for task lifecycle notifications - add constants/message.go with MessageTask* categories and message-exchange / message-queue / dead-letter routing constants - add mq/publish_message.go with PushMessageToRabbitMQ (confirm mode, dead-letter queue) separate from the existing event-exchange publisher - add mq/emit.go with TryEmitMessage for non-blocking, OTel-traced dispatch - add mq/event/task_event_gen.go with NewTaskSubmitted/Running/Completed/ Failed/CancelledMessage constructors - wire TryEmitMessage into task worker and create/cancel handlers so all 5 lifecycle transitions are published (previously task.* routed to event-exchange with no matching binding, causing silent drops) - harden Dockerfile: scratch final image, pinned alpine:3.21 certs stage, apk upgrade in builder, add -trimpath -mod=readonly go build flags - add full K8s manifests under deploy/k8s/ for Redis, RabbitMQ (mTLS), ModelRT (Downward API, scratch image, readOnlyRootFilesystem), Jaeger, Loki, Promtail, Grafana - expand deploy.md with async_task SQL schema, TLS cert generation steps, K8s deployment procedures, and SSH tunnel configuration douxu 2026-05-13 16:58:36 +0800
  • cccd4becdc feat: add Loki logging, fix MQ shutdown order, improve realtime tracing - add LokiConfig and batching lokiSyncer for dev-mode direct log push - refactor zap logger to support mode-aware encoding and K8s pod fields - fix RabbitMQ shutdown race: move CloseRabbitProxy to defer so channel closes before connection (prevents 504 error on Ctrl+C) - wrap MsgChan with EventMessage to carry per-cycle trace carrier - create new root OTel span per computation cycle linked to startup span, giving each cycle an independent traceID with startup as reference douxu 2026-05-11 17:34:27 +0800
  • 1dd8491440 refactor: replace EventStatusPersisted with IsPersisted field on EventRecord - add IsPersisted bool to EventRecord for explicit persistence tracking by eventRT consumer - remove EventStatusPersisted constant, decoupling DB persistence from event lifecycle status - update event status comments for accuracy and CIM-agnostic language douxu 2026-05-08 16:19:12 +0800
  • 1ee722dd58 refactor: migrate trace propagation from B3 to W3C TraceContext - switch OTel propagator from b3.New() to propagation.TraceContext{} - rename B3 header constants to generic internal context keys - remove go.opentelemetry.io/contrib/propagators/b3 dependency - add amqpHeaderCarrier to inject W3C traceparent into AMQP message headers douxu 2026-05-07 16:43:34 +0800
  • 9661278935 refactor: rename TaskParams to Params and remove debug prints - rename TaskParams interface to Params in task/base_task.go for brevity - remove debug fmt.Println/Printf statements from graph.go and handler_factory.go - fix is_local flag from false to true for existing test components in deploy.md - add 6 new test component records (ns4-ns8) to deploy seed data douxu 2026-04-28 17:41:28 +0800
  • 33f7d758e5 refactor: overhaul async task handler routing and fix data consistency douxu 2026-04-27 17:55:38 +0800
  • 1b1f43db7f feat: implement topology analysis async task with BFS connectivity check douxu 2026-04-24 17:14:46 +0800
  • 03bd058558 feat: implement end-to-end distributed tracing for HTTP and async tasks - introduce typed traceCtxKey to prevent context key collisions (staticcheck fix) - inject B3 trace values into c.Request.Context() in StartTrace middleware so handlers using c.Request.Context() carry trace info - create startup trace context in main.go, replacing context.TODO() - propagate HTTP traceID/spanID through TaskQueueMessage into RabbitMQ worker, linking HTTP request → publish → execution on the same traceID - fix GORM logger null traceID by binding ctx to AutoMigrate and queries via db.WithContext(ctx) - thread ctx through handler factory to fix null traceID in startup logs - replace per-request RabbitMQ producer with channel-based PushTaskToRabbitMQ goroutine; restrict Swagger to non-production douxu 2026-04-23 16:48:32 +0800
  • 809e1cd87d Refactor: extract task constants to dedicated constants package douxu 2026-04-22 17:20:26 +0800
  • 4a3f7a65bc Refactor async task handlers into specialized handlers douxu 2026-04-17 14:09:02 +0800
  • 4d5fcbc376 Refactor async task system with unified task interfaces and add test task type douxu 2026-04-14 17:00:30 +0800
  • f8c0951a13 Extend async task system with database integration and retry management douxu 2026-04-03 10:07:43 +0800
  • 9e4c35794c implemented task queue publishing using RabbitMQ Added configuration middleware integration Added retry logic for queue publishing Added task worker initialization (main.go): douxu 2026-04-01 17:15:33 +0800
  • 7ea66e48af add code of async task system douxu 2026-03-20 15:00:04 +0800
  • de5f976c31 add route of async task system douxu 2026-03-17 16:08:46 +0800
  • adcc8c6c91 add code of async task system douxu 2026-03-13 11:45:22 +0800
  • 6e0d2186d8 optimize code of async task system douxu 2026-03-12 16:37:06 +0800
  • a94abdb479 initialize the asynchronous task system's initial structure douxu 2026-03-05 17:15:51 +0800
  • 898beaeec4 optimize struct of rabbitmq event douxu 2026-03-02 17:00:09 +0800
  • 4b52e5f3c6 optimize code of event record and push rabbitmq func douxu 2026-02-28 17:38:33 +0800
  • f6bb3fb985 optimize code of push event to rabbitmq douxu 2026-02-26 16:48:12 +0800
  • 2ececc38d9 optimzie code organization structure of rabbitmq event douxu 2026-02-25 17:14:25 +0800
  • 6c9da6fcd4 init event struct with option mode douxu 2026-02-24 17:08:48 +0800
  • 56b9999d6b add constants varibale of power system events douxu 2026-02-12 17:09:08 +0800
  • 1c385ee60d optimize code of rabbitmq connection and event alarm struct douxu 2026-02-11 16:43:42 +0800
  • 6618209bcc optimzie code of rabbitmq connection douxu 2026-02-06 17:45:59 +0800
  • 581153ed8d add git ignore item of mask certificate files douxu 2026-02-05 17:01:16 +0800
  • f45b7d5fa4 optimize code of init rabbitmq connect func douxu 2026-02-04 17:43:09 +0800
  • 9be984899c optimize code of push event alarm func douxu 2026-02-03 17:05:32 +0800
  • 35cb969a54 add code of inter-module communication douxu 2026-02-02 16:48:46 +0800
  • 02e0c9c31a optimzie of postgres db code douxu 2026-01-30 17:42:50 +0800
  • 2126aa7b06 optimize code of config douxu 2026-01-29 17:00:20 +0800
  • 3374eec047 optimize code of redis init douxu 2026-01-28 16:49:12 +0800
  • 3ff29cc072 optimize code of real time data pull api douxu 2026-01-28 14:03:25 +0800
  • 617d21500e optimize code of redis connenct func and real time data calculate douxu 2026-01-27 17:41:17 +0800
  • 1a1727adab optimize reponse code and business code of measurement sub api douxu 2026-01-26 16:29:50 +0800
  • fd2b202037 optimize code of websocket close handler douxu 2026-01-22 16:19:00 +0800
  • 13433f93e5 optimize code of custom error structure feature-jointDebuggingDemo douxu 2026-01-20 16:42:54 +0800
  • e1886bc347 optimize code of judge wether success or failed return content douxu 2026-01-19 16:39:35 +0800
  • ba5e5b3d1c optimzie code of constants package douxu 2026-01-16 17:08:28 +0800
  • d3b1f0afbe add code of send all target removed system signal in real time data pull api and fix bug of component attribute query api douxu 2026-01-14 17:32:01 +0800
  • cf880279e4 optimize real time data query api douxu 2026-01-13 17:23:47 +0800
  • 34684bd5f1 fix: eliminate server error code definition conflicts douxu 2026-01-13 11:45:03 +0800
  • d75b9a624c optimize handler of compoent attribute query api douxu 2026-01-13 11:39:00 +0800
  • cceffa8219 add handler of compoent attribute query api douxu 2026-01-12 17:21:04 +0800
  • d1495b7ab8 optimize code of component attribute update api douxu 2026-01-09 17:26:45 +0800
  • 60eab0675e optimize code of component attrbute update api douxu 2026-01-08 17:34:44 +0800
  • f47e278f85 fix bug of first subscription different interval measurement data douxu 2026-01-07 17:28:09 +0800
  • a31bd6f395 add component attribute group update api and optimzie diagram hash set params douxu 2026-01-05 17:20:41 +0800
  • 29d0e06c94 add new structure field of measurement table and add new test data of component table and station table douxu 2026-01-04 17:12:00 +0800
  • fcf4ef3f7d fix bug of token4-token7 type attribute recommend api douxu 2025-12-31 16:52:40 +0800
  • e74bedd47f fix bug of token4-token7 type recommend api douxu 2025-12-31 16:24:27 +0800
  • 36e196bedd add nspath filter of recommend api douxu 2025-12-30 16:35:29 +0800
  • 941d521328 fix bug of token6 all search result return case douxu 2025-12-29 15:58:59 +0800
  • 7969861746 optimize func of cleanup recommend redis cache douxu 2025-12-26 17:10:22 +0800
  • 8e4bdfd0e9 add fullpath completion of component attribute group recommend douxu 2025-12-26 12:00:00 +0800
  • 42751c1020 optimize the logic for loading the cache of measurement nodes for traversing components douxu 2025-12-25 17:17:20 +0800
  • 51f65500f3 add func of init component measurement recommend douxu 2025-12-24 16:55:55 +0800
  • 7ea38615b4 unified caching system collection key names douxu 2025-12-24 09:34:03 +0800
  • 6e16a9a39a fix bug of measurement recommend injection func douxu 2025-12-24 09:06:42 +0800
  • c29f58f388 fix bug of token4-token7 model config complete op douxu 2025-12-23 16:44:31 +0800
  • 8313b16dfe fix bug of measurement recommend of token6 complete op and token7 hierarchy recommend douxu 2025-12-23 15:09:33 +0800
  • f45f10507b fix bug of measurement recommend of token6 complete op and token7 hierarchy recommend douxu 2025-12-23 14:52:39 +0800
  • 41e2998739 optimize deploy doc and optimize TraverseAttributeGroupTables func douxu 2025-12-22 17:38:15 +0800
  • c16680d4c2 fix bug of t4-t7 model combine prefix string func douxu 2025-12-22 10:45:47 +0800
  • 9499e579b3 optimize code of sql struct and measurement node recommend api douxu 2025-12-19 17:33:12 +0800
  • 70bcb00062 add code of component attribute group store douxu 2025-12-18 17:50:43 +0800
  • df77f80475 add func of component param group recommend func douxu 2025-12-17 17:10:47 +0800
  • 689d31c246 optimize dockerfile and config generate of docker deploy douxu 2025-12-17 17:09:20 +0800
  • 4f5d998659 optimzie rate limit of measurement group api douxu 2025-12-17 14:12:35 +0800
  • 252699cb77 fix bug of measurement api and add func of traverse attribute group table douxu 2025-12-16 16:34:19 +0800
  • 0add3cf6db feat:implement search support for abbreviated token ranges (e.g., token4-token7) douxu 2025-12-15 16:49:38 +0800
  • c92cee9575 optimzie logic of real time data pull api douxu 2025-12-12 17:22:20 +0800
  • d4d8c2c975 optimize deploy file douxu 2025-12-12 15:20:50 +0800
  • c68cc9436a fix bug of measurement recommend api douxu 2025-12-12 14:19:50 +0800
  • 716f56babb optimize docker deploy file douxu 2025-12-12 11:01:18 +0800
  • 5021e7fda1 comment out unused kafka code douxu 2025-12-12 10:23:04 +0800
  • befb4e8971 fix bug of server deploy douxu 2025-12-11 16:42:25 +0800
  • 2a3852a246 add diagram node link process api douxu 2025-12-10 16:12:13 +0800
  • f48807e5e5 optimize measurement link api douxu 2025-12-08 17:01:24 +0800
  • 3f70be0d1c fix bug of new version of measurement recommend api douxu 2025-12-06 18:32:00 +0800
  • a21a423624 optimize func of measurement data injection douxu 2025-12-05 17:12:14 +0800
  • 666e1a9289 optimzie shell of measurement recommend api douxu 2025-12-05 16:36:11 +0800