Commit Graph

63 Commits

Author SHA1 Message Date
Kimi CLI
b66b231917 refactor: replace GwTenantRoute with GwRoute, change Id type to string
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 26s
- Remove GwTenantRoute (old tenant-specific route entity)
- Add GwRoute with string Id (Guid.CreateVersion7)
- Update IRouteManager and IRouteStore interfaces
- Update PlatformDbContext configuration for new schema
- GwRoute is now global, tenant-specific routing moved to GwDestination.TenantCode

BREAKING CHANGE: Database schema change requires table recreation
2026-03-08 15:21:43 +08:00
movingsam
61c18916eb chore: restore version to 1.0.0 (version managed by git tag)
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 1m38s
恢复版本号为 1.0.0,实际发布版本将通过 Git Tag 触发 CI/CD 确定
2026-03-08 00:44:50 +08:00
movingsam
021f464c0d feat: 添加 GwDestination 租户代码属性并更新版本至 1.0.1
Some checks are pending
Publish Platform NuGet Packages / build (push) Waiting to run
- 在 GwDestination 实体添加 TenantCode 属性,用于区分租户专属目标
  - null 或空字符串表示默认目标(所有租户共享)
  - 有值表示该目标专属于指定租户
- 更新 Fengling.Platform.Domain 版本号从 1.0.0 到 1.0.1
2026-03-08 00:43:21 +08:00
movingsam
b9bf925c45 fix(efcore): 修复 EF Core 10 JSON 映射兼容性问题
Some checks are pending
Publish Platform NuGet Packages / build (push) Waiting to run
修复在 EF Core 10 中使用 JSON 值对象时出现的映射错误:

## 问题
在 EF Core 10 中,GwRouteMatch 类的嵌套集合属性(Headers 和 QueryParameters)
导致 "Unable to determine the relationship" 错误。

## 解决方案
1. 在 PlatformDbContext 中使用 modelBuilder.Ignore<> 忽略相关类型
2. 将 OwnsOne().ToJson() 配置改为使用值转换器(Value Converter)
   将对象序列化为 JSON 字符串存储到 jsonb 列
3. 在 GwRouteMatch 类的 Headers 和 QueryParameters 属性上添加 [NotMapped] 特性
4. 添加 [JsonInclude] 特性确保序列化包含这些属性

## 技术细节
- 使用 HasColumnType("jsonb") 存储 JSON 数据
- 使用值转换器处理对象序列化/反序列化
- 保持与 PostgreSQL jsonb 类型的兼容性

## 文件变更
- 修改: Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwRouteMatch.cs
- 修改: Fengling.Platform.Infrastructure/PlatformDbContext.cs

关联任务: IMPL-4 (EF Core 兼容性修复)
关联重构计划: WFS-gateway-refactor
2026-03-08 00:32:45 +08:00
movingsam
4ffc84f43a docs(phase-03): 更新验证报告 - 值对象重构
Some checks failed
Publish Platform NuGet Packages / build (push) Has been cancelled
2026-03-03 21:10:06 +08:00
movingsam
033fcc9e9b refactor(gateway): 使用值对象替代字符串类型属性
- GwRouteMatch: 路由匹配配置值对象(Path, Methods, Hosts, Headers, QueryParameters)
- GwRouteHeader: Header 匹配规则值对象
- GwRouteQueryParameter: 查询参数匹配规则值对象
- GwLoadBalancingPolicy: 负载均衡策略枚举
- GwTransform: 请求/响应转换规则值对象
- EF Core 使用 ToJson() 将值对象映射为 JSON 列
2026-03-03 20:16:12 +08:00
movingsam
0841d81318 docs(phase-03): 翻译文档为中文 2026-03-03 16:10:45 +08:00
movingsam
5e04a565e7 docs(phase-03): complete phase execution - Gateway Cluster Restructure 2026-03-03 16:03:24 +08:00
movingsam
38f71d7274 docs(03-gateway-infrastructure-update): complete plan 03 of phase 03
- Created SUMMARY.md with plan execution details
- Updated STATE.md with current position

