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>
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 30 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions Bot added the stale State due to inactivity label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale State due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nil Pointer Dereference in Watcher Executor -> dereference panic.

1 participant