Skip to content

Fix nil panics and route loss during config sync cycles#68

Merged
adranwit merged 1 commit intoviant:masterfrom
kkincaidV:nil-fix
Feb 24, 2026
Merged

Fix nil panics and route loss during config sync cycles#68
adranwit merged 1 commit intoviant:masterfrom
kkincaidV:nil-fix

Conversation

@kkincaidV
Copy link
Contributor

Fix nil panics and route loss during config sync cycles

  • provider.go: Return cached component when route file is deleted
    instead of returning nil. Prevents nil pointer panics on requests
    to routes whose YAML files were archived by the sync watcher.

  • service.go: Skip router replacement when the new router has fewer
    routes than the existing one. Prevents file-consumption sync cycles
    from degrading a healthy router with a partial one.

  • handler.go: Add nil guards for component and output type parameters
    in Handle and writeErrorResponse to prevent panics when a component
    is unavailable or partially loaded.

@adranwit adranwit merged commit f705cce into viant:master Feb 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants