Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Handling in InstalledBundle Determination and Logic #1027

Open
bentito opened this issue Jul 9, 2024 · 0 comments
Open

Improve Error Handling in InstalledBundle Determination and Logic #1027

bentito opened this issue Jul 9, 2024 · 0 comments

Comments

@bentito
Copy link
Contributor

bentito commented Jul 9, 2024

Improve Error Handling in InstalledBundle Determination and Logic

Summary

Current error handling in the InstalledBundle determination follows a simplistic approach of zeroing out state and returning an error. This issue aims to develop a more nuanced error handling strategy that preserves as much state as possible, continues progress where feasible, and maintains context of installed bundles even when encountering errors in catalog connections.

Details

Context

During the reconciliation process, the current error handling approach involves zeroing out state and returning an error, which can lead to loss of important context about the installed bundles. This is not ideal, especially when partial progress can still be reported, and previous state can be preserved. Discussions have highlighted the following key points:

  • Progressing Status: The need for a Progressing status to describe scenarios where different versions are installed and resolved.
  • Helm Secret as Source of Truth: Logic should consider the Helm secret as the source of truth for the installed bundle.
  • ActionClient.Get: Potential use of Helm helper functions like ActionClient.Get to aid in this process.

Problem

  1. Loss of Installed Bundle Context: When errors occur, especially in catalog connections, the currently installed bundle is removed from the status, despite it still being installed.
  2. Early Error Termination: The current reconciliation logic stops at the first encountered error, missing out on capturing and preserving partial state.

Goals

  1. Preserve State: Implement error handling that retains the context of the installed bundle even in error scenarios.
  2. Report Partial Progress: Ensure the system continues to report as much progress as possible even when encountering errors.

Action Items

  1. Refactor Error Handling:

    • Develop a strategy to preserve the previous state when an error occurs, particularly focusing on maintaining the context of the installed bundle.
    • Ensure that partial progress is reported wherever feasible.
  2. Separate Installed Bundle Determination:

    • Isolate the logic for determining the installed bundle from the rest of the reconciliation process to simplify error handling and improve clarity.
    • Use the Helm secret as the source of truth for the installed bundle status.

References

Additional Notes

This issue is not being resolved in the PR #1007. However, it is crucial to address these improvements in the near future to enhance the reconciliation process.

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

No branches or pull requests

1 participant