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

[RHINENG-7833] - Send notification newly-stale hosts #2123

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jpramos123
Copy link
Contributor

@jpramos123 jpramos123 commented Dec 9, 2024

Overview

This PR is being created to address RHINENG-7833.
It adds the functionality of sending notitications for hosts that went stale in the last X seconds. To define this X seconds, an environment variable called STALE_VALIDATION_WINDOW_SECONDS was created, its default values is set to 1 hour.
It also refacts the host reaper, as this new feature is also a job that runs every certain amount of time. The common code used by both jobs were added to the jobs/common.py file.

PR Checklist

  • Keep PR title short, ideally under 72 characters
  • Descriptive comments provided in complex code blocks
  • Include raw query examples in the PR description, if adding/modifying SQL query
  • Tests: validate optimal/expected output
  • Tests: validate exceptions and failure scenarios
  • Tests: edge cases
  • Recovers or fails gracefully during potential resource outages (e.g. DB, Kafka)
  • Uses type hinting, if convenient
  • Documentation, if this PR changes the way other services interact with host inventory
  • Links to related PRs

Secure Coding Practices Documentation Reference

You can find documentation on this checklist here.

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

@jpramos123 jpramos123 marked this pull request as ready for review December 12, 2024 21:36
@jpramos123 jpramos123 requested a review from a team as a code owner December 12, 2024 21:36
@jpramos123 jpramos123 force-pushed the add-notif-stale-host branch 5 times, most recently from 746edf5 to 8061985 Compare December 17, 2024 13:28
@jpramos123
Copy link
Contributor Author

/retest

@jpramos123 jpramos123 force-pushed the add-notif-stale-host branch 5 times, most recently from 84ed896 to 6820653 Compare December 17, 2024 19:27
Copy link
Contributor

@FabriciaDinizRH FabriciaDinizRH left a comment

Choose a reason for hiding this comment

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

I think this needs more tests, but I'll not block it

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.

2 participants