Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5002-manual check execution bugfix #5042

Open
wants to merge 9 commits into
base: develop/6
Choose a base branch
from

Conversation

ManishaKumari295
Copy link

@ManishaKumari295 ManishaKumari295 commented Jan 21, 2024

Closed #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
Copy link
Author

Test case- TestProcessCheck() ,test result attach
5002_TC
ed

//display matched entities
matchedEntityJson, _ := json.Marshal(matchedEntities)
matchedEntityJsonData := string(matchedEntityJson)
logger.WithFields(fields).Infof("matched entities: %s", matchedEntityJsonData)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of a log here but it should probably be at the Debug level, as we might not want to view this under normal operations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of a log here but it should probably be at the Debug level, as we might not want to view this under normal operations.

Removed the logs from code

@fguimond
Copy link
Contributor

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

@ManishaKumari295 ManishaKumari295 marked this pull request as ready for review February 15, 2024 06:21
@fguimond
Copy link
Contributor

fguimond commented Feb 22, 2024

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

@fguimond
Copy link
Contributor

Don't forget to add a changelog entry.

ManishaKumari295 and others added 9 commits March 14, 2024 14:53
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
Signed-off-by: manisha kumari <manisha.kumari@calsoftinc.com>
@ManishaKumari295
Copy link
Author

Don't forget to add a changelog entry.

Added the changelog.md.

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.

None yet

3 participants