Skip to content

feat(pftools): enhance function failure handling with retry logic#79

Merged
freeznet merged 2 commits intomainfrom
freeznet/fix-functions-discovery-retry
Feb 5, 2026
Merged

feat(pftools): enhance function failure handling with retry logic#79
freeznet merged 2 commits intomainfrom
freeznet/fix-functions-discovery-retry

Conversation

@freeznet
Copy link
Member

@freeznet freeznet commented Feb 5, 2026

No description provided.

@freeznet freeznet self-assigned this Feb 5, 2026
@freeznet freeznet requested a review from a team as a code owner February 5, 2026 09:54
Copy link
Contributor

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 the Pulsar Function Manager's error handling by adding retry logic and failure categorization. It introduces a failure cache to track function conversion failures, classifies them as permanent, retryable, or unknown, and implements smart retry behavior to avoid excessive logging and retry attempts for permanent failures.

Changes:

  • Added failure state tracking with configurable retry intervals based on failure classification
  • Introduced error categorization to distinguish between permanent failures (e.g., no input topics, schema conversion errors) and retryable failures (e.g., network errors, auth errors)
  • Enhanced schema fetch error handling to preserve error information for better classification

Reviewed changes

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

Show a summary per file
File Description
pkg/mcp/pftools/types.go Adds failedFunctions map to track failure states, SchemaFetchError field to preserve schema fetch errors, and defines failure categories and state structure
pkg/mcp/pftools/manager_failure_cache_test.go Provides unit tests for failure skip and logging decision logic
pkg/mcp/pftools/manager.go Implements failure caching logic in updateFunctions(), adds helper functions for hash computation and failure decision-making, and enhances error handling in function conversion
pkg/mcp/pftools/errors.go Introduces new sentinel errors and classifyConvertError() function to categorize failures
pkg/mcp/pftools/errors_test.go Adds test coverage for error classification logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@freeznet freeznet merged commit ae77028 into main Feb 5, 2026
15 checks passed
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.

2 participants