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

enh(plugin): add --since-hours to ansible::tower::mode::jobs #4990

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Ruzgfpegk
Copy link

Description

The apps::automation::ansible::tower plugin, in its jobs mode, takes into account all the jobs of Ansible Tower.

In some cases, it's fine to disregard old failed jobs (including those that pass the --filter-name parameter) and only monitor recent ones, which is why a new --since-hours option is proposed here.

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Target serie

  • 22.04.x
  • 22.10.x
  • 23.04.x
  • 23.10.x
  • 24.04.x (master)

How this pull request can be tested ?

Using "--plugin=apps::automation::ansible::tower::plugin --mode=jobs" and other usual settings for this plugin against an Ansible Tower URL, add the --since-hours option with a numeral to check only the jobs that finished less than [numeral] hours ago.

For instance, "--since-hours=24" for the jobs of the past 24 hours.

When the option is omitted, nothing should change.

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock) ❗ Useless here
  • I have commented my code, especially hard-to-understand areas of the PR. ❗ Useless here
  • I have rebased my development branch on the base branch (master, maintenance).

@Ruzgfpegk Ruzgfpegk requested a review from a team as a code owner April 11, 2024 14:01
@Ruzgfpegk Ruzgfpegk requested a review from omercier April 11, 2024 14:01
@lucie-dubrunfaut
Copy link
Contributor

Hello :)

First, thank you very much for your contribution 🙏
We started the process to include the review, test and incorporation of this PR. In order to facilitate testing, would it be possible for you to provide us anonymized test data corresponding to this PR, to facilitate tests step?
Thank you for your understanding.

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

2 participants