puppetlabs / puppetlabs/puppet-resource_api
`close` method of transports not called
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 27
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Describe the Bug
The close method on a Transport is not called at the end of processing.
Expected Behavior
The close method on a Transport should be called to release a transport's external resources at the end of processing.
Steps to Reproduce
By a community member on slack:
As a test, i added
def close(context) context.debug('Logout connection')However, it doesn't get called. I don't see it in the logs
Additional Context
Any ruby-side resources are usually cleaned up at the end of processing by puppet device or ACE's forked processing. This does not help for resources that a transport allocates outside of ruby (e.g. opening a session on the target API).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Transport lifecycle through the end of processing, including the close method described in the issue. Confirm the existing processing paths and reproduce the missing call with a transport that logs close; done means the method is invoked so external resources can be released.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100