Skip to content

feat: add RDS instance class modification - #264

Merged
YoungJinJung merged 3 commits into
mainfrom
feature/issue-175-rds-class-modify
Aug 14, 2026
Merged

feat: add RDS instance class modification#264
YoungJinJung merged 3 commits into
mainfrom
feature/issue-175-rds-class-modify

Conversation

@YoungJinJung

Copy link
Copy Markdown
Contributor

Summary

Implements #175: RDS instances can now be resized from the TUI.

  • m on RDS instance detail loads the orderable DB instance classes for the instance's engine/engine-version in the active region (DescribeOrderableDBInstanceOptions, deduped and sorted) into a filterable picker with wrap navigation, empty states, and a (current) marker.
  • Selecting a class opens a confirmation screen showing current vs. new class and an explicit apply immediately choice toggled with Tab (default: no — next maintenance window, labeled with the downtime implication when on).
  • The modify call is protected by the existing type-to-confirm pattern (instance identifier); class modification is instance-level even for Aurora cluster members, unlike start/stop/failover.
  • After submitting, the existing status polling loop tracks the instance until the change settles. No-option and API-error cases render actionable messages.

Testing

  • go test ./... passes: class listing (engine filters, dedupe, sort), ModifyDBInstance parameter passing, picker open/filter/select flow, apply-immediately toggle, wrong-identifier rejection, confirm-execute transition, and esc-back-to-picker.
  • make build passes.

Docs

  • README: RDS feature table row, key bindings, and a resize-flow paragraph.

Closes #175

Summary by CodeRabbit

  • New Features

    • Added support for modifying Amazon RDS instance classes.
    • Added an instance-class picker with filtering, selection, and navigation.
    • Added confirmation before applying changes, including an option to apply immediately.
    • Added status polling details for resize operations.
  • Documentation

    • Updated service catalog, keyboard shortcuts, workflow guidance, and RDS help content.
  • Tests

    • Added coverage for class selection, filtering, confirmation, navigation, and modification settings.

Add a modify-class action to RDS instance detail (`m`). unic loads the
orderable DB instance classes for the instance's engine/version in the
active region into a filterable picker that marks the current class,
then a confirmation screen shows current vs. new class with an explicit
apply-immediately toggle (Tab, default: next maintenance window) and
requires typing the instance identifier before calling
ModifyDBInstance. Class modification is instance-level even for Aurora
cluster members, and the detail screen polls status after submitting.

Closes #175

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@YoungJinJung, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8cf84a9a-f33d-4ee3-b3b7-17ee8981c149

📥 Commits

Reviewing files that changed from the base of the PR and between 808d0a6 and 2eb8e97.

📒 Files selected for processing (11)
  • README.md
  • internal/app/app.go
  • internal/app/help.go
  • internal/app/messages.go
  • internal/app/screen_rds.go
  • internal/app/screen_rds_modify_test.go
  • internal/inspector/test_helpers_test.go
  • internal/services/aws/rds.go
  • internal/services/aws/rds_model.go
  • internal/services/aws/rds_test.go
  • internal/services/aws/repository.go

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@amazon-q-developer amazon-q-developer Bot 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.

The implementation of RDS instance class modification is well-structured and follows established patterns in the codebase. The code properly handles:

  • API pagination for listing orderable instance classes with deduplication
  • User confirmation workflow with type-to-confirm for destructive operations
  • Apply immediately toggle with clear downtime warnings
  • Status polling to track modification progress
  • Proper error handling and empty state messaging

All tests pass and the feature integrates cleanly with the existing RDS management functionality.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@youngjinjung-linq youngjinjung-linq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

셀프 리뷰: happy path보다 운영 중 오해를 만들 수 있는 경로를 우선 확인했습니다.

if action == "modify" {
// Class modification is always instance-level, even for cluster members.
err = repo.ModifyDBInstanceClass(ctx, dbInstanceID, pendingClass, applyImmediately)
return rdsActionDoneMsg{action: action, instanceID: dbInstanceID, err: err}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] 수정 성공 후 기존 상태 폴링으로 넘기면 ApplyImmediately=false에서는 DB 상태가 계속 available이므로 첫 조회에서 폴링이 종료됩니다. 변경은 다음 유지보수 창에 예약됐는데 UI는 완료처럼 보이고 pending class도 표시하지 않습니다. immediate=true도 AWS가 아직 modifying으로 전환되기 전 첫 조회가 available이면 같은 조기 종료가 가능합니다. modify 결과는 PendingModifiedValues.DBInstanceClass를 모델에 담아 목표 class가 적용될 때까지 추적하거나, 적어도 deferred 요청은 폴링하지 않고 ‘예약됨’을 명시해 주세요.

Comment thread internal/app/screen_rds.go Outdated
if len(rm.filteredClasses) == 0 || rm.classIdx >= len(rm.filteredClasses) {
return *m, nil
}
rm.pendingClass = rm.filteredClasses[rm.classIdx]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P2] picker가 (current) 클래스를 그대로 선택/확인할 수 있게 두어서 사용자가 동일한 class로 ModifyDBInstance를 호출하는 무의미한 경로가 열려 있습니다. 현재 class 선택 시 여기서 바로 막거나 목록에서 제외해 주세요. 지금 테스트도 current marker 렌더링만 확인하고 이 경로는 놓칩니다.

YoungJin and others added 2 commits August 14, 2026 09:26
Address review: RDSInstance now carries PendingModifiedValues'
DBInstanceClass. The detail screen shows a Pending Class line so a
deferred modification no longer looks complete, and an immediate
modify keeps polling until the pending value clears instead of
terminating on the first available status. The class picker refuses
selecting the instance's current class, closing the no-op
ModifyDBInstance path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
@YoungJinJung

Copy link
Copy Markdown
Contributor Author

Both points addressed:

  • P1 (polling/pending): RDSInstance now maps PendingModifiedValues.DBInstanceClass. The detail screen renders a Pending Class line ("applies at next maintenance window unless applied immediately"), so a deferred modify no longer looks complete. For apply-immediately, polling continues while the pending class is set even if the first refresh reports available, and stops once it clears.
  • P2 (no-op modify): the picker now refuses selecting the instance's current class, with a test pinning the no-op path.

@YoungJinJung
YoungJinJung merged commit 7ba3049 into main Aug 14, 2026
@YoungJinJung
YoungJinJung deleted the feature/issue-175-rds-class-modify branch August 14, 2026 00:27
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.

feat: add RDS instance class modification

2 participants