Skip to content

fix(server): make observability migration retry-safe#226

Merged
abhinav-galileo merged 1 commit into
mainfrom
fix/idempotent-observability-migration
May 20, 2026
Merged

fix(server): make observability migration retry-safe#226
abhinav-galileo merged 1 commit into
mainfrom
fix/idempotent-observability-migration

Conversation

@abhinav-galileo
Copy link
Copy Markdown
Collaborator

Summary

  • Make the observability namespace Alembic migration tolerate partially-applied schema state.
  • Skip adding namespace_key when it already exists.
  • Rewrite the event primary key only when it is not already namespace-scoped.
  • Add regression tests for partial migration retries before Alembic stamps the revision.

Testing

  • env -u AGENT_CONTROL_DB_URL -u DATABASE_URL -u DB_URL AGENT_CONTROL_DB_HOST=localhost AGENT_CONTROL_DB_PORT=5432 AGENT_CONTROL_DB_USER=agent_control AGENT_CONTROL_DB_PASSWORD=agent_control AGENT_CONTROL_DB_DATABASE=agent_control_test AGENT_CONTROL_DB_DRIVER=psycopg uv run --package agent-control-server pytest server/tests/test_data_model_v1_alembic_migration.py -q
  • uv run ruff check tests/test_data_model_v1_alembic_migration.py alembic/versions/b6f4c2d8e9a1_namespace_observability_events.py from server/
  • git diff --check

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@abhinav-galileo abhinav-galileo merged commit b9dd00d into main May 20, 2026
6 checks passed
@abhinav-galileo abhinav-galileo deleted the fix/idempotent-observability-migration branch May 20, 2026 08:02
galileo-automation pushed a commit that referenced this pull request May 28, 2026
## [2.6.0](ts-sdk-v2.5.0...ts-sdk-v2.6.0) (2026-05-28)

### Features

* **evaluators:** add new lluna client ([#213](#213)) ([f65beb9](f65beb9))
* **sdk:** add otel support ([#177](#177)) ([9530368](9530368))
* **sdk:** add runtime token auth ([#215](#215)) ([6cc0f38](6cc0f38))
* **server:** add control clone-and-bind endpoint ([#229](#229)) ([1728bf9](1728bf9))
* **server:** add runtime auth and namespace scoping ([#214](#214)) ([56e44fe](56e44fe))
* **server:** allow host-owned logging setup ([#227](#227)) ([c0fd159](c0fd159))
* **server:** bundle migrations in wheel and add agent-control-migrate ([#209](#209)) ([8c5c35e](8c5c35e))
* **server:** migrate controls routes to auth framework ([#212](#212)) ([764bd4b](764bd4b))

### Bug Fixes

* **examples:** declare local SDK workspace deps ([#222](#222)) ([d22aa1d](d22aa1d))
* **sdk:**  Get trace context from provider ([#211](#211)) ([1efe30f](1efe30f))
* **sdk-ts:** normalize generated client ([#231](#231)) ([1c097d2](1c097d2))
* **server:** make observability migration retry-safe ([#226](#226)) ([b9dd00d](b9dd00d))
* **server:** prevent migration lock transactions ([#224](#224)) ([e65a2f4](e65a2f4))
* **server:** scope auth upstream CA to HTTP provider ([#232](#232)) ([7a0ce21](7a0ce21))
* **ui:** fix editing of controls in the UI ([#218](#218)) ([981e33d](981e33d)), closes [#Risk](https://github.com/agentcontrol/agent-control/issues/Risk)
@galileo-automation
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants