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

Merged
merged 9 commits into from
Sep 12, 2024
Merged

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 ManishaKumari295 self-assigned this Jan 21, 2024
@ManishaKumari295 ManishaKumari295 force-pushed the bugfix/manualCheckExe_5002 branch from 2f17c12 to fd92f77 Compare January 30, 2024 11:07
@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 <[email protected]>).

@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 <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
@ManishaKumari295 ManishaKumari295 force-pushed the bugfix/manualCheckExe_5002 branch from 9cb2b06 to 1b44a38 Compare March 14, 2024 09:23
@ManishaKumari295
Copy link
Author

Don't forget to add a changelog entry.

Added the changelog.md.

@fguimond fguimond merged commit 1856562 into develop/6 Sep 12, 2024
59 checks passed
@fguimond fguimond deleted the bugfix/manualCheckExe_5002 branch September 12, 2024 13:23
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.

3 participants