Skip to content

fix(watcher): skip context when Microcks client cannot be created#482

Open
SAY-5 wants to merge 1 commit into
microcks:masterfrom
SAY-5:fix-watcher-nil-client
Open

fix(watcher): skip context when Microcks client cannot be created#482
SAY-5 wants to merge 1 commit into
microcks:masterfrom
SAY-5:fix-watcher-nil-client

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 24, 2026

Copy link
Copy Markdown

Problem

In TriggerImport, when connectors.NewClient fails it logs the error but
keeps going, so the code reaches mc.UploadArtifact with a nil client and the
watcher process panics with a nil pointer dereference (#475). This happens for
example when a watch entry references a context that cannot be resolved.

Fix

continue to the next context after logging the connection error, so a failed
context is skipped instead of crashing the daemon.

Added a regression test in pkg/watcher that drives TriggerImport with an
unresolvable context; it panics without the change and passes with it.

Fixes #475

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

Nil Pointer Dereference in Watcher Executor -> dereference panic.

1 participant