Skip to content

Replace deprecated environment status DESTROYED with DONE - #2258

Closed
graduta wants to merge 3 commits into
mainfrom
refactor/remove-destroyed-environment-status
Closed

graduta wants to merge 3 commits into
mainfrom
refactor/remove-destroyed-environment-status

Conversation

@graduta

@graduta graduta commented Oct 20, 2026

Copy link
Copy Markdown
Member

I DON'T have JIRA ticket

  • explain what this PR does

    The DESTROYED environment status is deprecated in favour of DONE. This PR migrates existing data and removes every usage of DESTROYED in the code, seeders and tests.

  • if it is a new feature, explain how you plan to use it

  • tests are added (existing tests/seeders updated to use DONE)

  • documentation was updated or added

Notable changes for users:

  • Environments previously in DESTROYED status are now shown as DONE; DESTROYED is no longer available in the status filter

Notable changes for developers:

  • DESTROYED removed from status enums (server and public), history item DTO validation, status colours and raw SQL queries
  • GetAllEnvironmentsUseCase: status history filter simplified, a trailing X now only anchors the match to the end of the history (single DONE status)
  • transitionToErrorLostEnvironments now also excludes environments already DONE
  • Seeders and tests updated
  • Note: AliEcsSynchronizer forwards the AliECS state as is, so an incoming DESTROYED state would now be rejected by validation

Changes made to the database:

  • New migration 20261019110000-environment-destroyed-status-to-done: UPDATE environments_history_items SET status = 'DONE' WHERE status = 'DESTROYED' (down is a no-op as the conversion cannot be reverted)

graduta and others added 3 commits October 20, 2026 12:45
…o DONE

Add a migration converting DESTROYED history items to DONE and update the seeders accordingly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DONE is now the only terminal status: drop DESTROYED from the status enums, DTO validation, colours and SQL queries, and simplify the status history filter of GetAllEnvironmentsUseCase now that 'X' maps to a single status.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…status

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@graduta
graduta requested a review from isaachilly as a code owner October 20, 2026 10:45
@graduta graduta added frontend backend DB test Label to be used when PR is only about tests labels Oct 20, 2026
@graduta

graduta commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Closing: superseded by a PR from the correctly named branch (O2B-1515).

@graduta graduta closed this Oct 20, 2026
@graduta
graduta deleted the refactor/remove-destroyed-environment-status branch October 20, 2026 10:47
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 46.44%. Comparing base (84122e4) to head (2390709).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...1019110000-environment-destroyed-status-to-done.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2258      +/-   ##
==========================================
- Coverage   46.49%   46.44%   -0.05%     
==========================================
  Files        1051     1053       +2     
  Lines       17341    17352      +11     
  Branches     3156     3160       +4     
==========================================
- Hits         8062     8060       -2     
- Misses       9279     9292      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

backend DB frontend test Label to be used when PR is only about tests

Development

Successfully merging this pull request may close these issues.

1 participant