sensu / sensu-go

Simple. Scalable. Multi-cloud monitoring.
https://sensu.io
MIT License
1.02k stars 176 forks source link

5002-manual check execution bugfix #5042

Closed ManishaKumari295 closed 3 weeks ago

ManishaKumari295 commented 8 months ago

Closed https://github.com/sensu/sensu-go/issues/5002

Description Each manual execution of a check via the web UI or sensuctl, must execute normally as it runs when scheduled.

Change in behavior Manual execution of check used to throw an error of -'no matching entity found". With the changes made in context pass, the behaviour and fixed and matching entities are found.

Added Nothing added ,only modification in existing function

Changed The adhoc request of check execution is now processsed with the Context from resource that that an added namespace key in it. changes are made listenQueue() and ProcessCheck() in executor.go in schedulered directory.

Fixed This fixes the entity fetch for the manual executed check and is shown in logs after execution.

Change verification Added log snippet of scheduler , which comes on manual check execution .

5022_log

Snippet of testcase execution is also attached.

ManishaKumari295 commented 8 months ago

Test case- TestProcessCheck() ,test result attach

5002_TC

ed

fguimond commented 7 months ago

Nice clean fix, the draft status can be removed. Well done!

fguimond commented 7 months ago

LGTM. Just make sure you sign-off your commits (Signed-off-by: Author Name <authoremail@example.com>).

fguimond commented 7 months ago

Don't forget to add a changelog entry.

ManishaKumari295 commented 6 months ago

Don't forget to add a changelog entry.

Added the changelog.md.