-
Notifications
You must be signed in to change notification settings - Fork 656
fix(auth): resolve DetachedInstanceError on User.identity during registration #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8443c33
2462f04
7ec6f0f
689c857
c1fb3ba
2fdd1e5
a7a5529
f4df71a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,6 +182,7 @@ async def create_user_with_identity( | |
| "registration_source": registration_source, | ||
| "is_active": is_active or identity.is_platform_admin, | ||
| }) | ||
| user.identity = identity | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
|
|
||
| # Link to OrgMember if exists | ||
| await self.bind_org_member(user) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # ============================================================ | ||
| # CI 专用 Docker Compose | ||
| # 用于 Drone CI 的本地部署测试和升级测试 | ||
| # 使用预构建镜像,不构建、不挂载持久化卷 | ||
| # ============================================================ | ||
|
|
||
| services: | ||
| postgres: | ||
| image: postgres:15-alpine | ||
| networks: | ||
| - default | ||
| environment: | ||
| POSTGRES_USER: clawith | ||
| POSTGRES_PASSWORD: clawith | ||
| POSTGRES_DB: clawith | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U clawith"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
|
|
||
| redis: | ||
| image: redis:7-alpine | ||
| networks: | ||
| - default | ||
| healthcheck: | ||
| test: ["CMD", "redis-cli", "ping"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
|
|
||
| backend: | ||
| image: clawith-backend:${IMAGE_TAG:-new} | ||
| environment: | ||
| DATABASE_URL: postgresql+asyncpg://clawith:clawith@postgres:5432/clawith | ||
| REDIS_URL: redis://redis:6379/0 | ||
| AGENT_DATA_DIR: /data/agents | ||
| AGENT_TEMPLATE_DIR: /app/agent_template | ||
| SECRET_KEY: ci-test-secret | ||
| JWT_SECRET_KEY: ci-test-jwt-secret | ||
| PROCESS_ROLE: all | ||
| CORS_ORIGINS: '["*"]' | ||
| networks: | ||
| - default | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| redis: | ||
| condition: service_healthy | ||
|
|
||
| frontend: | ||
| image: clawith-frontend:${IMAGE_TAG:-new} | ||
| ports: | ||
| - "3008:3000" | ||
| environment: | ||
| VITE_API_URL: http://localhost:8000 | ||
| API_UPSTREAM: backend:8000 | ||
|
Comment on lines
+55
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The CI compose file starts the frontend, but this environment block omits Useful? React with 👍 / 👎. |
||
| networks: | ||
| - default | ||
| depends_on: | ||
| - backend | ||
|
|
||
| networks: | ||
| default: | ||
| name: clawith_network | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this YAML is merged, pushes to a
ci/test-dronebranch will run the full pipeline, includingsave-imagesandscp-imagesto/opt/server/clawith-ci/, even though publishing should be limited tomain/release. Since the inline note says this was temporary for testing, drop this branch before merging so test branches cannot overwrite CI deployment artifacts.Useful? React with 👍 / 👎.