Skip to content

[OPIK-7159][OPIK-7029] [BE][FE][SDK] revert: back out premature merge of #7428#7509

Closed
awkoy wants to merge 2 commits into
mainfrom
awkoy/revert-7428-opik-7159
Closed

[OPIK-7159][OPIK-7029] [BE][FE][SDK] revert: back out premature merge of #7428#7509
awkoy wants to merge 2 commits into
mainfrom
awkoy/revert-7428-opik-7159

Conversation

@awkoy

@awkoy awkoy commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Details

Reverts #7428 (squash commit 02df18a), which was merged before full sign-off (a single approval; @thiagohora's review was still comments-only).

This is a pure revert of the application changes plus one CI fix required to make the revert itself pass:

  • Revert of the OPIK-7159 stalled-run reaper + OPIK-7029 error-surfacing changes across backend, python-backend, optimizer SDK, and frontend.
  • CI fix to scripts/check_backend_migration_conflicts.sh: add --diff-filter=A so the migration-prefix checker only treats added .sql files as new migrations. Without it, reverting any migration-bearing PR fails the check, because the deleted migration is reported as changed and then flagged as conflicting with its own still-present prefix on main.

The feature branch awkoy/opik-7159-stuck-init-reaper is preserved intact so the work can be re-landed via a fresh PR once review is complete.

Change checklist

Issues

Resolves the premature merge of OPIK-7159 / OPIK-7029.

Testing

Documentation

No documentation changes; this is a revert.

@awkoy
awkoy requested review from a team as code owners July 17, 2026 12:33
@github-actions github-actions Bot added 🔴 size/XL python Pull requests that update Python code java Pull requests that update Java code Frontend Backend Infrastructure tests Including test files, or tests related like configuration. typescript *.ts *.tsx Python SDK TypeScript SDK Optimizer SDK labels Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

⏱️ pre-commit per-hook timing

Hook Description Result Duration
🌐 typecheck — frontend Whole-project tsc type check 41.42s
📘 typecheck — typescript sdk Whole-project tsc type check 14.66s
🌐 eslint — frontend Lint + autofix JS/TS 9.17s
⚓ helm-docs Regenerate Helm chart README 7.57s
🤖 mypy — optimizer Static type check 5.35s
☕ spotless — java backend Format Java code 4.68s
📘 eslint — typescript sdk Lint + autofix JS/TS 1.17s
🧹 vulture — optimizer Find dead code 0.82s
📊 xenon — optimizer Fail on complexity thresholds 0.60s
📊 lizard — optimizer Cyclomatic-complexity gate 0.48s
📊 radon cc — optimizer Cyclomatic-complexity gate 0.43s
🤖 pyupgrade — optimizer Modernize Python syntax 0.17s
🔤 codespell — optimizer Fix common misspellings 0.16s
📊 radon raw — optimizer Raw size metrics gate 0.16s
🤖 check for case conflicts — optimizer Block case-only name clashes 0.08s
🤖 check for added large files — optimizer Block large files (>1MB) 0.05s
🤖 check for merge conflicts — optimizer Block merge-conflict markers 0.04s
🤖 fix end of files — optimizer Ensure files end in a newline 0.04s
🤖 trim trailing whitespace — optimizer Strip trailing whitespace 0.04s
🔐 detect private key — optimizer Block committed private keys 0.03s
🤖 ruff-format — optimizer Format Python code (ruff) 0.01s
🤖 ruff — optimizer Lint + autofix Python (ruff) 0.01s
Total (22 ran) 87.14s
⏭️ 19 skipped (no matching files changed)
Hook Description Result
🐍 trim trailing whitespace — python sdk Strip trailing whitespace ⏭️
🐍 fix end of files — python sdk Ensure files end in a newline ⏭️
🐍 ruff — python sdk Lint + autofix Python (ruff) ⏭️
🐍 ruff-format — python sdk Format Python code (ruff) ⏭️
🐍 mypy — python sdk Static type check ⏭️
🤖 check yaml — optimizer Validate YAML syntax ⏭️
🤖 check json — optimizer Validate JSON syntax ⏭️
🤖 check toml — optimizer Validate TOML syntax ⏭️
📓 nbstripout — optimizer notebooks Strip notebook output ⏭️
📝 markdownlint — optimizer Lint Markdown ⏭️
🛡️ trim trailing whitespace — guardrails Strip trailing whitespace ⏭️
🛡️ fix end of files — guardrails Ensure files end in a newline ⏭️
🛡️ ruff — guardrails Lint + autofix Python (ruff) ⏭️
🛡️ ruff-format — guardrails Format Python code (ruff) ⏭️
🛡️ mypy — guardrails Static type check ⏭️
block non-public FE plugins Block non-public FE plugins ⏭️
🧪 pre-commit wrapper smoke tests Self-test the wrapper scripts ⏭️
⚙️ actionlint — github workflows Lint GitHub Actions workflows ⏭️
🐳 hadolint — dockerfiles Lint Dockerfiles ⏭️

A revert of a migration-bearing PR deletes the .sql file; without a diff
filter the checker treated the deletion as a new migration and flagged it
as conflicting with its own still-present prefix on main. Only ADDED files
are new migrations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@awkoy awkoy changed the title Revert "[OPIK-7159][OPIK-7029] feat: recover stuck optimization runs + surface run errors (#7428)" [OPIK-7159][OPIK-7029] [BE][FE][SDK] revert: back out premature merge of #7428 Jul 17, 2026
Comment on lines 27 to +29
get_new_migrations() {
local dir=$1
git diff --name-only origin/main...HEAD -- "$dir" | grep '\.sql$' || true
git diff --name-only --diff-filter=A origin/main...HEAD -- "$dir" | grep '\.sql$' || true

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.

get_new_migrations() uses --diff-filter=A, so renamed/copied .sql migrations never reach NEW_MIGRATIONS and the prefix-conflict check is bypassed — should we include R/C statuses or explicitly fail renames as unsupported?

Severity web_search

Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
In scripts/check_backend_migration_conflicts.sh around lines 27-29, inside
get_new_migrations(), the git diff uses --diff-filter=A and only returns added files,
ignoring renamed/copied migrations reported as R/C by git, so the prefix/conflict loop
at lines 75-86 can be bypassed entirely. Refactor get_new_migrations to either: (a)
include renamed/copied .sql destination paths in NEW_MIGRATIONS by adding R and C to the
diff-filter (e.g., --diff-filter=ACR), ensuring the existing prefix-conflict logic runs
for these cases, or (b) explicitly detect R/C statuses and fail the job with a clear
message that migration renames/copies are not allowed. Use a diff mode that preserves
rename/copy information (e.g., --name-status or an appropriate --diff-filter) and ensure
.sql files are still filtered correctly in both cases.

@awkoy

awkoy commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of fixing forward. The feature stays on main; @thiagohora's post-merge review feedback is addressed in a focused follow-up PR #7512 (scope the update lock to metadata writes so status writes are Redis-independent; make the reaper lookback margin configurable). No revert needed.

@awkoy awkoy closed this Jul 17, 2026
@awkoy
awkoy deleted the awkoy/revert-7428-opik-7159 branch July 17, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Frontend Infrastructure java Pull requests that update Java code Optimizer SDK Python SDK python Pull requests that update Python code 🔴 size/XL tests Including test files, or tests related like configuration. TypeScript SDK typescript *.ts *.tsx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant