Commit Graph
315 Commits
Author SHA1 Message Date
pnoker 9007cbc22c style: apply consistent code formatting across all modules and docs 2026-05-22 00:24:22 +08:00
pnoker 5a3ab1440a test: improve backend test coverage governance 2026-05-19 18:19:12 +08:00
pnoker 7f5da1a0f8 chore: bump version to 2026.5.18 across all modules 2026-05-18 00:24:22 +08:00
pnoker 737caa178c build: update root pom and banner version to 2026.5.17 2026-05-17 19:04:31 +08:00
pnoker 019daf62ce feat: do someting test and code review 2026-05-16 00:56:04 +08:00
pnoker 67f1f7c2c0 build(agentic): upgrade Spring AI from 2.0.0-M5 to 2.0.0-M6
Bump spring-ai-bom in root and agentic module POMs. API is fully
compatible — no code changes required. Full project build and 89
agentic module tests pass.
2026-05-15 01:53:21 +08:00
pnoker 9123b480f4 test(e2e): stabilize infrastructure harness 2026-05-14 21:29:08 +08:00
pnoker ade8579369 fix(test-infra): propagate test bom into dc3-common dependency management
Maven dependencyManagement does not flow across the iot-dc3 root reactor
into dc3-common because dc3-common inherits from the externally
published dc3-parent. As a result, dc3-common-test could not resolve
JUnit 5 / Testcontainers / Instancio dependencies and dc3-e2e could not
resolve dc3-common-test itself.

Mirror the relevant slice of test-toolchain version management into
dc3-common/pom.xml (junit-bom + testcontainers-bom imports plus pinned
versions for AssertJ, Awaitility, Instancio, REST-assured and WireMock)
and add the missing dc3-common-test version entry to the iot-dc3 root
dependencyManagement so the e2e module can import it.

Verified locally with mvn -B clean compile -pl dc3-common/dc3-common-test -am,
which now resolves all 9 source files and produces
dc3-common-test-2026.5.5.jar.
2026-05-13 13:17:55 +08:00
Vickey c47e5f0a37 test(infra): add coverage and end-to-end aggregator modules
Introduce two reactor modules that exist purely to host repository-wide
test concerns:

- dc3-coverage (packaging=pom) runs jacoco:report-aggregate against all
  contributing modules and applies a tree-wide jacoco:check rule. The
  aggregator excludes generated sources, deployable Application classes,
  POJO entity packages and the third-party modbus4j sero utilities so
  the percentage stays anchored on real business logic. Coverage gates
  start at 0% and tighten in later stages as more tests land.
- dc3-e2e (packaging=jar) reserves a place for the docker-compose driven
  end-to-end suite delivered in stage S8. Unit and integration phases
  are skipped by default and only the e2e profile turns them on.

Both modules are wired into the root reactor.
2026-05-13 13:02:26 +08:00
Vickey a3e95968bc test(infra): wire test bom and plugins in root pom
Centralise test toolchain wiring at the iot-dc3 root pom so child modules
do not need to repeat versions or plugin definitions:

- Import the JUnit 5 and Testcontainers BOMs and pin AssertJ, Awaitility,
  Instancio, REST-assured and WireMock versions.
- Add Surefire 3.5.2 and Failsafe 3.5.2 plugin management with the
  expected include patterns (*Test.java for unit, *IT.java for
  integration) plus argLine wiring for the Jacoco agents.
- Add Jacoco 0.8.12 plugin management with both unit and integration
  agent + report executions; integration coverage lands in jacoco-it.exec
  while unit coverage stays in jacoco.exec.
- Surface skip.unit.tests and skip.integration.tests properties so CI and
  Makefile targets can flip phases without rewriting plugin configuration.

The new plugins are enabled at this layer; subsequent commits add the
aggregator coverage module that reads both .exec files and the workflows
that exercise them.
2026-05-13 11:14:21 +08:00
pnoker 1bc0b74d4d style: reorganize POM dependencies with consistent category comments
Group dependencies in each module POM using a standard category order:
Spring Boot → Spring Cloud → gRPC → Data Access → Messaging → IoT → AI
→ Serialization → Utility → Security → Observability → DC3 API → DC3 Common

