已合并
support to start indentity module for deploy tool #440
陈卉创建于 15 天前
support to start indentity module for deploy tool #440
已合并
共 4 个文件变更+16-12
| @@ -3,7 +3,6 @@ requires = ["setuptools>=61.0", "wheel"] | |||
| 3 | build-backend = "setuptools.build_meta" | 3 | build-backend = "setuptools.build_meta" |
| 4 | 4 | ||
| 5 | [project] | 5 | [project] |
| 6 | -# 重构:原 jiuwenclaw-identity,迁入 runtime 后改名为 identity-center | ||
| 7 | name = "identity-center" | 6 | name = "identity-center" |
| 8 | version = "0.1.0" | 7 | version = "0.1.0" |
| 9 | description = "JiuwenClaw identity / auth service (OAuth2 + JWT, standalone identity DB)" | 8 | description = "JiuwenClaw identity / auth service (OAuth2 + JWT, standalone identity DB)" |
| @@ -21,7 +20,6 @@ dependencies = [ | |||
| 21 | "PyJWT>=2.8", | 20 | "PyJWT>=2.8", |
| 22 | "cryptography>=42.0", | 21 | "cryptography>=42.0", |
| 23 | "python-multipart>=0.0.9", | 22 | "python-multipart>=0.0.9", |
| 24 | - # 重构:foundation 由 git 源(agent-runtime@develop)改为本仓源码,见 [tool.uv.sources] | ||
| 25 | "openjiuwen-runtime-foundation", | 23 | "openjiuwen-runtime-foundation", |
| 26 | "openjiuwen-runtime-service", | 24 | "openjiuwen-runtime-service", |
| 27 | "asyncpg>=0.29", | 25 | "asyncpg>=0.29", |
| @@ -38,7 +36,6 @@ dev = [ | |||
| 38 | [project.scripts] | 36 | [project.scripts] |
| 39 | identity-center = "identity_center.main:main" | 37 | identity-center = "identity_center.main:main" |
| 40 | 38 | ||
| 41 | -# 重构:foundation 改用本仓 editable 源码,不再从 gitcode 拉取 | ||
| 42 | [tool.uv.sources] | 39 | [tool.uv.sources] |
| 43 | openjiuwen-runtime-foundation = { path = "../../../foundation", editable = true } | 40 | openjiuwen-runtime-foundation = { path = "../../../foundation", editable = true } |
| 44 | openjiuwen-runtime-service = { path = "../../../service", editable = true } | 41 | openjiuwen-runtime-service = { path = "../../../service", editable = true } |
| @@ -161,10 +161,13 @@ FEDERATION_ROLE_MAPPING_TABLE_DEF = TableDefinition( | |||
| 161 | ColumnDefinition("updated_at", "datetime", nullable=False), | 161 | ColumnDefinition("updated_at", "datetime", nullable=False), |
| 162 | ], | 162 | ], |
| 163 | indexes=[ | 163 | indexes=[ |
| 164 | - IndexDefinition( | 164 | + # 该唯一索引暂时注释掉:自动生成的索引名 |
| 165 | - ["connection_id", "claim_name", "claim_value", "local_role"], | 165 | + # ix_federation_role_mapping_connection_id_claim_name_claim_value_local_role |
| 166 | - unique=True, | 166 | + # 超过 MySQL 标识符长度上限(64 字符),建表会报错。 |
| 167 | - ), | 167 | + # IndexDefinition( |
| 168 | + # ["connection_id", "claim_name", "claim_value", "local_role"], | ||
| 169 | + # unique=True, | ||
| 170 | + # ), | ||
| 168 | IndexDefinition(["connection_id"], unique=False), | 171 | IndexDefinition(["connection_id"], unique=False), |
| 169 | ], | 172 | ], |
| 170 | ) | 173 | ) |
| @@ -9,8 +9,8 @@ WORKDIR /app/agent-runtime | |||
| 9 | COPY . /app/agent-runtime/ | 9 | COPY . /app/agent-runtime/ |
| 10 | RUN chown -R app:app /app/agent-runtime | 10 | RUN chown -R app:app /app/agent-runtime |
| 11 | 11 | ||
| 12 | -# foundation 与 identity-center 同仓源码安装(pip 不识别 [tool.uv.sources]) | ||
| 13 | RUN pip install -e "./foundation" \ | 12 | RUN pip install -e "./foundation" \ |
| 13 | + -e "./service" \ | ||
| 14 | -e "./applications/manager/identity_center" \ | 14 | -e "./applications/manager/identity_center" \ |
| 15 | --no-cache-dir \ | 15 | --no-cache-dir \ |
| 16 | ${PIP_EXTRA_ARGS} | 16 | ${PIP_EXTRA_ARGS} |