Skip to content

Add tenant skip policy alert#919

Merged
ebattat merged 1 commit into
redhat-performance:mainfrom
ebattat:tenant_skip_policy_alert
Jun 29, 2025
Merged

Add tenant skip policy alert#919
ebattat merged 1 commit into
redhat-performance:mainfrom
ebattat:tenant_skip_policy_alert

Conversation

@ebattat

@ebattat ebattat commented Jun 22, 2025

Copy link
Copy Markdown
Member

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

Description

Add tenant skip policy alert to avoid sending email alerts for every policy, reducing the volume of alert emails

For security reasons, all pull requests need to be approved first before running any automated CI

@ebattat ebattat requested a review from athiruma June 22, 2025 06:52
@ebattat ebattat self-assigned this Jun 22, 2025
@ebattat ebattat added the enhancement New feature or request label Jun 22, 2025
@github-project-automation github-project-automation Bot moved this to In progress in benchmark-runner Jun 22, 2025
@ebattat ebattat force-pushed the tenant_skip_policy_alert branch from e254923 to a483b1e Compare June 22, 2025 06:54
@ebattat

ebattat commented Jun 23, 2025

Copy link
Copy Markdown
Member Author

ptal @halbfin 👋

@athiruma

Copy link
Copy Markdown
Contributor

@ebattat Can you add SKIP_POLICIES_ALERT in environment_variables.py
use literal_eval()

@ebattat ebattat force-pushed the tenant_skip_policy_alert branch from a483b1e to 754d526 Compare June 23, 2025 11:30
EnvironmentVariables.get_env('POLICIES_TO_ALERT', '[]'))
self._environment_variables_dict['ADMIN_MAIL_LIST'] = EnvironmentVariables.get_env('ADMIN_MAIL_LIST', '')
self._environment_variables_dict['SKIP_POLICIES_ALERT'] = literal_eval(
EnvironmentVariables.get_env('SKIP_POLICIES_ALERT', "['']"))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@athiruma done !

@athiruma athiruma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@ebattat ebattat force-pushed the tenant_skip_policy_alert branch from 754d526 to 34c3ea0 Compare June 23, 2025 12:22
// By default, all policies are running in dry_run="yes" mode and the whole list can be found in run_policies.py
// POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode
POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles", "zombie_cluster_resource"]'
SKIP_POLICIES_ALERT = '["unused_access_key"]'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@athiruma,
I moved POLICIES_IN_ACTION and SKIP_POLICIES_ALERT to environment section in ecoeng_01, ecoeng_02 and ecoeng_03.
can you pls review it ?

@athiruma athiruma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@halbfin

halbfin commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

lgtm

@ebattat ebattat merged commit 7b52e8d into redhat-performance:main Jun 29, 2025
6 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in benchmark-runner Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants