redhat-et / redhat-et/skillimage

fix: GenerateKubeYAML and GeneratePodmanVolumes should return error

Open Beginner friendly
#17 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.