Plan 03 COMPLETE - Infrastructure layer updated for GwCluster.
2026-03-03 15:48:36 +08:00
movingsam
a6558137af feat(03-gateway-infrastructure-update): update Infrastructure layer for GwCluster
- Updated PlatformDbContext: removed GwTenant/GwServiceInstance DbSets, added GwCluster with EF Core config
- Created IClusterStore interface with CRUD and Destination management methods
- Created ClusterStore<TContext> implementation with soft delete and embedded Destinations support
- Deleted obsolete IInstanceStore and InstanceStore (replaced by IClusterStore)
- Updated Extensions.cs and GatewayExtensions.cs to register IClusterStore

Plan 03 of Phase 03 complete.
2026-03-03 15:46:57 +08:00
movingsam
b058c3ea56 docs(03-gateway-route-update): complete plan execution
- Add SUMMARY.md for plan 02
- Update STATE.md with completion status
- Update ROADMAP.md with completed plan
2026-03-03 15:38:33 +08:00
movingsam
3fbd9d07a6 feat(03-gateway-route-update): extend GwTenantRoute and delete obsolete entities
- Add Methods, Hosts, Headers, LoadBalancingPolicy, AuthorizationPolicy, CorsPolicy, Transforms fields to GwTenantRoute
- Delete GwTenant entity (use Platform.Tenant instead)
- Delete GwServiceInstance entity (use GwCluster embedded Destination)
2026-03-03 15:36:37 +08:00
movingsam
0699863b24 docs(03-01): complete gateway cluster entities plan
- Created SUMMARY.md for plan execution
- Updated STATE.md with Phase 03 progress
- Updated ROADMAP.md with Phase 3 status
2026-03-03 15:34:23 +08:00
movingsam
774e3fba00 feat(03-01): add GwCluster aggregate root
- Created cluster aggregate root with string Id (GUID)
- Includes ClusterId, Name, Description, Destinations list
- Embeds GwHealthCheckConfig and GwSessionAffinityConfig
- Includes audit fields: CreatedBy, CreatedTime, UpdatedBy, UpdatedTime
- Supports IsDeleted soft delete and Version for optimistic concurrency
2026-03-03 15:32:41 +08:00
movingsam
7ec34fa094 feat(03-01): add GwDestination value object
- Created destination endpoint value object embedded in GwCluster
- Includes DestinationId, Address, Health, Weight, HealthStatus, Status fields
- Compatible with YARP Destination config structure
2026-03-03 15:31:53 +08:00
movingsam
b07f56c395 feat(03-01): add GwSessionAffinityConfig value object
- Created session affinity configuration value object
- Includes Enabled, Policy, AffinityKeyName fields
- Supports Header and Cookie policies
2026-03-03 15:31:31 +08:00
movingsam
198dc2a877 feat(03-01): add GwHealthCheckConfig value object
- Created health check configuration value object
- Includes Enabled, Path, IntervalSeconds, TimeoutSeconds fields
- Matches YARP ClusterConfig health check structure
2026-03-03 15:31:02 +08:00
movingsam
75b0f9bd35 docs(phase-03): add research and 4 execution plans for gateway restructuring 2026-03-03 15:24:43 +08:00
movingsam
8dce917105 docs(phase-01): complete gateway routing phase execution 2026-03-03 12:23:12 +08:00
movingsam
71b0c2017b feat(infrastructure): add GatewayExtensions for modular IoC registration 2026-03-03 12:22:21 +08:00
movingsam
8e19a4c1bd docs(01-gateway-routing): add plan 02 summary for gateway infrastructure 2026-03-03 12:09:57 +08:00
movingsam
ec39951726 docs(planning): update STATE and ROADMAP for plan 02 completion 2026-03-03 12:09:49 +08:00
movingsam
ed762b2e61 docs(03): capture phase context for gateway adjustment 2026-03-03 11:37:16 +08:00
movingsam
6f1dbba4f0 refactor(infrastructure): 将主键类型从 long 改为 string 并使用 Guid 生成唯一 ID
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 24s
- 修改 GwServiceInstance 和 GwTenantRoute 的 Id 类型为 string
- 使用 Guid.CreateVersion7().ToString("N") 生成默认唯一标识值
- 更新 IInstanceStore、IRouteManager、IRouteStore 接口中的 FindByIdAsync 方法签名,使用 string? 替代 long?
- 调整 InstanceStore、RouteManager 和 RouteStore 中相应方法实现,支持新的 Id 类型
- 保证相关存储及查询接口兼容新的字符串形式主键
2026-03-01 11:23:12 +08:00
movingsam
6426a13852 fix: 从git tag提取版本号并传递给dotnet pack
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 21s
2026-03-01 01:26:56 +08:00
movingsam
3ee366ffdf fix: 添加 --version-suffix "" 确保版本号正确
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 8s
2026-03-01 01:25:27 +08:00
movingsam
ed3f5123b5 chore(infrastructure): 删除BuildHost相关程序集和配置文件
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 21s
- 移除BuildHost-netcore目录下Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.deps.json文件
- 删除对应的Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll.config配置文件
- 清理与BuildHost相关的所有依赖项和程序集引用
- 简化基础设施,去除不再使用的构建宿主文件和配置
2026-03-01 01:16:58 +08:00
movingsam
79130fd64b fix: 禁用默认EmbeddedResource扫描 解决.NET 10 MSB3552错误
Some checks failed
Publish Platform NuGet Packages / build (push) Failing after 52s
2026-03-01 01:10:43 +08:00
movingsam
96799a16b8 简化 CI: 移除自定义脚本,参考 ServiceDiscovery 的 nuget workflow
Some checks failed
Publish Platform NuGet Packages / build (push) Failing after 30s
2026-03-01 00:57:28 +08:00
movingsam
7a71ef1daa ci(nuget): 添加复制 NuGet 配置步骤
Some checks failed
Publish NuGet Packages / publish (push) Failing after 10s
- 在 nuget 工作流程中增加复制 NuGet.Config 到指定目录的操作
- 确保构建环境使用正确的 NuGet 配置文件
- 提高缓存清理前配置文件的可用性和一致性
2026-03-01 00:37:16 +08:00
movingsam
2abc87af8a refactor: 合并 CI 配置并添加缓存清理
Some checks failed
Publish NuGet Packages / publish (push) Failing after 11s
2026-03-01 00:31:08 +08:00
movingsam
e25240f6a5 fix: 移除不必要的 EnableDefaultEmbeddedResourceItems 配置
All checks were successful
Publish NuGet Packages / build (push) Successful in 1m16s
2026-03-01 00:28:27 +08:00
movingsam
04e8aa100e fix: 添加 EnableDefaultEmbeddedResourceItems=false 修复资源文件错误
All checks were successful
Publish NuGet Packages / build (push) Successful in 11s
2026-03-01 00:26:16 +08:00
movingsam
396cb4010c refactor(migrations): 删除初始数据库迁移及OpenIddict表相关脚本
Some checks failed
Publish NuGet Packages / build (push) Failing after 20s
Publish NuGet Package / publish (push) Failing after 22s
- 删除Initial迁移代码及其对应模型建表定义
- 移除相关的SQL迁移脚本,包括Initial和OpenIddict表的创建语句
- 清理所有与Initial迁移和OpenIddict相关的表结构和索引定义
- 该变更旨在重新规划数据库迁移结构和初始化过程
2026-03-01 00:21:35 +08:00
movingsam
37c1796341 fix: 修复 csproj 文件格式
Some checks failed
Publish NuGet Packages / build (push) Failing after 18s
Publish NuGet Package / publish (push) Failing after 23s
2026-03-01 00:13:09 +08:00
movingsam
f4e4aca443 fix(workflows): 修复发布NuGet工作流的环境变量名称
Some checks failed
Publish NuGet Packages / build (push) Failing after 19s
Publish NuGet Package / publish (push) Failing after 22s
- 将GITEA_API_TOKEN环境变量更正为GITEA_TOKEN
- 修正了YAML文件中的变量引用错误
- 确保工作流正确使用秘钥进行身份验证
- 避免因错误变量导致的发布失败
2026-03-01 00:07:25 +08:00
movingsam
3ae057cdd8 fix: 修复环境变量为 GITEA_TOKEN
Some checks failed
Publish NuGet Packages / build (push) Failing after 19s
Publish NuGet Package / publish (push) Failing after 9s
2026-03-01 00:04:29 +08:00
movingsam
140d844f70 fix: 修复 CI 环境变量名称
All checks were successful
Publish NuGet Packages / build (push) Successful in 13s
2026-03-01 00:03:37 +08:00
movingsam
55a57408b3 fix: 修复 CI/CD 配置
Some checks failed
Publish NuGet Packages / build (push) Failing after 38s
Publish NuGet Package / publish (push) Failing after 12s
- 移除 docker.yml (不需要 Docker 构建)
- 修复 nuget.yml 中 YAML 语法错误 (双引号改为单引号)
2026-02-28 23:57:19 +08:00
movingsam
1b8c937aa4 feat: 添加 Gateway 路由实体到 Platform
Some checks failed
Build and Push Docker / build (push) Failing after 23s
Publish NuGet Packages / build (push) Failing after 8s
- 新增 GatewayAggregate 领域实体 (GwTenant, GwTenantRoute, GwServiceInstance)
- 新增 IRouteStore, RouteStore, IInstanceStore, InstanceStore
- 新增 IRouteManager, RouteManager
- 合并 GatewayDbContext 到 PlatformDbContext
- 统一 Extensions.AddPlatformCore 注册所有服务
2026-02-28 23:53:00 +08:00
movingsam
7877f89d35 feat(platform): 增强 Infrastructure 层可扩展性,添加 NuGet 发布脚本与 CI/CD
Some checks failed
Build and Push Docker / build (push) Failing after 16s
Publish NuGet Packages / build (push) Failing after 1h7m51s
## 主要变更

