Skip to content

fix: display lifecycle actions with correct versions and schedules - #240

Merged
cxymds merged 1 commit into
rustfs:mainfrom
hellozhongying:codex/fix-lifecycle-action-display
Sep 21, 2026
Merged

cxymds merged 1 commit into
rustfs:mainfrom
hellozhongying:codex/fix-lifecycle-action-display

Conversation

@hellozhongying

@hellozhongying hellozhongying commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

A rule containing both Expiration.Days and NoncurrentVersionExpiration.NoncurrentDays currently displays only the current-version days, labeled as noncurrent. Render every expiration and transition action with its own version, schedule, tier and delete-marker setting on desktop and mobile. For the reported example, the two rules now show current/noncurrent expiration at 30/40 and 10/20 days respectively.

Keep one table row/mobile card and one delete control per original rule. Display expansion does not mutate the stored configuration or change whole-rule deletion. Preserve zero-day transitions and date-based schedules; date values are no longer presented under a days-only heading.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed

Passed locally with Node 22:

pnpm install --frozen-lockfile
pnpm type-check
pnpm lint
pnpm format:check
pnpm test:run
git diff --check

All 607 tests passed. Five new regressions cover the issue examples, per-transition tiers and zero days, delete-marker cleanup alongside noncurrent expiration, date schedules and empty transition arrays, and preservation of the original rule for deletion.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Fixes rustfs/rustfs#8036

Screenshots (if applicable)

Captured against the same authenticated RustFS 1.0.0 backend and isolated empty test bucket, using the pre-fix and fixed component in the same local Console environment. Desktop viewport: 1440 × 1000 (content crop); mobile viewport: 390 × 844. All four screenshots use the English UI. Screenshots omit account identifiers and credentials.

Desktop before Desktop after
Before After
Mobile before Mobile after
Before After

Additional Notes

This change targets the Console repository; no RustFS backend lifecycle execution changes are needed for the display mapping defect. Independent code review checked action alignment and whole-rule deletion. Authenticated browser verification confirmed both issue examples on desktop and mobile, including refresh and full reload. Deleting one combined rule through the mobile UI removed that whole rule; a fresh S3 API read confirmed the other rule retained both expiration actions. The test rules were restored afterward. No existing application buckets were modified. The local Console used a loopback-only same-origin proxy to the test backend; the backend configuration was unchanged. This verifies configuration display and rule deletion, not time-based object expiration execution.

@cxymds

cxymds commented Sep 21, 2026

Copy link
Copy Markdown
Member

@hellozhongying, could you please modify the Screenshot to English

@hellozhongying

Copy link
Copy Markdown
Contributor Author

@hellozhongying, could you please modify the Screenshot to English
Sure, no problem.

@cxymds

cxymds commented Sep 21, 2026

Copy link
Copy Markdown
Member

There is one more minor issue. I will push the changes and merge them once completed

cxymds commented Sep 21, 2026

Copy link
Copy Markdown
Member

I could not update the fork branch directly because the GitHub integration has no write permission to hellozhongying/console. I published the follow-up implementation in rustfs/console#243, based on the same lifecycle display work.

It adds the missing regression behavior: Expiration: {} and NoncurrentVersionExpiration: {} produce no display action, while explicit delete-marker, zero-day, date, and non-empty transition fields remain visible. The PR includes English desktop/mobile screenshots and passing local test results.

Backend follow-up: MinIO rejects an empty <Expiration/>; RustFS currently treats expiration.is_some() as sufficient during rule validation. The Console fix filters the invalid/empty display container, but RustFS should separately validate the effective fields (Days/Date/ExpiredObjectDeleteMarker) and add a backend regression test.

@cxymds
cxymds merged commit c15cd2f into rustfs:main Sep 21, 2026
10 checks passed

cxymds commented Sep 21, 2026

Copy link
Copy Markdown
Member

PR #243 conflicted after #240 landed on main, so I closed it and recreated the fix cleanly from the latest main as PR #244. The new PR contains only the empty-action filtering, regression tests, and English screenshots.

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.

Lifecycle UI incorrectly displays Expiration days as Noncurrent Version and omits NoncurrentVersionExpiration

2 participants