Skip to content

ACLP clone alert definition and addition of group by field in alerting APIs#704

Open
shkaruna wants to merge 11 commits into
linode:devfrom
shkaruna:feat/clone_and_group_by
Open

ACLP clone alert definition and addition of group by field in alerting APIs#704
shkaruna wants to merge 11 commits into
linode:devfrom
shkaruna:feat/clone_and_group_by

Conversation

@shkaruna

@shkaruna shkaruna commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📝 Description

This PR adds support for the group_by field on ACLP Monitor Alert Definitions and introduces a clone API operation, along with unit/integration tests.

Changes:
Add GroupBy (group_by) to alert definition class.
Add clone_alert_definition API.
Expand unit/integration tests and fixtures to cover group_by and cloning.

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?
Not applicable

How do I run the relevant unit/integration tests?

Prerequisites:
Clone the repository
Prepare environment (zsh / macOS)

Create and activate venv:
python3 -m venv .venv
source .venv/bin/activate

install deps
python -m pip install --upgrade pip

Install runtime dependencies:
pip3 install requests polling deprecated

Install dev/test extras
pip3 install -e '.[dev,test]'

test deps
pip3 install pytest mock httpretty pytest-rerunfailures

Unit tests:

Run all unit tests:
python -m pytest test/unit -q

Run Monitor alert definition unit tests:
python -m pytest test/unit/groups/monitor_api_test.py -q -s -v

Integration tests:

python -m pytest test/integration/models/monitor/test_monitor.py::test_integration_clone_alert_definition -q -s

python -m pytest test/integration/models/monitor/test_monitor.py::test_integration_create_get_update_delete_alert_definition -q -s

Comment thread test/fixtures/monitor_services_dbaas_alert-definitions_12345_clone.json Outdated
Comment thread test/fixtures/monitor_services_dbaas_alert-definitions_12345_clone.json Outdated
Comment thread test/integration/models/monitor/test_monitor.py
@shkaruna shkaruna force-pushed the feat/clone_and_group_by branch from 21396ef to b957929 Compare June 9, 2026 04:56
@shkaruna shkaruna force-pushed the feat/clone_and_group_by branch from b957929 to 3527e51 Compare June 9, 2026 07:22

@satkumar-akamai satkumar-akamai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@shkaruna shkaruna marked this pull request as ready for review June 9, 2026 07:29
@shkaruna shkaruna requested review from a team as code owners June 9, 2026 07:29
@shkaruna shkaruna requested review from ezilber-akamai and psnoch-akamai and removed request for a team June 9, 2026 07:29
@shkaruna shkaruna changed the title Feat/clone and group by ACLP clone alert definition and addition of group by field in alerting APIs Jun 9, 2026
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.

6 participants