### Infrastructure 层重构
- `PlatformDbContext`: 构造函数改为接受泛型 `DbContextOptions`,支持派生上下文
- `TenantStore<TContext>`: 泛型化实现,支持不同的数据库上下文
- `Extensions`: 新增 `AddPlatformCore<TContext>` 扩展方法,简化服务注册

### 依赖调整
- 移除 Npgsql.EntityFrameworkCore.PostgreSQL 直接依赖,由使用方自行决定数据库提供程序

### CI/CD 集成
- 新增 `.gitea/workflows/publish-nuget.yml` Gitea Actions 工作流
- 新增 `push-platform-nuget.sh` 脚本,支持:
  - 从 git tag 自动获取版本号
  - HTTP/HTTPS 双模式支持
  - 独立 NuGet 配置文件
  - CI/CD 友好的环境变量配置

### 其他
- `NuGet.Config`: 新增 NuGet 配置文件
- `Fengling.Platform.Domain`: 添加 Items 文件夹占位
2026-02-27 13:58:09 +08:00
a04dc199c9 Update secret name to GITEATOKEN
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 8m29s
2026-02-26 13:05:52 +08:00
a6ec824a37 Update secret name to GITEATOKEN
Some checks are pending
Build and Push Docker / build (push) Waiting to run
Publish NuGet Packages / build (push) Waiting to run
2026-02-26 13:05:38 +08:00
e81b1aeef5 Update Docker CI for org
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 30s
2026-02-26 13:00:19 +08:00
33cba4a084 Update NuGet CI for org
Some checks failed
Publish NuGet Packages / build (push) Waiting to run
Build and Push Docker / build (push) Has been cancelled
2026-02-26 12:59:58 +08:00
872e586cdd Add Docker CI workflow
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 31s
2026-02-26 10:58:41 +08:00
3db3b3393c Add NuGet CI workflow
Some checks failed
Publish NuGet Packages / build (push) Has been cancelled
2026-02-26 10:57:27 +08:00
62f8c3c5a0 Delete .gitea/workflows 2026-02-26 10:57:13 +08:00
54288f3817 Add NuGet CI workflow 2026-02-26 10:56:41 +08:00
ac47785d5b Create workflows directory 2026-02-26 10:56:40 +08:00