redhat-et / redhat-et/skillimage
fix: GenerateKubeYAML and GeneratePodmanVolumes should return error
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9
- Forks
- 3
- Avg merge
- 18m
- Merged PRs (30d)
- 1
Description
From code review of PR #15.
GenerateKubeYAML and GeneratePodmanVolumes in pkg/collection/collection.go take io.Writer but call fmt.Fprintf without checking the returned error. As library functions, they should return error so callers can handle write failures.
Current: func GenerateKubeYAML(w io.Writer, col *SkillCollection, mountRoot string)
Proposed: func GenerateKubeYAML(w io.Writer, col *SkillCollection, mountRoot string) error
Low risk since CLI callers write to stdout, but correct for library consumers.
Contributor guide
No contributing guide indexed for this repository
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 in pkg/collection/collection.go at GenerateKubeYAML and GeneratePodmanVolumes, then inspect the CLI callers that invoke them. Update the API so write failures can be returned and handled by callers, and verify the affected generation paths still work when writing to stdout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100