Skip to content

[data] Improve download/upload error output#288

Merged
ldmonster merged 3 commits intomainfrom
fix/data-improve-not-ready-errors
Mar 3, 2026
Merged

[data] Improve download/upload error output#288
ldmonster merged 3 commits intomainfrom
fix/data-improve-not-ready-errors

Conversation

@kkozoriz
Copy link
Contributor

Description

Problem

When d8 data export download or d8 data import upload commands encounter a not-ready resource, the error message is generic and unhelpful - e.g., DataExport ns/name is not Ready. Users have no way to understand the root cause (timeout, misconfiguration, controller issue, etc.) and cannot take corrective action.

Additionally, during the retry loop (up to 60 attempts), there is no intermediate feedback - the command appears to hang silently until it either succeeds or fails after ~3 minutes.

Solution

  • Include Kubernetes condition Message and Reason fields in all "not Ready" error messages for both DataExport and DataImport resources. The error now reads: DataExport ns/name is not Ready: <message> (<reason>).
  • Add periodic progress logging every 5th retry attempt (~15 seconds) in GetDataExportWithRestart and GetDataImportWithRestart, so users can see the current status and attempt number while waiting.

Before fix

image

After fix

image

Signed-off-by: Konstantin Kozoriz <konstantin.kozoriz@flant.com>
@kkozoriz kkozoriz requested a review from ldmonster as a code owner February 27, 2026 07:36
@kkozoriz kkozoriz self-assigned this Feb 27, 2026
ipaqsa
ipaqsa previously approved these changes Mar 2, 2026
Signed-off-by: Konstantin Kozoriz <konstantin.kozoriz@flant.com>
Signed-off-by: Konstantin Kozoriz <konstantin.kozoriz@flant.com>
@kkozoriz kkozoriz requested a review from ipaqsa March 2, 2026 17:52
Copy link

@kneumoin kneumoin left a comment

Choose a reason for hiding this comment

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

t’s better to inject the logger in New(...) and ensure it’s non-nil there, instead of relying on callers. This avoids potential nil panics and keeps logging setup centralized.

@kkozoriz kkozoriz removed the request for review from AleksZimin March 3, 2026 08:37
@ldmonster ldmonster merged commit e0ff410 into main Mar 3, 2026
5 checks passed
@ldmonster ldmonster deleted the fix/data-improve-not-ready-errors branch March 3, 2026 14:07
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.

4 participants