Rename operation database to runtime-persistent and runtime database to runtime-transient - #4077
Conversation
|
Important Review skippedToo many files! This PR contains 117 files, which is 17 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (117)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR replaces the ChangesRuntime database split
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c2a20fb to
5c15b73
Compare
5c15b73 to
6d29d92
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
Status, support, documentation and community
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (9)
backend/internal/oauth/oauth2/revocation/enforcement_service.go (2)
92-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRename function to match the new database name.
To keep the naming consistent with the new terminology introduced in this PR, consider renaming this helper function from
publishOperationDBUnavailableEventtopublishRuntimePersistentDBUnavailableEvent.♻️ Proposed refactor
-func (c *enforcementService) publishOperationDBUnavailableEvent(ctx context.Context, cause error) { +func (c *enforcementService) publishRuntimePersistentDBUnavailableEvent(ctx context.Context, cause error) { if c.observabilitySvc == nil || !c.observabilitySvc.IsEnabled() { return } evt := event.NewEvent( syscontext.GetTraceID(ctx), string(event.EventTypeRuntimePersistentDBUnavailable), event.ComponentAuthHandler, ). WithStatus(providers.StatusFailure). WithData(event.DataKey.Error, cause.Error()) c.observabilitySvc.PublishEvent(ctx, evt) }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/oauth/oauth2/revocation/enforcement_service.go` around lines 92 - 106, Rename publishOperationDBUnavailableEvent to publishRuntimePersistentDBUnavailableEvent and update every call site to use the new name, leaving its event construction and behavior unchanged.
64-88: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate the log message and consider renaming the helper function to reflect the database rename.
The log message on line 70 still refers to the "Operation DB," and the helper function invoked on line 79 is named
publishOperationDBUnavailableEvent. To fully align with the PR's objective of renaming the database, consider updating these to reference theRuntime Persistent DBinstead.♻️ Proposed refactor
if !c.breaker.allow() { - c.logger.Debug(ctx, "Operation DB circuit is open; failing closed for revocation check") + c.logger.Debug(ctx, "Runtime persistent DB circuit is open; failing closed for revocation check") return ErrEnforcementUnavailable } revoked, err := c.store.IsTokenRevoked(ctx, jti) if err != nil { c.logger.Error(ctx, "Failed to consult token revocation deny list; failing closed", log.Error(err)) if c.breaker.recordFailure() { - c.publishOperationDBUnavailableEvent(ctx, err) + c.publishRuntimePersistentDBUnavailableEvent(ctx, err) } return ErrEnforcementUnavailable }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/oauth/oauth2/revocation/enforcement_service.go` around lines 64 - 88, Update EnsureNotRevoked to replace “Operation DB” with “Runtime Persistent DB” in the circuit-open debug log, and rename publishOperationDBUnavailableEvent plus all its references to use the Runtime Persistent DB terminology consistently.install/local-development/docker-compose.yml (1)
16-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider aligning the container file names with the new database names.
The host paths were correctly updated to use
runtime-transientandruntime-persistent, but the destination file names in the container remainruntime-postgres.sqlandoperation-postgres.sql. For consistency, consider updating the destination names to match the new taxonomy as well.♻️ Proposed refactor
- - ../../backend/dbscripts/runtime-transient/postgres.sql:/docker-entrypoint-initdb.d/runtime-postgres.sql - - ../../backend/dbscripts/configdb/postgres.sql:/docker-entrypoint-initdb.d/config-postgres.sql - - ../../backend/dbscripts/userdb/postgres.sql:/docker-entrypoint-initdb.d/user-postgres.sql - - ../../backend/dbscripts/runtime-persistent/postgres.sql:/docker-entrypoint-initdb.d/operation-postgres.sql + - ../../backend/dbscripts/runtime-transient/postgres.sql:/docker-entrypoint-initdb.d/runtime-transient-postgres.sql + - ../../backend/dbscripts/configdb/postgres.sql:/docker-entrypoint-initdb.d/config-postgres.sql + - ../../backend/dbscripts/userdb/postgres.sql:/docker-entrypoint-initdb.d/user-postgres.sql + - ../../backend/dbscripts/runtime-persistent/postgres.sql:/docker-entrypoint-initdb.d/runtime-persistent-postgres.sqlNote: If you apply this change, remember to update the corresponding
\icommands ininstall/local-development/postgres-init/init.sql.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@install/local-development/docker-compose.yml` around lines 16 - 19, Align the destination filenames in the Docker Compose volume mappings with the new database taxonomy: rename the runtime-transient target from runtime-postgres.sql to runtime-transient-postgres.sql and the runtime-persistent target from operation-postgres.sql to runtime-persistent-postgres.sql. Update the corresponding \i commands in init.sql to reference these renamed container files.install/local-development/postgres-init/init.sql (1)
8-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider updating the script file references to match the new names.
If you choose to apply the optional refactor in
docker-compose.ymlto rename the destination files, you should also update the\icommands here to reference the new file names.♻️ Proposed refactor
\connect runtime_transient -\i /docker-entrypoint-initdb.d/runtime-postgres.sql +\i /docker-entrypoint-initdb.d/runtime-transient-postgres.sql\connect runtime_persistent -\i /docker-entrypoint-initdb.d/operation-postgres.sql +\i /docker-entrypoint-initdb.d/runtime-persistent-postgres.sqlAlso applies to: 20-21
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@install/local-development/postgres-init/init.sql` around lines 8 - 9, Update the \i script references in the init.sql connection blocks to match the renamed destination files configured by the docker-compose.yml refactor, including both occurrences, while preserving the existing database connections and initialization order.backend/internal/system/database/provider/dbprovider.go (1)
131-136: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueClean up stale
operationandruntimeterminology. Several variables, docstrings, and log messages in this file still use the oldoperationandruntimeidentifiers, which can cause confusion now that the domains are explicitlyruntime-persistentandruntime-transient.
backend/internal/system/database/provider/dbprovider.go#L131-L136: update the docstring to "runtime persistent" and renameoperationDBConfig.backend/internal/system/database/provider/dbprovider.go#L116-L121: update the docstring to "runtime transient".backend/internal/system/database/provider/dbprovider.go#L161-L164: update the docstring to "runtime persistent".backend/internal/system/database/provider/dbprovider.go#L206-L208: renameoperationDBConfigand update the log message to mention the persistent client.backend/internal/system/database/provider/dbprovider.go#L348-L350: renameoperationErr/runtimeErr, and passdbNameRuntimeTransientanddbNameRuntimePersistentintocloseClientinstead of the hardcoded"runtime"and"operation"strings.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/system/database/provider/dbprovider.go` around lines 131 - 136, Clean up stale terminology in dbprovider.go: update GetRuntimeTransientDBClient and GetRuntimePersistentDBClient docstrings to “runtime transient” and “runtime persistent,” and update the persistent-related docstring at lines 161-164. Rename operationDBConfig in GetRuntimePersistentDBClient and the corresponding initialization flow at lines 206-208, updating its log message to mention the persistent client. In the close-client flow at lines 348-350, rename operationErr and runtimeErr and pass dbNameRuntimeTransient and dbNameRuntimePersistent to closeClient instead of hardcoded “runtime” and “operation” strings.backend/internal/system/database/provider/dbprovider_test.go (1)
51-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider updating the dummy database names to match the rename.
The dummy configuration still assigns the old database names (
runtimeandoperation) to the PostgreSQL datasources. While this doesn't break the tests, updating them toruntime_transientandruntime_persistentmaintains consistency with the new schema naming.♻️ Proposed refactor
Database: config.DatabaseConfig{ Config: config.DataSource{ Type: "postgres", Postgres: config.PostgresDataSource{Name: "identity"}, }, RuntimeTransient: config.DataSource{ - Type: "postgres", Postgres: config.PostgresDataSource{Name: "runtime"}, + Type: "postgres", Postgres: config.PostgresDataSource{Name: "runtime_transient"}, }, User: config.DataSource{ Type: "postgres", Postgres: config.PostgresDataSource{Name: "user"}, }, RuntimePersistent: config.DataSource{ - Type: "postgres", Postgres: config.PostgresDataSource{Name: "operation"}, + Type: "postgres", Postgres: config.PostgresDataSource{Name: "runtime_persistent"}, }, },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/system/database/provider/dbprovider_test.go` around lines 51 - 62, Update the dummy PostgreSQL datasource names in the test configuration: change RuntimeTransient from “runtime” to “runtime_transient” and RuntimePersistent from “operation” to “runtime_persistent”, while leaving the other datasource entries unchanged.docs/content/guides/getting-started/configuration.mdx (1)
285-288: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFormat the configuration key with inline code spans.
As per path instructions, config keys and values must be formatted using inline backticks.
♻️ Proposed fix
### Runtime-persistent Database -Stores SSO sessions, revoked tokens, and consent records. This database is required. <ProductName /> fails to start when database.runtime_persistent is not configured. +Stores SSO sessions, revoked tokens, and consent records. This database is required. <ProductName /> fails to start when `database.runtime_persistent` is not configured.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/guides/getting-started/configuration.mdx` around lines 285 - 288, Update the “Runtime-persistent Database” documentation text to wrap the configuration key database.runtime_persistent in inline backticks, preserving the surrounding wording and markup.Source: Path instructions
docs/content/guides/deployment-patterns/kubernetes.mdx (1)
146-169: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate the password placeholders to match the new database names.
The password placeholders in the YAML examples still use the old terminology (
<runtime-db-password>and<operation-db-password>). Consider renaming them to<runtime-transient-db-password>and<runtime-persistent-db-password>for consistency across both occurrences.
docs/content/guides/deployment-patterns/kubernetes.mdx#L146-L169: Update<runtime-db-password>to<runtime-transient-db-password>and<operation-db-password>to<runtime-persistent-db-password>.docs/content/guides/deployment-patterns/kubernetes.mdx#L240-L263: Update<runtime-db-password>to<runtime-transient-db-password>and<operation-db-password>to<runtime-persistent-db-password>.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/guides/deployment-patterns/kubernetes.mdx` around lines 146 - 169, Update the password placeholders in the Kubernetes YAML examples: in docs/content/guides/deployment-patterns/kubernetes.mdx lines 146-169 and 240-263, rename <runtime-db-password> to <runtime-transient-db-password> and <operation-db-password> to <runtime-persistent-db-password>.docs/content/community/contributing/contributing-code/debugging.mdx (1)
161-165: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd
Runtime Persistent DBto the table and update the count.Since the databases have been split into transient and persistent, you should add the
runtime-persistent.dbpath to this table. Also, remember to update the subsequent step to say "the other three databases" instead of "the other two databases".♻️ Proposed fix
|----------|------| | User DB | `<repo-root>/backend/cmd/server/database/userdb.db` | -| Runtime DB | `<repo-root>/backend/cmd/server/database/runtime-transient.db` | +| Runtime Transient DB | `<repo-root>/backend/cmd/server/database/runtime-transient.db` | +| Runtime Persistent DB | `<repo-root>/backend/cmd/server/database/runtime-persistent.db` | | Config DB | `<repo-root>/backend/cmd/server/database/configdb.db` | 5. Click **Test Connection** to verify, then click **Finish** -6. Repeat for the other two databases +6. Repeat for the other three databases🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/community/contributing/contributing-code/debugging.mdx` around lines 161 - 165, Update the database setup table to include a Runtime Persistent DB entry pointing to the runtime-persistent.db path, then change the subsequent instruction to repeat for “the other three databases” instead of two.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/cmd/server/config/default.json`:
- Around line 45-48: Add a database.runtime_persistent configuration alongside
runtime_transient in default.json, using the renamed operation settings and
matching the existing SQLite configuration structure. Ensure the persistent
runtime database is included in the default configuration without removing or
altering runtime_transient.
In `@backend/internal/oauth/oauth2/revocation/store.go`:
- Around line 60-63: Update stale database terminology in the error messages: in
backend/internal/oauth/oauth2/revocation/store.go lines 60-63 and 84-87, and
backend/internal/system/revocationcache/source_db.go lines 53-56, name the
client as “runtime persistent database client”; in
backend/internal/flow/session/init.go lines 33-36, name the transactioner
“runtime persistent DB transactioner”; and in
backend/internal/oauth/oauth2/dcr/init.go lines 45-47, name it “runtime
transient DB transactioner”.
In `@install/helm/README.md`:
- Around line 431-442: Update the descriptions for the runtime_transient
database settings in the Helm README table to use “Runtime-transient” instead of
“Runtime,” including the Postgres password and Redis password entries. Preserve
the existing configuration keys, defaults, and external Secret behavior.
- Around line 462-474: Update the descriptions in the runtime_persistent
configuration table to replace outdated “Operation” terminology with
“Runtime-persistent,” including the database type and Postgres password entries.
Keep the configuration keys and values unchanged.
In `@install/openchoreo/helm/charts/thunderid-component/values.yaml`:
- Around line 50-52: Add the missing runtime_persistent database configuration,
following runtime_transient conventions: define default SQLite and PostgreSQL
settings in
install/openchoreo/helm/charts/thunderid-component/values.yaml#L50-L52; document
its PostgreSQL flags in install/openchoreo/helm/README.md#L157-L159; and map its
connection details to the expected environment variables in
install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml#L81-L81
and templates/thunderid-release.yaml#L76-L76.
In
`@install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml`:
- Line 193: Add the missing runtime_persistent database configuration to all six
identified sites:
install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml
lines 193-193 (SQLite path) and 257-257 (PostgreSQL DB_OPERATION_* mappings);
install/openchoreo/helm/values.yaml lines 68-70 (SQLite
database/runtime-persistent.db) and 88-88 (commented PostgreSQL template); and
tests/integration/resources/scripts/setup-test-config.ps1 lines 59-63
(PostgreSQL) and 94-102 (SQLite). Keep each block consistent with the
surrounding runtime_transient configuration and existing placeholders.
---
Nitpick comments:
In `@backend/internal/oauth/oauth2/revocation/enforcement_service.go`:
- Around line 92-106: Rename publishOperationDBUnavailableEvent to
publishRuntimePersistentDBUnavailableEvent and update every call site to use the
new name, leaving its event construction and behavior unchanged.
- Around line 64-88: Update EnsureNotRevoked to replace “Operation DB” with
“Runtime Persistent DB” in the circuit-open debug log, and rename
publishOperationDBUnavailableEvent plus all its references to use the Runtime
Persistent DB terminology consistently.
In `@backend/internal/system/database/provider/dbprovider_test.go`:
- Around line 51-62: Update the dummy PostgreSQL datasource names in the test
configuration: change RuntimeTransient from “runtime” to “runtime_transient” and
RuntimePersistent from “operation” to “runtime_persistent”, while leaving the
other datasource entries unchanged.
In `@backend/internal/system/database/provider/dbprovider.go`:
- Around line 131-136: Clean up stale terminology in dbprovider.go: update
GetRuntimeTransientDBClient and GetRuntimePersistentDBClient docstrings to
“runtime transient” and “runtime persistent,” and update the persistent-related
docstring at lines 161-164. Rename operationDBConfig in
GetRuntimePersistentDBClient and the corresponding initialization flow at lines
206-208, updating its log message to mention the persistent client. In the
close-client flow at lines 348-350, rename operationErr and runtimeErr and pass
dbNameRuntimeTransient and dbNameRuntimePersistent to closeClient instead of
hardcoded “runtime” and “operation” strings.
In `@docs/content/community/contributing/contributing-code/debugging.mdx`:
- Around line 161-165: Update the database setup table to include a Runtime
Persistent DB entry pointing to the runtime-persistent.db path, then change the
subsequent instruction to repeat for “the other three databases” instead of two.
In `@docs/content/guides/deployment-patterns/kubernetes.mdx`:
- Around line 146-169: Update the password placeholders in the Kubernetes YAML
examples: in docs/content/guides/deployment-patterns/kubernetes.mdx lines
146-169 and 240-263, rename <runtime-db-password> to
<runtime-transient-db-password> and <operation-db-password> to
<runtime-persistent-db-password>.
In `@docs/content/guides/getting-started/configuration.mdx`:
- Around line 285-288: Update the “Runtime-persistent Database” documentation
text to wrap the configuration key database.runtime_persistent in inline
backticks, preserving the surrounding wording and markup.
In `@install/local-development/docker-compose.yml`:
- Around line 16-19: Align the destination filenames in the Docker Compose
volume mappings with the new database taxonomy: rename the runtime-transient
target from runtime-postgres.sql to runtime-transient-postgres.sql and the
runtime-persistent target from operation-postgres.sql to
runtime-persistent-postgres.sql. Update the corresponding \i commands in
init.sql to reference these renamed container files.
In `@install/local-development/postgres-init/init.sql`:
- Around line 8-9: Update the \i script references in the init.sql connection
blocks to match the renamed destination files configured by the
docker-compose.yml refactor, including both occurrences, while preserving the
existing database connections and initialization order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 47a63cca-2093-4b55-94ab-7753c32e8025
⛔ Files ignored due to path filters (2)
.agent/skills/db/SKILL.mdis excluded by!.agent/skills/**backend/tests/mocks/database/providermock/DBProviderInterface_mock.gois excluded by!**/*_mock.go
📒 Files selected for processing (99)
.github/actions/run-integration-tests/action.ymlARCHITECTURE.mdbackend/cmd/server/config/default.jsonbackend/cmd/server/deployment.yamlbackend/cmd/server/servicemanager.gobackend/dbscripts/runtime-persistent/postgres-cleanup.sqlbackend/dbscripts/runtime-persistent/postgres.sqlbackend/dbscripts/runtime-persistent/sqlite.sqlbackend/dbscripts/runtime-transient/postgres-cleanup.sqlbackend/dbscripts/runtime-transient/postgres.sqlbackend/dbscripts/runtime-transient/sqlite.sqlbackend/internal/application/init_test.gobackend/internal/authn/passkey/init.gobackend/internal/authn/passkey/store.gobackend/internal/authn/passkey/store_test.gobackend/internal/consent/store.gobackend/internal/consent/store_test.gobackend/internal/entityprovider/init_test.gobackend/internal/flow/mgt/init_test.gobackend/internal/flow/session/init.gobackend/internal/flow/session/participant_store_test.gobackend/internal/flow/session/resolver_test.gobackend/internal/flow/session/session_context_store_test.gobackend/internal/flow/session/store.gobackend/internal/flow/session/store_test.gobackend/internal/idp/init_test.gobackend/internal/idp/store_test.gobackend/internal/oauth/config/config.gobackend/internal/oauth/config/config_test.gobackend/internal/oauth/oauth2/authz/auth_code_store.gobackend/internal/oauth/oauth2/authz/auth_code_store_test.gobackend/internal/oauth/oauth2/authz/auth_req_store.gobackend/internal/oauth/oauth2/authz/auth_req_store_test.gobackend/internal/oauth/oauth2/authz/handler_test.gobackend/internal/oauth/oauth2/authz/init.gobackend/internal/oauth/oauth2/authz/init_test.gobackend/internal/oauth/oauth2/authz/service_test.gobackend/internal/oauth/oauth2/ciba/store.gobackend/internal/oauth/oauth2/ciba/store_test.gobackend/internal/oauth/oauth2/dcr/init.gobackend/internal/oauth/oauth2/dcr/init_test.gobackend/internal/oauth/oauth2/jti/store.gobackend/internal/oauth/oauth2/jti/store_test.gobackend/internal/oauth/oauth2/par/store.gobackend/internal/oauth/oauth2/par/store_test.gobackend/internal/oauth/oauth2/revocation/enforcement_service.gobackend/internal/oauth/oauth2/revocation/enforcement_service_test.gobackend/internal/oauth/oauth2/revocation/init.gobackend/internal/oauth/oauth2/revocation/init_test.gobackend/internal/oauth/oauth2/revocation/store.gobackend/internal/oauth/oauth2/revocation/store_test.gobackend/internal/resource/init_test.gobackend/internal/resource/service_test.gobackend/internal/runtimestore/dbstore/init.gobackend/internal/runtimestore/dbstore/service.gobackend/internal/runtimestore/dbstore/service_test.gobackend/internal/system/config/config.gobackend/internal/system/config/config_test.gobackend/internal/system/database/provider/dbprovider.gobackend/internal/system/database/provider/dbprovider_test.gobackend/internal/system/database/provider/redisprovider.gobackend/internal/system/healthcheck/service/healthcheckservice.gobackend/internal/system/healthcheck/service/healthcheckservice_test.gobackend/internal/system/observability/event/category.gobackend/internal/system/observability/event/constants.gobackend/internal/system/revocationcache/source_db.gobackend/internal/system/revocationcache/source_db_test.gobackend/scripts/cleanup_runtime_db.shbackend/tests/resources/deployment.yamlbuild.ps1build.shdocs/content/community/contributing/contributing-code/debugging.mdxdocs/content/guides/deployment-patterns/kubernetes.mdxdocs/content/guides/deployment-patterns/openchoreo.mdxdocs/content/guides/deployment-patterns/production-guidelines.mdxdocs/content/guides/getting-started/configuration.mdxdocs/content/guides/getting-started/get-thunderid.mdxinstall/helm/README.mdinstall/helm/conf/deployment.yamlinstall/helm/templates/_helpers.tplinstall/helm/templates/pvc.yamlinstall/helm/templates/secret.yamlinstall/helm/templates/setup-job.yamlinstall/helm/templates/thunderid-deployment.yamlinstall/helm/values.yamlinstall/local-development/docker-compose.ymlinstall/local-development/postgres-init/init.sqlinstall/openchoreo/helm/README.mdinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yamlinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-release.yamlinstall/openchoreo/helm/charts/thunderid-component/values.yamlinstall/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yamlinstall/openchoreo/helm/values.yamlinstall/openchoreo/thunderid-oc-resourcetype/README.mdinstall/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yamltests/integration/resources/deployment.yamltests/integration/resources/scripts/setup-test-config.ps1tests/integration/resources/scripts/setup-test-config.shtests/integration/testutils/test_utils.go
6d29d92 to
2650b73
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ARCHITECTURE.md`:
- Line 12: Update the repository layout documentation in ARCHITECTURE.md to list
runtime-persistent.db alongside runtime-transient.db, reflecting that both
runtime databases are created in the configured data directory and preserving
the existing database description.
In `@build.ps1`:
- Around line 578-579: Update the database initialization flow around $db_files
and $script_paths to explicitly migrate legacy runtimedb.db and operationdb.db
into runtime-transient.db and runtime-persistent.db before creating or switching
to the new names. Preserve existing data and handle already-migrated
destinations safely; if migration is intentionally performed elsewhere, instead
fail clearly when legacy files are present rather than initializing empty
databases.
In
`@install/openchoreo/helm/charts/thunderid-component/templates/thunderid-release.yaml`:
- Line 76: Update the runtime-transient SQLite path value in the thunderid
release template to read from `.Values.database.runtime_transient.sqlite.path`,
preserving the existing default and quoting behavior so custom nested SQLite
paths are honored.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 29eb88fb-d265-446a-a7ec-d6ec480a0cfb
⛔ Files ignored due to path filters (2)
.agent/skills/db/SKILL.mdis excluded by!.agent/skills/**backend/tests/mocks/database/providermock/DBProviderInterface_mock.gois excluded by!**/*_mock.go
📒 Files selected for processing (99)
.github/actions/run-integration-tests/action.ymlARCHITECTURE.mdbackend/cmd/server/config/default.jsonbackend/cmd/server/deployment.yamlbackend/cmd/server/servicemanager.gobackend/dbscripts/runtime-persistent/postgres-cleanup.sqlbackend/dbscripts/runtime-persistent/postgres.sqlbackend/dbscripts/runtime-persistent/sqlite.sqlbackend/dbscripts/runtime-transient/postgres-cleanup.sqlbackend/dbscripts/runtime-transient/postgres.sqlbackend/dbscripts/runtime-transient/sqlite.sqlbackend/internal/application/init_test.gobackend/internal/authn/passkey/init.gobackend/internal/authn/passkey/store.gobackend/internal/authn/passkey/store_test.gobackend/internal/consent/store.gobackend/internal/consent/store_test.gobackend/internal/entityprovider/init_test.gobackend/internal/flow/mgt/init_test.gobackend/internal/flow/session/init.gobackend/internal/flow/session/participant_store_test.gobackend/internal/flow/session/resolver_test.gobackend/internal/flow/session/session_context_store_test.gobackend/internal/flow/session/store.gobackend/internal/flow/session/store_test.gobackend/internal/idp/init_test.gobackend/internal/idp/store_test.gobackend/internal/oauth/config/config.gobackend/internal/oauth/config/config_test.gobackend/internal/oauth/oauth2/authz/auth_code_store.gobackend/internal/oauth/oauth2/authz/auth_code_store_test.gobackend/internal/oauth/oauth2/authz/auth_req_store.gobackend/internal/oauth/oauth2/authz/auth_req_store_test.gobackend/internal/oauth/oauth2/authz/handler_test.gobackend/internal/oauth/oauth2/authz/init.gobackend/internal/oauth/oauth2/authz/init_test.gobackend/internal/oauth/oauth2/authz/service_test.gobackend/internal/oauth/oauth2/ciba/store.gobackend/internal/oauth/oauth2/ciba/store_test.gobackend/internal/oauth/oauth2/dcr/init.gobackend/internal/oauth/oauth2/dcr/init_test.gobackend/internal/oauth/oauth2/jti/store.gobackend/internal/oauth/oauth2/jti/store_test.gobackend/internal/oauth/oauth2/par/store.gobackend/internal/oauth/oauth2/par/store_test.gobackend/internal/oauth/oauth2/revocation/enforcement_service.gobackend/internal/oauth/oauth2/revocation/enforcement_service_test.gobackend/internal/oauth/oauth2/revocation/init.gobackend/internal/oauth/oauth2/revocation/init_test.gobackend/internal/oauth/oauth2/revocation/store.gobackend/internal/oauth/oauth2/revocation/store_test.gobackend/internal/resource/init_test.gobackend/internal/resource/service_test.gobackend/internal/runtimestore/dbstore/init.gobackend/internal/runtimestore/dbstore/service.gobackend/internal/runtimestore/dbstore/service_test.gobackend/internal/system/config/config.gobackend/internal/system/config/config_test.gobackend/internal/system/database/provider/dbprovider.gobackend/internal/system/database/provider/dbprovider_test.gobackend/internal/system/database/provider/redisprovider.gobackend/internal/system/healthcheck/service/healthcheckservice.gobackend/internal/system/healthcheck/service/healthcheckservice_test.gobackend/internal/system/observability/event/category.gobackend/internal/system/observability/event/constants.gobackend/internal/system/revocationcache/source_db.gobackend/internal/system/revocationcache/source_db_test.gobackend/scripts/cleanup_runtime_db.shbackend/tests/resources/deployment.yamlbuild.ps1build.shdocs/content/community/contributing/contributing-code/debugging.mdxdocs/content/guides/deployment-patterns/kubernetes.mdxdocs/content/guides/deployment-patterns/openchoreo.mdxdocs/content/guides/deployment-patterns/production-guidelines.mdxdocs/content/guides/getting-started/configuration.mdxdocs/content/guides/getting-started/get-thunderid.mdxinstall/helm/README.mdinstall/helm/conf/deployment.yamlinstall/helm/templates/_helpers.tplinstall/helm/templates/pvc.yamlinstall/helm/templates/secret.yamlinstall/helm/templates/setup-job.yamlinstall/helm/templates/thunderid-deployment.yamlinstall/helm/values.yamlinstall/local-development/docker-compose.ymlinstall/local-development/postgres-init/init.sqlinstall/openchoreo/helm/README.mdinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yamlinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-release.yamlinstall/openchoreo/helm/charts/thunderid-component/values.yamlinstall/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yamlinstall/openchoreo/helm/values.yamlinstall/openchoreo/thunderid-oc-resourcetype/README.mdinstall/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yamltests/integration/resources/deployment.yamltests/integration/resources/scripts/setup-test-config.ps1tests/integration/resources/scripts/setup-test-config.shtests/integration/testutils/test_utils.go
🚧 Files skipped from review as they are similar to previous changes (87)
- backend/internal/flow/session/init.go
- backend/internal/oauth/config/config.go
- backend/internal/system/healthcheck/service/healthcheckservice.go
- backend/internal/runtimestore/dbstore/init.go
- backend/dbscripts/runtime-persistent/sqlite.sql
- backend/internal/oauth/oauth2/revocation/init.go
- install/helm/templates/secret.yaml
- backend/internal/oauth/oauth2/revocation/init_test.go
- backend/internal/authn/passkey/init.go
- backend/internal/idp/store_test.go
- install/local-development/postgres-init/init.sql
- backend/internal/system/observability/event/constants.go
- tests/integration/resources/deployment.yaml
- backend/internal/flow/session/resolver_test.go
- backend/internal/oauth/oauth2/revocation/enforcement_service.go
- backend/internal/system/config/config_test.go
- backend/internal/system/observability/event/category.go
- backend/internal/oauth/oauth2/dcr/init.go
- backend/internal/application/init_test.go
- backend/internal/oauth/oauth2/authz/init.go
- install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml
- backend/internal/oauth/oauth2/authz/auth_code_store.go
- backend/internal/flow/session/store.go
- tests/integration/resources/scripts/setup-test-config.ps1
- backend/internal/oauth/oauth2/dcr/init_test.go
- backend/internal/oauth/oauth2/ciba/store.go
- backend/cmd/server/deployment.yaml
- backend/internal/entityprovider/init_test.go
- backend/cmd/server/config/default.json
- install/openchoreo/helm/values.yaml
- backend/internal/oauth/oauth2/ciba/store_test.go
- backend/internal/idp/init_test.go
- install/openchoreo/helm/README.md
- backend/tests/resources/deployment.yaml
- backend/internal/authn/passkey/store.go
- backend/internal/oauth/oauth2/authz/handler_test.go
- install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml
- backend/internal/flow/session/store_test.go
- docs/content/community/contributing/contributing-code/debugging.mdx
- backend/internal/oauth/config/config_test.go
- backend/internal/system/revocationcache/source_db.go
- tests/integration/testutils/test_utils.go
- backend/internal/oauth/oauth2/revocation/store.go
- backend/internal/system/revocationcache/source_db_test.go
- backend/internal/oauth/oauth2/authz/auth_req_store.go
- docs/content/guides/deployment-patterns/production-guidelines.mdx
- backend/cmd/server/servicemanager.go
- backend/internal/consent/store.go
- backend/internal/oauth/oauth2/revocation/store_test.go
- build.sh
- .github/actions/run-integration-tests/action.yml
- install/helm/templates/_helpers.tpl
- backend/dbscripts/runtime-transient/postgres-cleanup.sql
- backend/internal/oauth/oauth2/authz/init_test.go
- backend/internal/system/database/provider/redisprovider.go
- docs/content/guides/getting-started/get-thunderid.mdx
- docs/content/guides/getting-started/configuration.mdx
- tests/integration/resources/scripts/setup-test-config.sh
- install/local-development/docker-compose.yml
- backend/internal/authn/passkey/store_test.go
- backend/internal/resource/service_test.go
- backend/internal/oauth/oauth2/authz/service_test.go
- install/openchoreo/helm/charts/thunderid-component/values.yaml
- install/openchoreo/thunderid-oc-resourcetype/README.md
- backend/internal/flow/mgt/init_test.go
- backend/internal/oauth/oauth2/jti/store_test.go
- docs/content/guides/deployment-patterns/openchoreo.mdx
- install/helm/values.yaml
- install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
- backend/dbscripts/runtime-transient/postgres.sql
- backend/internal/oauth/oauth2/revocation/enforcement_service_test.go
- backend/internal/flow/session/participant_store_test.go
- install/helm/conf/deployment.yaml
- backend/internal/oauth/oauth2/par/store.go
- backend/internal/system/database/provider/dbprovider_test.go
- backend/dbscripts/runtime-persistent/postgres-cleanup.sql
- backend/internal/resource/init_test.go
- backend/internal/system/healthcheck/service/healthcheckservice_test.go
- docs/content/guides/deployment-patterns/kubernetes.mdx
- backend/internal/oauth/oauth2/par/store_test.go
- backend/internal/system/database/provider/dbprovider.go
- backend/dbscripts/runtime-transient/sqlite.sql
- backend/internal/flow/session/session_context_store_test.go
- backend/internal/oauth/oauth2/authz/auth_code_store_test.go
- install/helm/README.md
- backend/internal/oauth/oauth2/authz/auth_req_store_test.go
- backend/internal/runtimestore/dbstore/service_test.go
2650b73 to
40650fd
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml (1)
81-85: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAsymmetric environment variable naming for the transient runtime database.
With the introduction of the
runtime_persistentdatabase, the newDB_RUNTIME_PERSISTENT_*environment variables were correctly added, but the transient runtime database continues to use the legacyDB_RUNTIME_*prefix. Since this is a breaking change requiring configuration updates anyway, updating the transient variables toDB_RUNTIME_TRANSIENT_*ensures better clarity and symmetry across the configuration templates.Consider refactoring the environment variables:
install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml#L81-L85: Rename the environment variable key on line 80 fromDB_RUNTIME_PATHtoDB_RUNTIME_TRANSIENT_PATH.install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml#L193-L204: Update the SQLite placeholder mapped in the configuration template to{{ "{{.DB_RUNTIME_TRANSIENT_PATH}}" }}.install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml#L261-L261: Update theDB_RUNTIME_*placeholders in the adjacent PostgreSQL block (lines 264-269) toDB_RUNTIME_TRANSIENT_*(e.g.,DB_RUNTIME_TRANSIENT_HOSTNAME).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml` around lines 81 - 85, The transient runtime database uses the legacy DB_RUNTIME_* naming; rename the environment key in install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml lines 81-85 to DB_RUNTIME_TRANSIENT_PATH, update the SQLite placeholder in install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml lines 193-204 to DB_RUNTIME_TRANSIENT_PATH, and rename all adjacent PostgreSQL DB_RUNTIME_* placeholders in lines 261-261 to the corresponding DB_RUNTIME_TRANSIENT_* names.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml`:
- Around line 81-85: The transient runtime database uses the legacy DB_RUNTIME_*
naming; rename the environment key in
install/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yaml
lines 81-85 to DB_RUNTIME_TRANSIENT_PATH, update the SQLite placeholder in
install/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yaml
lines 193-204 to DB_RUNTIME_TRANSIENT_PATH, and rename all adjacent PostgreSQL
DB_RUNTIME_* placeholders in lines 261-261 to the corresponding
DB_RUNTIME_TRANSIENT_* names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 363f01b2-aea5-47ff-8b7c-ef4e208bd373
⛔ Files ignored due to path filters (2)
.agent/skills/db/SKILL.mdis excluded by!.agent/skills/**backend/tests/mocks/database/providermock/DBProviderInterface_mock.gois excluded by!**/*_mock.go
📒 Files selected for processing (99)
.github/actions/run-integration-tests/action.ymlARCHITECTURE.mdbackend/cmd/server/config/default.jsonbackend/cmd/server/deployment.yamlbackend/cmd/server/servicemanager.gobackend/dbscripts/runtime-persistent/postgres-cleanup.sqlbackend/dbscripts/runtime-persistent/postgres.sqlbackend/dbscripts/runtime-persistent/sqlite.sqlbackend/dbscripts/runtime-transient/postgres-cleanup.sqlbackend/dbscripts/runtime-transient/postgres.sqlbackend/dbscripts/runtime-transient/sqlite.sqlbackend/internal/application/init_test.gobackend/internal/authn/passkey/init.gobackend/internal/authn/passkey/store.gobackend/internal/authn/passkey/store_test.gobackend/internal/consent/store.gobackend/internal/consent/store_test.gobackend/internal/entityprovider/init_test.gobackend/internal/flow/mgt/init_test.gobackend/internal/flow/session/init.gobackend/internal/flow/session/participant_store_test.gobackend/internal/flow/session/resolver_test.gobackend/internal/flow/session/session_context_store_test.gobackend/internal/flow/session/store.gobackend/internal/flow/session/store_test.gobackend/internal/idp/init_test.gobackend/internal/idp/store_test.gobackend/internal/oauth/config/config.gobackend/internal/oauth/config/config_test.gobackend/internal/oauth/oauth2/authz/auth_code_store.gobackend/internal/oauth/oauth2/authz/auth_code_store_test.gobackend/internal/oauth/oauth2/authz/auth_req_store.gobackend/internal/oauth/oauth2/authz/auth_req_store_test.gobackend/internal/oauth/oauth2/authz/handler_test.gobackend/internal/oauth/oauth2/authz/init.gobackend/internal/oauth/oauth2/authz/init_test.gobackend/internal/oauth/oauth2/authz/service_test.gobackend/internal/oauth/oauth2/ciba/store.gobackend/internal/oauth/oauth2/ciba/store_test.gobackend/internal/oauth/oauth2/dcr/init.gobackend/internal/oauth/oauth2/dcr/init_test.gobackend/internal/oauth/oauth2/jti/store.gobackend/internal/oauth/oauth2/jti/store_test.gobackend/internal/oauth/oauth2/par/store.gobackend/internal/oauth/oauth2/par/store_test.gobackend/internal/oauth/oauth2/revocation/enforcement_service.gobackend/internal/oauth/oauth2/revocation/enforcement_service_test.gobackend/internal/oauth/oauth2/revocation/init.gobackend/internal/oauth/oauth2/revocation/init_test.gobackend/internal/oauth/oauth2/revocation/store.gobackend/internal/oauth/oauth2/revocation/store_test.gobackend/internal/resource/init_test.gobackend/internal/resource/service_test.gobackend/internal/runtimestore/dbstore/init.gobackend/internal/runtimestore/dbstore/service.gobackend/internal/runtimestore/dbstore/service_test.gobackend/internal/system/config/config.gobackend/internal/system/config/config_test.gobackend/internal/system/database/provider/dbprovider.gobackend/internal/system/database/provider/dbprovider_test.gobackend/internal/system/database/provider/redisprovider.gobackend/internal/system/healthcheck/service/healthcheckservice.gobackend/internal/system/healthcheck/service/healthcheckservice_test.gobackend/internal/system/observability/event/category.gobackend/internal/system/observability/event/constants.gobackend/internal/system/revocationcache/source_db.gobackend/internal/system/revocationcache/source_db_test.gobackend/scripts/cleanup_runtime_db.shbackend/tests/resources/deployment.yamlbuild.ps1build.shdocs/content/community/contributing/contributing-code/debugging.mdxdocs/content/guides/deployment-patterns/kubernetes.mdxdocs/content/guides/deployment-patterns/openchoreo.mdxdocs/content/guides/deployment-patterns/production-guidelines.mdxdocs/content/guides/getting-started/configuration.mdxdocs/content/guides/getting-started/get-thunderid.mdxinstall/helm/README.mdinstall/helm/conf/deployment.yamlinstall/helm/templates/_helpers.tplinstall/helm/templates/pvc.yamlinstall/helm/templates/secret.yamlinstall/helm/templates/setup-job.yamlinstall/helm/templates/thunderid-deployment.yamlinstall/helm/values.yamlinstall/local-development/docker-compose.ymlinstall/local-development/postgres-init/init.sqlinstall/openchoreo/helm/README.mdinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-component.yamlinstall/openchoreo/helm/charts/thunderid-component/templates/thunderid-release.yamlinstall/openchoreo/helm/charts/thunderid-component/values.yamlinstall/openchoreo/helm/charts/thunderid-oc-componenttype/templates/thunderid-componenttype.yamlinstall/openchoreo/helm/values.yamlinstall/openchoreo/thunderid-oc-resourcetype/README.mdinstall/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yamltests/integration/resources/deployment.yamltests/integration/resources/scripts/setup-test-config.ps1tests/integration/resources/scripts/setup-test-config.shtests/integration/testutils/test_utils.go
🚧 Files skipped from review as they are similar to previous changes (84)
- backend/internal/flow/session/init.go
- docs/content/community/contributing/contributing-code/debugging.mdx
- backend/internal/authn/passkey/init.go
- backend/internal/oauth/oauth2/dcr/init.go
- backend/internal/oauth/oauth2/authz/handler_test.go
- backend/internal/oauth/oauth2/authz/init.go
- backend/internal/oauth/oauth2/revocation/enforcement_service.go
- ARCHITECTURE.md
- backend/cmd/server/deployment.yaml
- backend/internal/entityprovider/init_test.go
- backend/internal/oauth/oauth2/revocation/init_test.go
- backend/internal/runtimestore/dbstore/init.go
- install/helm/templates/secret.yaml
- backend/internal/oauth/oauth2/revocation/init.go
- backend/internal/oauth/oauth2/authz/auth_req_store.go
- backend/internal/oauth/oauth2/authz/auth_code_store.go
- backend/internal/flow/session/store.go
- backend/internal/system/healthcheck/service/healthcheckservice.go
- install/local-development/postgres-init/init.sql
- backend/internal/oauth/oauth2/par/store.go
- backend/tests/resources/deployment.yaml
- install/helm/templates/setup-job.yaml
- backend/internal/system/database/provider/redisprovider.go
- backend/internal/oauth/oauth2/revocation/store.go
- tests/integration/resources/scripts/setup-test-config.ps1
- backend/internal/system/observability/event/category.go
- backend/internal/flow/session/resolver_test.go
- backend/dbscripts/runtime-transient/postgres-cleanup.sql
- install/openchoreo/thunderid-oc-resourcetype/README.md
- tests/integration/testutils/test_utils.go
- backend/internal/application/init_test.go
- backend/dbscripts/runtime-persistent/postgres.sql
- install/openchoreo/helm/values.yaml
- backend/internal/idp/store_test.go
- backend/internal/runtimestore/dbstore/service.go
- docs/content/guides/deployment-patterns/production-guidelines.mdx
- backend/internal/resource/init_test.go
- backend/dbscripts/runtime-persistent/sqlite.sql
- docs/content/guides/getting-started/get-thunderid.mdx
- backend/internal/system/observability/event/constants.go
- backend/internal/oauth/oauth2/dcr/init_test.go
- backend/internal/oauth/config/config_test.go
- backend/internal/oauth/oauth2/revocation/enforcement_service_test.go
- backend/dbscripts/runtime-persistent/postgres-cleanup.sql
- install/helm/values.yaml
- backend/internal/system/config/config.go
- backend/internal/consent/store.go
- tests/integration/resources/scripts/setup-test-config.sh
- install/openchoreo/helm/charts/thunderid-component/templates/thunderid-release.yaml
- backend/internal/system/revocationcache/source_db_test.go
- backend/cmd/server/servicemanager.go
- backend/internal/idp/init_test.go
- backend/internal/oauth/oauth2/authz/service_test.go
- backend/dbscripts/runtime-transient/sqlite.sql
- backend/internal/system/healthcheck/service/healthcheckservice_test.go
- backend/internal/flow/session/session_context_store_test.go
- install/helm/README.md
- backend/internal/oauth/oauth2/ciba/store.go
- backend/internal/resource/service_test.go
- build.sh
- .github/actions/run-integration-tests/action.yml
- install/openchoreo/helm/README.md
- backend/internal/oauth/oauth2/jti/store_test.go
- backend/internal/oauth/oauth2/revocation/store_test.go
- docs/content/guides/deployment-patterns/openchoreo.mdx
- backend/internal/flow/mgt/init_test.go
- backend/scripts/cleanup_runtime_db.sh
- tests/integration/resources/deployment.yaml
- backend/internal/consent/store_test.go
- install/helm/templates/_helpers.tpl
- install/helm/conf/deployment.yaml
- backend/dbscripts/runtime-transient/postgres.sql
- backend/internal/oauth/oauth2/authz/init_test.go
- backend/internal/flow/session/participant_store_test.go
- backend/internal/system/database/provider/dbprovider_test.go
- install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
- backend/internal/oauth/oauth2/authz/auth_code_store_test.go
- backend/internal/oauth/oauth2/ciba/store_test.go
- docs/content/guides/deployment-patterns/kubernetes.mdx
- backend/internal/flow/session/store_test.go
- docs/content/guides/getting-started/configuration.mdx
- backend/internal/oauth/oauth2/authz/auth_req_store_test.go
- backend/internal/system/database/provider/dbprovider.go
- backend/internal/runtimestore/dbstore/service_test.go
40650fd to
7eaf258
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
…to runtime-transient Rename the two runtime-facing logical databases to reflect the lifetime of the data they hold: - operation -> runtime-persistent: long-lived operational state that must survive restarts (revoked tokens, SSO sessions, consent records). - runtime -> runtime-transient: short-lived state (authorization codes and requests, PAR, JTI records, WebAuthn/VCI state, flow contexts). Covers the Go config struct and tags, the DB provider interface and all callers, the observability event, dbscripts directories and cleanup procedures, build/packaging scripts, docker-compose, integration test tooling and CI, the Helm and OpenChoreo charts, and documentation. BREAKING CHANGE: the database.runtime and database.operation configuration keys are renamed to database.runtime_transient and database.runtime_persistent. Existing deployment.yaml, Helm values, and environment configs must be updated. Fixes thunder-id#4076
25a2d12 to
4875df7
Compare
| | `entitydb` | Identity data: users, groups, indexed user attributes | | ||
| | Database (config key) | Responsibility | | ||
| |-----------------------|---------------------------------------------------------------| | ||
| | `config` | Identity configuration data Ex: applications, authentication flows, roles, identity providers | |
There was a problem hiding this comment.
| | `config` | Identity configuration data Ex: applications, authentication flows, roles, identity providers | | |
| | `configdb` | Identity configuration data Ex: applications, authentication flows, roles, identity providers | |
| @@ -16,48 +16,48 @@ | |||
| -- ---------------------------------------------------------------------------- | |||
There was a problem hiding this comment.
Shall we rename the folder to runtime-persistentdb to be consistent with config and entitydb? WDYT?
Purpose
Rename the two runtime-facing logical databases so their names reflect the lifetime of the data they hold:
operation→runtime-persistent: long-lived operational state that must survive restarts (revoked tokens, SSO sessions, consent records).runtime→runtime-transient: short-lived state (authorization codes and requests, PAR, JTI records, WebAuthn/VCI state, flow contexts).The previous
operationname was ambiguous; the new pair makes the transient-vs-durable split explicit and consistent across config, code, deployment artifacts, and docs.Per-layer forms (each layer follows its own convention):
operation→runtime→runtime_persistentruntime_transientRuntimePersistent/GetRuntimePersistentDBClientRuntimeTransient/GetRuntimeTransientDBClientruntime-persistentruntime-transientruntime_persistentruntime_transientRUNTIME_PERSISTENT_DB_UNAVAILABLE🔧 Summary of Breaking Changes
The database configuration keys are renamed:
database.runtime→database.runtime_transientdatabase.operation→database.runtime_persistentPhysical artifact names also change (SQLite files
runtime-transient.db/runtime-persistent.db, Postgres db namesruntime_transient/runtime_persistent, andbackend/dbscripts/directory names).💥 Impact
Any deployment that sets these keys in
deployment.yaml, Helm values, or environment-based config must update them, or the affected database falls back to defaults / fails to initialize. Existing SQLite data files namedruntimedb.db/operationdb.dband Postgres databases namedruntimedb/operationdbare no longer referenced under the old names.🔄 Migration Guide
Update configuration keys:
For SQLite, point paths at
database/runtime-transient.dbanddatabase/runtime-persistent.db(or rename the existing files). For Postgres, rename or recreate the databases:runtimedb→runtime_transient,operationdb→runtime_persistent.Approach
Applied the rename in three passes, validated after each:
DBProviderInterfacemethods and all callers, private provider fields, the observability event constant/value, and regenerated mocks. Substring-collision ordering handled (RuntimePersistentcontainsRuntime).git mvof the twodbscripts/directories, SQLite/Postgres names and cleanup procedures, build/packaging scripts, docker-compose, integration test tooling, and the integration-test CI action (kept the generated test config and the CICREATE DATABASEnames in sync).database.*keys acrossdeployment.yamls, the Helm chart (values,_helpers.tpl, templates), and the OpenChoreo charts. The unrelated OpenChoreoparameters.runtime.*namespace was deliberately left untouched.Validation:
go build,go vet, and the full backend unit suite pass;helm lint+helm templaterender cleanly; a repo-wide scan confirms no staleruntimedb/operationdb/old-symbol references remain.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit