apache / apache/flink-agents

[Tech Debt][runtime][python][skills] Preserve skill-repository close failures

Open
#1,108 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
452
Forks
167
Avg merge
5d 9h
Merged PRs (30d)
49

Description

## Problem

`python/flink_agents/runtime/skill/skill_manager.py` currently suppresses every exception from `SkillRepository.close()` in `SkillManager.close()`. It still attempts later repositories, but a failure is neither re-raised nor logged. As a result, an extension-provided repository cleanup failure is invisible to callers.

This differs from the Java `SkillManager.closeRepos()` contract introduced in #987: it attempts every repository close, then rethrows the first failure after the loop. Python `ResourceCache.close()` follows the same close-everything-then-surface-the-first-failure pattern.

The current in-tree repository implementations do not raise on close, so this is a contract/parity defect for the public `SkillRepository` extension point rather than a known incident in a bundled repository.

## Proposed direction

Make Python `SkillManager.close()` attempt every distinct repository and rethrow the first close failure after the loop, logging later failures consistently with `ResourceCache.close()`. Add focused tests using test repositories whose `close()` raises, including a case that proves later repositories are still closed.

This is an observable behavior change, so I am seeking committer support before preparing a PR, as required by the contribution guide.

Contributor guide

Open the contributing guide

Research direction

Start in python/flink_agents/runtime/skill/skill_manager.py and inspect SkillManager.close(), then compare its behavior with ResourceCache.close() and the Java SkillManager.closeRepos() contract described in the issue. Add focused tests with repositories whose close() raises, including a case proving later repositories still close. Done means the first failure is surfaced after all distinct repositories are attempted and later failures are logged consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.