Registration panics on a component definition with no status
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in models/registration/register.go and trace the CSV, URL, or file import path into RegistrationHelper.register. Exercise an import containing a component without status; done means it records an InsertEntityRegError, continues processing the remaining components, and does not return a panic or 500 for the whole batch.
Written by the indexing model from the issue text.
Description
Current Behavior
RegistrationHelper.register (models/registration/register.go) dereferences comp.Status unconditionally:
for _, comp := range pkg.Components {
status := *comp.Status // panics if Status is nil
if status == component.Ignored {
continue
}
ComponentDefinition.Status is a *ComponentDefinitionStatus, and getEntity unmarshals component definitions without requiring it, so a definition that omits status unmarshals cleanly with Status == nil and panics here — on the first component of the loop, before the per-item error handling further down can skip just the bad item.
Consequence
Reachable from the model-registration import paths (CSV/URL/file import) and at startup seeding. Because it runs in the request goroutine, net/http's recover keeps the process up, but the panic aborts the entire import batch with a 500 instead of skipping the one malformed component — unlike every other error in this function, which records an entity reg error and continues.
Desired Behavior
Skip a statusless component the same way other bad items are handled: record an InsertEntityRegError and continue.
I have the fix ready (GOOS=linux build + vet pass) and will open a PR referencing this issue.
- Dominant language
- Go
- Stars
- 223
- Forks
- 225
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 3
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.
More from meshery/meshkit
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100