Repository navigation
fix(run): clarify unfinalized environment diagnostics - #6191
Draft
bosprimigenious wants to merge 1 commit into
Draft
bosprimigenious wants to merge 1 commit into
bosprimigenious wants to merge 1 commit into
Conversation
An unfinalized environment can outlive a failed plan. Report the stored state without asserting that the plan process is active, and explain the configured wait and recovery path while retaining the guard. Generated-by: OpenAI Codex Signed-off-by: bosprimigenious <bosprimigenious@foxmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
CodeRabbit Verify
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #6157. After a promotion fails,
runcan keep warning that the environment "is being updated" even though the plan process has exited. The readiness check observes persisted finalization state; it does not detect a running process.This change identifies the unfinalized state, explains that the plan may still be running or may have failed, and includes the configured retry interval/maximum wait. The timeout points to plan logs, resolving the failure, and successfully reapplying
sqlmesh plan <environment>. The Run configuration documentation explains the same distinction.Only diagnostic strings change in
context.py: the finalization guard, state records, retry loop and sleep/timeout calculations remain unchanged. There is no state-clearing workaround or active-process detection.Draft / NOT READY. Full
make styleexits 2: mypy reports 125 errors in 67 files, matching the pristine baseline after normalizing line shifts (500 source files checked). Full fast-test collection exits 2 with 23 optional dependency import errors; it has not executed successfully. The four pre-existing tests in the affected integration module also fail during missing BigQuery SDK fixture setup, on both baseline and patched source. Other engine/Python/OS matrices remain unverified.Test Plan
Checklist
make styleand fixed any issues (run; baseline full mypy errors remain)make fast-test) (full collection blocked by optional dependencies)git commit -s) per the DCOAI disclosure: generated and implemented with OpenAI Codex, including separate AI developer, technical-writer and code-reviewer roles. The primary agent independently repeated the key checks. This is agent-only verification; no human review is claimed.
Merge consideration: the waiting safety behavior is preserved in both directions: an unfinalized environment still blocks scheduling, and a successfully finalized/recovered environment still runs. This PR improves the diagnostics; it does not repair a failed plan automatically.