Skip to content

Lal/fix deadlock on rollout sdcosmo 3601 - #84

Merged
lalepee merged 5 commits into
mainfrom
LAL/fix_deadlock_on_rollout-SDCOSMO-3601
Sep 29, 2026
Merged

lalepee merged 5 commits into
mainfrom
LAL/fix_deadlock_on_rollout-SDCOSMO-3601

Conversation

@lalepee

@lalepee lalepee commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Add a functionality switch on setting up DB at run. The switch is on a coal config property "setup_db" at root lvl. By default this value is set to True which match the current behavior.

default is set to previous behaviour to assure compatibility. to deactivate the db setup the coal configuration setup_db must be set to false.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate issues affect schema migration, command compatibility, transaction handling, cleanup, and test coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 High severity · 2 Medium severity · 1 Low severity

Open (7)
What changed in this PR

Adds configurable PostgreSQL setup and per-run metadata rollout behavior.

Changes:

  • Adds the root-level setup_db switch, defaulting to True.
  • Refactors metadata, cleanup, foreign-key, and index setup.
  • Updates tests and PostgreSQL translations.
File Summary
tests/​unit/​coal/​test_store/​test_output/​test_postgres_channel.py Updates channel setup and rollout tests.
tests/​unit/​coal/​test_postgresql/​test_postgresql_runner.py Updates runner metadata tests.
cosmotech/​translation/​coal/​en-US/​coal/​store/​output/​postgres_channel.yml Adds channel messages.
cosmotech/​translation/​coal/​en-US/​coal/​services/​postgresql.yml Updates PostgreSQL metadata messaging.
cosmotech/​coal/​store/​output/​postgres_channel.py Controls database setup and rollout flow.
cosmotech/​coal/​postgresql/​utils.py Adds run-column indexes.
cosmotech/​coal/​postgresql/​store.py Adds deferred foreign-key setup.
cosmotech/​coal/​postgresql/​runner.py Manages run metadata lifecycle.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cosmotech/coal/postgresql/runner.py
Comment thread cosmotech/coal/postgresql/runner.py
Comment thread cosmotech/coal/postgresql/utils.py Outdated
Comment thread cosmotech/coal/store/output/postgres_channel.py Outdated
Comment thread cosmotech/coal/postgresql/store.py
Comment thread tests/unit/coal/test_store/test_output/test_postgres_channel.py Outdated
Comment thread tests/unit/coal/test_store/test_output/test_postgres_channel.py Outdated
modification will be add on a major version

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A critical SQL syntax issue and additional runtime/configuration issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (7)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Require or safely handle missing run_id

cosmotech/​coal/​store/​output/​postgres_channel.py:43

run_id is read unconditionally here, but it is not included in PostgresChannel.required_keys, so a configuration can pass is_available() and then fail only when send() runs. Add the new runtime fields to the channel's required contract or provide a backward-compatible fallback before accessing them.

This issue also appears on line 55 of the same file.

Comment thread cosmotech/coal/postgresql/runner.py Outdated
@lalepee
lalepee force-pushed the LAL/fix_deadlock_on_rollout-SDCOSMO-3601 branch from 0a99c5a to 209de54 Compare September 24, 2026 13:47
@lalepee
lalepee merged commit 90503fc into main Sep 29, 2026
6 checks passed
@lalepee
lalepee deleted the LAL/fix_deadlock_on_rollout-SDCOSMO-3601 branch October 2, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants