Skip to content

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Oct 8, 2025


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve error handling and retry logic for schema registration and existence checks with the Red Panda schema registry. By closing response bodies properly before retries and enhancing the determination of retryable errors, these updates aim to make the schema registration process more robust against transient network and HTTP errors.

What

  • framework/components/dockercompose/.changeset/v0.1.15.md
    • Added a changeset file to document the enhancement for retryable error checks.
  • framework/components/dockercompose/chip_ingress_set/protos.go
    • Added code to close response bodies before retrying HTTP requests in checkSchemaExists and registerSingleProto functions, preventing resource leaks.
    • Removed the transformation of schema content function that modifies import statements, simplifying the codebase.
    • Expanded the isRetryableError function to include a broader range of network and HTTP errors for retries, such as timeouts and connection resets, making error handling more comprehensive.

chudilka1
chudilka1 previously approved these changes Oct 8, 2025
@Tofel Tofel marked this pull request as ready for review October 8, 2025 14:48
@Tofel Tofel requested a review from a team as a code owner October 8, 2025 14:48
@Tofel Tofel requested review from Copilot and removed request for ecPablo October 8, 2025 14:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances error handling and resource management in Red Panda's schema registration by improving retry logic and connection management. The changes focus on making the schema registration process more robust under network instability or server issues.

  • Added proper resource cleanup by closing HTTP response bodies in retry loops
  • Enhanced error classification to distinguish between retryable and non-retryable errors
  • Improved HTTP status code handling with specific logic for 4xx client errors

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
framework/components/dockercompose/chip_ingress_set/protos.go Enhanced error handling, resource cleanup, and retry logic for schema registration
framework/components/dockercompose/.changeset/v0.1.15.md Added changeset documentation for the improvements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Tofel Tofel enabled auto-merge (squash) October 10, 2025 15:50
@Tofel Tofel merged commit 53751a5 into main Oct 10, 2025
68 of 70 checks passed
@Tofel Tofel deleted the cre-1041-extra-retry-logic branch October 10, 2025 15:55
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.

3 participants