DC3 Common dependencies sorted alphabetically within their group.
2026-05-08 00:28:44 +08:00
pnoker 844c89ddce chore: remove duplicate java.version property (inherited from dc3-parent) 2026-05-07 23:59:02 +08:00
pnoker e47299a327 chore: remove format and format-check targets from Makefile 2026-05-07 23:55:32 +08:00
pnoker eefe411bd7 chore(build): upgrade spring-javaformat to 0.0.47 and add Checkstyle integration
- Add maven-checkstyle-plugin with spring-javaformat-checkstyle rules
- Add custom checkstyle.xml excluding overly strict rules for existing codebase
- Exclude third-party driver code (serotonin, openscada, nodave) from checks
- Configure plugins in dc3-common and dc3-api POMs for full module coverage
- Add .springjavaformatconfig placeholder
2026-05-07 16:46:17 +08:00
pnoker 293bc1a0c2 fix(build): remove requireEncoding rule incompatible with Maven 3.x
requireEncoding requires Maven 4.0+ runtime; drop it until the project
migrates to Maven 4.
2026-05-07 13:12:23 +08:00
pnoker 95b7e1ffa3 chore(build): add enforcer plugin and Spring Java Format validation
- maven-enforcer-plugin: require JDK >= 21, Maven >= 3.9.0, UTF-8 encoding
- spring-javaformat-maven-plugin 0.0.43: validate code style at build time
2026-05-07 13:10:44 +08:00
pnoker dea8482001 feat(agentic): add AI agentic center with Spring AI tool-calling
Introduce dc3-common-agentic (skill registry, tool sets for auth/manager/data,
chat client) and dc3-center-agentic (deployable service). Register Spring AI BOM,
add gateway route /api/v3/agentic/**, and configure OpenAI env vars.
2026-05-07 00:09:38 +08:00
pnoker 95c40b2387 chore: bump version to 2026.5.5
Roll every pom, per-module README, Spring banner, and @version /
@since javadoc tag from 2026.4.30 to the new 2026.5.5 release line.
2026-05-05 00:56:09 +08:00
pnoker da5c02efd6 refactor: restructure facade module to aggregator pom, split local into auth/manager submodules
- Move dc3-common-facade-api, dc3-common-facade-grpc, dc3-common-facade-local
  under new dc3-common-facade aggregator pom
- Split dc3-common-facade-local into dc3-common-facade-local-auth and
  dc3-common-facade-local-manager for cleaner dependency scoping
- Update root pom.xml and dc3-common/pom.xml dependency management
- Update dc3-center-auth to use dc3-common-facade-local-auth
- Update dc3-center-single facade-local dependency type to pom
2026-05-01 00:48:50 +08:00
Vickey fb9ee53781 feat: auto-register center API endpoints to auth resource tables
Adds a startup-time registrar that scans the local WebFlux handler mappings
of each center service and reconciles the discovered endpoints against
dc3_api and dc3_resource (insert-if-missing, update-if-drifted, soft-delete-
if-orphaned), so the permission model is no longer hand-maintained.

Wiring:
- dc3-common-resource-registrar (new module): scanner, diff runner, Spring
  Boot AutoConfiguration. Activates on ApplicationReadyEvent.
- dc3-common-facade-api: ResourceRegistryFacade + BOs define a transport-
  neutral sync contract.
- dc3-common-facade-local / dc3-common-facade-grpc: two implementations
  selected via dc3.facade.mode. center-auth/single use local; manager/data
  call auth via gRPC.
- dc3-common-auth: biz-side ResourceRegistrySyncService performs the three-
  way diff inside a transaction guarded by pg_advisory_xact_lock(hashtext
  (serviceName)); exposes ResourceRegistryApi gRPC server.
- dc3-api-auth: new resource_registry.proto contract.
- ApiDO/BO/VO/Query gain a serviceName field so each service's endpoints
  can be located with a single indexed lookup.

Deployment-visible changes:
- api_code format is the human-readable serviceName:METHOD:/path
- dc3_resource.resource_code format is api:serviceName:METHOD:/path
  (prefixed namespace reserved for future resource types)
- center-auth application.yml sets dc3.facade.mode=local
- 4 center pom.xml files pull in the registrar (auth also gets facade-local)
2026-04-30 21:40:45 +08:00
Vickey 200beeaa71 chore: update version to 2026.4.30 in multiple files 2026-04-30 16:06:30 +08:00
pnoker b0176bd9a1 fix: downgrade JDK version from 25 to 21 in Dockerfile and related configurations 2026-04-29 16:26:24 +08:00
pnoker d09647c780 fix: update Mybatis and Dynamic Datasource dependencies to version 4, remove Redis exporter from docker-compose files 2026-04-29 16:01:11 +08:00
pnoker c5a9feeeb9 feat: add .env file for Docker Compose configuration and update usage instructions 2026-04-29 10:27:57 +08:00
pnoker fddf7bb60e feat(facade): introduce facade layer for cross-service calls
Adds three new modules that let business code call center services
through protocol-neutral interfaces instead of @GrpcClient stubs:

- dc3-common-facade-api: Device/Driver/Point + Tenant/User/UserLogin/Token
  facade interfaces plus facade-owned BO/Query/Page types
- dc3-common-facade-local: in-process implementations backed by the
  auth/manager services; zero serialization cost in single deployments
- dc3-common-facade-grpc: gRPC implementations holding BlockingStubs;
  default mode for distributed deployments

Implementation selection is driven by dc3.facade.mode={local|grpc} via
@ConditionalOnProperty, with grpc as the matchIfMissing default. Wire-up
for dc3-center-single (dc3.facade.mode=local + facade-local dependency)
is included so the single-deployment mode is runnable out of the box.
2026-04-27 19:46:15 +08:00
pnoker ea17c86387 chore: update version to 2026.4.19 across all modules and adjust branch settings in codeql.yml 2026-04-19 13:45:21 +08:00
pnoker e38b5e6b64 refactor: optimize root, dc3-common and dc3-api pom.xml
- Consolidate 19+ individual DC3 module version properties into single <dc3.version>
- Remove redundant <scope>compile</scope> from DC3 Api dependencyManagement entries
- Reorder elements: modules before properties, profiles after dependencyManagement
- Fix <scm> connection/developerConnection to use scm:git: protocol prefix
- Fix <inceptionYear> from range '2016-2022' to correct single year '2016'
2026-04-18 01:15:20 +08:00
pnoker e57793ec5f chore: bump version to 2026.4.18.3 and optimize pom.xml dependencies
- Bump all module versions from 2025.11.1 to 2026.4.18.3
- Remove orphaned dc3-common-influx dependency and property from root pom.xml
- Standardize dependency comment style in dc3-common/pom.xml
- Merge gRPC dependency groups into single section in dc3-common-api
- Restructure Spring Integration MQTT and Eclipse Paho groups in dc3-common-mqtt
- Fix incorrect comment 'DC3 Common Exception' to 'DC3 Common Related' in dc3-common-postgres
- Add missing blank line before </dependencies> in dc3-common-driver
- Remove stray blank line in root pom.xml dependencyManagement
2026-04-18 01:05:30 +08:00
Vickey 0adff1532b refactor: replace deprecated EnvironmentPostProcessor imports and update JsonMapper references 2026-02-11 11:56:52 +08:00
Vickey 0e419bab05 feat: update pom 2025-11-11 13:22:24 +08:00
zzi666 518d2a8b7d refactor: update Java docs, README files, and Protobuf comments for consistent language and formatting 2025-10-24 16:51:40 +08:00
zzi666 989a931c2f fix: standardize comment language in POM files 2025-10-24 15:45:02 +08:00
Vickey a9e8d05631 feat: update version 2025-10-05 17:16:37 +08:00
Vickey 7302107c56 chore: bump all module versions to 2025.9.2 2025-09-11 17:02:24 +08:00
Vickey 2051d42847 refactor(common): remove hutool dependency and replace usages with native utilities 2025-09-11 14:57:02 +08:00
Vickey 8cc7365293 build: bump all module versions to 2025.6.6 and update compose image tags 2025-08-26 22:38:53 +08:00
Vickey 022bab4fbd chore: switch license declaration from Apache-2.0 to AGPL-3.0 across all poms 2025-08-26 22:16:35 +08:00
Vickey a39d2fb533 chore: migrate license headers from Apache 2.0 to AGPL-3.0 across all source files 2025-08-26 22:01:24 +08:00
Vickey f415207088 build: bump project version to 2025.6.5 across all modules 2025-07-15 14:58:51 +08:00
Vickey 31a6a275ed build: bump project version to 2025.6.4 across all modules 2025-07-15 12:01:43 +08:00
Vickey 886b212793 build: bump project version to 2025.6.1 across all modules 2025-06-21 16:21:18 +08:00
Vickey 877be41317 build: bump project version to 2025.6.0 and remove unused job/register dependencies 2025-06-09 15:48:22 +08:00
Vickey 51bec018f5 refactor(data): remove dc3-common-data-postgres module and its typed point value classes 2025-05-14 20:34:08 +08:00
Vickey dda30fca50 feat: remove mongo module 2025-05-14 15:01:18 +08:00
pnoker 298d5a5084 refactor(data): restructure MongoDB configuration and repository service
Restructured MongoDB configuration and repository service to improve maintainability and clarity. Updated dependency management, added new MongoDB-specific classes, and corrected configuration files. This refactor ensures better organization and alignment with the project's architecture.
2025-04-27 21:36:10 +08:00
pnoker d8ad90e91a refactor: remove TDEngine-related files and configurations
Removed TDEngine-related files, configurations, and dependencies to streamline the codebase and improve maintainability. This includes deleting TDEngine-specific classes, YAML files, Mapper XML, and removing TDEngine references from the POM files and constant classes. Additionally, updated the Docker CI workflow to ensure consistency.
2025-04-27 14:20:38 +08:00
pnoker d99e0408f2 chore: update version to 2025.2.5 across multiple files
Updated the version from 2025.2.4 to 2025.2.5 in pom.xml files and various Java classes to reflect the latest release. This change ensures consistency across the codebase and aligns with the new version of the IoT DC3 Platform.
2025-04-25 16:22:39 +08:00
pnoker a49def0595 chore: update project version to 2025.2.4 across all modules
Updated the version from 2025.2.2 to 2025.2.4 in all pom.xml files, Java classes, and CI/CD configurations to reflect the latest release version. This change ensures consistency across the entire project.
2025-04-24 19:46:54 +08:00
pnoker af044ecc83 chore: bump all module versions to 2025.2.2 and update CI gateway image tag 2025-04-21 22:12:44 +08:00
pnoker 237f643d99 build: remove redundant repository configurations from pom.xml
The repository configurations for Aliyun, Maven Central, and Sonatype were removed as they are no longer needed. This simplifies the pom.xml file and reduces unnecessary configuration clutter.
2025-04-21 21:05:53 +08:00