• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codozor / fwkeeper
48%
main: 45%

Build:
Build:
LAST BUILD BRANCH: feat/error-classification-pod-lifecycle
DEFAULT BRANCH: main
Repo Added 22 Nov 2025 08:58AM UTC
Files 14
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH feat/error-classification-pod-lifecycle
branch: feat/error-classification-pod-lifecycle
CHANGE BRANCH
x
Reset
  • feat/error-classification-pod-lifecycle
  • feat/forwarder-integration-tests
  • feat/improve-config-validation
  • feat/tests
  • main

23 Nov 2025 05:32PM UTC coverage: 47.845% (-1.8%) from 49.624%
19614896009

Pull #10

github

SebastienLaurent-CF
✨ feat: Implement typed error classification for pod lifecycle events

Add type-aware error handling to locators for intelligent retry strategies.
Instead of treating all errors identically, distinguish between transient errors
(retry with backoff) and permanent errors (fail fast).

## Implementation

**New Error Package** (internal/locator/errors.go)
- ErrorType enum with 10 classified error types:
  - Transient: NetworkTransient, APITransient, (pod initializing)
  - Permanent: ResourceNotFound, PodNotRunning, PodFailed, ConfigInvalid, PermissionDenied
  - Uncertain: NoPodAvailable (might retry longer based on context)
- LocateError wrapper with type info + error unwrapping
- Helper functions for creating typed errors: NewResourceNotFoundError(), NewPodFailedError(), etc.

**Updated Locators** (pod.go, service.go, selector_based_locator.go)
- Detect error types using Kubernetes API predicates (IsNotFound, IsTimeout, IsForbidden, etc.)
- Return typed LocateError instead of generic fmt.Errorf
- Classify API errors (timeout, forbidden, not found) separately from resource state errors
- Port mapping errors classified as ConfigInvalid (user configuration issues)

**Test Updates** (locator_test.go)
- Updated assertions to match new error messages (more specific, less generic)
- All 129 tests passing with zero regressions
- Error messages now clearly indicate error type: "X not found" vs "X is in failed state"

## Benefits

✅ Enables forwarder to implement intelligent retry strategies per error type
✅ Transient errors: exponential backoff retry
✅ Permanent errors: fail fast or give up after few attempts
✅ Better error messages: developers see what went wrong (config vs API vs resource)
✅ Foundation for improved observability: errors can be classified and monitored
Pull Request #10: ✨ feat: Implement typed error classification for pod lifecycle events

42 of 147 new or added lines in 4 files covered. (28.57%)

433 of 905 relevant lines covered (47.85%)

0.53 hits per line

Relevant lines Covered
Build:
Build:
905 RELEVANT LINES 433 COVERED LINES
0.53 HITS PER LINE
Source Files on feat/error-classification-pod-lifecycle
  • Tree
  • List 14
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
19614896009 feat/error-classification-pod-lifecycle ✨ feat: Implement typed error classification for pod lifecycle events Add type-aware error handling to locators for intelligent retry strategies. Instead of treating all errors identically, distinguish between transient errors (retry with backoff... Pull #10 23 Nov 2025 05:38PM UTC SebastienLaurent-CF github
47.85
See All Builds (18)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc