Commit Graph

  • 61e5f9bf39 refactor: simplify model selection and attribute handling - fix ShortAttrInfo.GetAttrValue receiver naming - replace conditional branches with switch statements - log test task parameters during validation refactor/optimize-parameter-measurement-value-api douxu 2026-07-14 17:07:06 +0800
  • 72e2143cb3 feat: merge hotfix/measurement-recommend-fuzzy-offset into develop develop douxu 2026-07-14 10:12:51 +0800
  • 8195200cea fix(recommend): handle trailing dots on complete measurements - normalize redundant trailing dots for supported measurement formats - validate exact measurement matches against component-specific Redis sets - prevent terminal measurement matches from returning dot continuations - add regression tests for offsets and exact completions hotfix/measurement-recommend-fuzzy-offset douxu 2026-07-13 15:16:30 +0800
  • 78f68b9c4f fix: fallback to current recommend group after hash filtering - Return current config group recommendations when matched config candidates fail hash validation - Return current measurement group recommendations when matched tag candidates fail hash validation douxu 2026-07-10 17:31:56 +0800
  • a5e8c2ba4e fix: improve redis recommendation fuzzy fallback handling - Preserve level continuation marker when trimming recommendation terms - Add group fallback for config and measurement typo inputs - Validate fuzzy exact continuation with redis set membership - Use local nspath set for local fuzzy member checks - Avoid returning continuation marker for exact measurement tag matches - Add tests for fuzzy continuation and mismatch fallback behavior douxu 2026-07-10 16:03:16 +0800
  • 578f805b57 fix: correct measurement recommendation fuzzy matching and hierarchy fallback - Fix component tag suggestion writes where full paths were overwritten by local paths - Add exact token checks for trailing-dot inputs to avoid trimming valid hierarchy levels - Improve config/meas fallback by trimming the input prefix before filtering candidates, avoiding full-level fallback output - Use hash-based validation for config and measurement recommendation ownership instead of long-prefix autocomplete exact queries douxu 2026-07-10 11:02:56 +0800
  • 6f78d8e341 fix: improve measurement recommend validation and offset handling - use unified response codes for measurement recommend handler - reject recommend inputs with continuous dots as invalid params - fix exact and continuation match offsets for recommend results - preserve correct offsets for fallback recommend scenarios - use hash-based confirmation for measurement token7 recommendations - write component and bay token7 hash indexes for HEXISTS validation - add tests for input validation, hash keys, and recommend offset cases douxu 2026-07-09 16:31:19 +0800
  • 180b0f7843 test: cover initial recommend fallback inputs - add coverage for leading-dot recommendation inputs - verify normal recommendation inputs do not fallback to initial suggestions douxu 2026-07-08 17:19:07 +0800
  • 9c9e652765 feat: merge refactor/topology-node-optimize into develop douxu 2026-07-08 17:02:15 +0800
  • d8668afa46 refactor: simplify redis recommendation concurrency - replace fan-in channel recommendation searches with errgroup-based execution - return SearchResult directly from Redis recommendation helper functions - fallback leading-dot recommendation input to initial token suggestions - remove unused recommendLenType parameter from fuzzy member set validation - clean up small model selection and naming issues douxu 2026-07-08 14:41:13 +0800
  • f9824e2b24 fix: propagate request context through handlers douxu 2026-07-08 10:37:06 +0800
  • b53746efcd fix: improve redis recommendation fuzzy matching - add bounded errgroup handling for attribute group suggestion initialization - add config-level suggestions and propagate Redis/RediSearch write errors - constrain fuzzy recommendation candidates by hierarchy-specific Redis sets - avoid broad fallback results when concrete matches exist - preserve full matched prefix when calculating fuzzy recommendation offset - add tests for fuzzy recommendation offset calculation douxu 2026-07-07 17:11:25 +0800
  • b05219ef4c refactor: replace topology tree with graph cache - replace globalTree startup loading with globalTopologyGraph - add topologyGraph adjacency cache with in/out edges, start nodes, and end nodes - remove multiBranchTreeNode and legacy tree-building helpers - make topology queries independent of the all-zero UUID virtual root - keep TOPOLOGY_ANALYSIS on per-task DB querying while clarifying point-to-point reachability results - add coverage for multi-parent topology reachability refactor/topology-node-optimize douxu 2026-07-07 10:01:14 +0800
  • 305bdd4dcf fix: suppress fallback recommendations when concrete hits exist - detect concrete recommend hits before normalizing results - drop fallback results when any syntax path returns real candidates - keep fallback candidates only when every path has no concrete hit douxu 2026-07-03 15:59:53 +0800
  • 33eb2d9be8 feat: support nspath measurement shorthand recommendations - add nspath-to-measurement recommend set keys and cleanup pattern - collect nspath measurement tags when component nspath matches bay tag - store token4.token7 autocomplete terms during measurement recommend init - add token4.token7 recommendations alongside existing two-token paths douxu 2026-07-02 13:49:47 +0800
  • 491c10e8c5 feat: add component column recommendations for config tokens - add component as a token6 config recommendation constant - read component table column names during startup - bind component config recommendations to component table columns - add full and local autocomplete terms for component column paths douxu 2026-07-01 14:37:13 +0800
  • 66870c7008 fix: improve measurement recommend fallback and rune offsets - fallback to all current-level candidates when fuzzy search has no result - track fallback results and calculate fallback offsets from max rune length - use rune-based prefix offsets and trimming for non-ASCII tokens - reuse local nspath filtering for component nspath recommendations douxu 2026-06-30 13:55:42 +0800
  • 367de31247 fix: flatten measurement recommend response and normalize offsets - return a single measurement recommend payload instead of grouped payloads - remove recommended_type from response schema and regenerated swagger docs - normalize Redis recommend results in model layer with stable type ordering - deduplicate trimmed recommend terms and preserve the maximum response offset douxu 2026-06-29 14:13:58 +0800
  • 64f9423b68 chore: remove runtime config bootstrap and update local deploy docs - stop copying config.example.yaml to config.yaml during app initialization - document the local config.yaml example directly in deploy.md - update Docker smoke test docs to mount configs/config.yaml - bump the K8s Postgres image from 13.16 to 17.5 refactor/wire-injection douxu 2026-06-26 16:01:32 +0800
  • 35ff2f055a refactor: move ModelRT startup assembly into Wire app package - add app package with Wire providers, injector declaration, and generated InitializeApp implementation - move config loading, logger/tracer setup, database, redis, pool, RabbitMQ, task worker, router, and HTTP server construction out of main.go - preserve startup warmup, background publishers, task worker launch, and graceful shutdown behavior behind App methods - add github.com/google/wire dependency for generated dependency injection douxu 2026-06-24 15:18:27 +0800
  • 8faba682b3 feat: merge chore/modelrt-dockerfile-smoke-test into develop douxu 2026-06-23 11:33:13 +0800
  • 2650771cdb docs: regenerate swagger and drop stale TODO comment - regenerate AsyncTask swagger responses, keeping only the documented case - remove obsolete 200/400/404/500 response entries from docs/swagger - delete commented-out termsOfService TODO from main.go API annotations chore/modelrt-dockerfile-smoke-test douxu 2026-06-23 11:27:42 +0800
  • 98a28b62eb feat: add Grafana Alloy log collection manifests for K8s - add alloy-daemonset to run Alloy on every node via DaemonSet - add alloy-configmap to scrape Pod logs through the K8s API and parse zap JSON fields (level, traceID, pod, namespace) into Loki labels - add alloy-rbac granting pods/log read access for log collection - forward parsed logs to loki-service for Grafana querying douxu 2026-06-22 16:06:09 +0800
  • 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 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 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