Skip to content

TPT-3596: Project CloudPulse Metrics Integration for Core Compute - #750

Open
yec-akamai wants to merge 3 commits into
devfrom
proj/aclp-linode-alerts
Open

yec-akamai wants to merge 3 commits into
devfrom
proj/aclp-linode-alerts

Conversation

@yec-akamai

@yec-akamai yec-akamai commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📝 Description

Merge the cloud pulse metrics project into dev.

✔️ How to Test

make test-unit
make TEST_CASE=test_get_linodes_verify_alerts test-int
make TEST_CASE=test_linode_rebuild test-int
make TEST_CASE=test_linode_alerts_workflow test-int
make TEST_CASE=make TEST_CASE=test_update_linode_aclp_alerts test-int

yec-akamai and others added 3 commits February 19, 2026 16:25
* Create tests for Linode integration with alerts

* Code review fixes

* Remove test test_try_to_update_linode_alerts_legacy_and_aclp_at_the_same_time and add test test_update_linode_aclp_alerts

* Apply code review suggestions

* Submit code review suggestions
# Conflicts:
#	linode_api4/groups/linode.py
#	linode_api4/objects/linode.py
#	test/integration/conftest.py
#	test/unit/objects/linode_test.py
@yec-akamai
yec-akamai requested review from a team as code owners October 13, 2026 18:26
@yec-akamai
yec-akamai requested review from ezilber-akamai and psnoch-akamai and removed request for a team October 13, 2026 18:26
@yec-akamai yec-akamai added the project for new projects in the changelog. label Oct 13, 2026
@ezilber-akamai
ezilber-akamai requested a balanced review from Copilot October 19, 2026 18:24

Copilot AI 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.

🟡 Changes recommended

Positional API compatibility is broken, and integration tests need corrections to alert selection, persistence verification, and resource cleanup.

7 open issues
What changed in this PR

Adds CloudPulse alert support to core compute instances in the Python SDK.

Changes:

  • Adds typed legacy and CloudPulse alert models.
  • Accepts CloudPulse alert options during instance creation and cloning.
  • Extends fixtures, unit tests, and integration workflows for alerts.
File Description
test/​unit/​objects/​linode_test.py Tests alert decoding and clone payloads.
test/​integration/​models/​linode/​test_linode.py Adds alert lifecycle integration tests.
test/​integration/​conftest.py Adds alert definition fixtures and lookup helpers.
test/​fixtures/​linode_instances.json Adds CloudPulse alert IDs.
test/​fixtures/​linode_instances_123_clone.json Adds a clone response fixture.
linode_api4/​objects/​linode.py Models alerts and extends cloning options.
linode_api4/​groups/​linode.py Adds creation-time alert options.

Review effort: Balanced

Comment on lines +166 to +168
alerts: Optional[
Union[Dict[str, Any], InstanceACLPAlertsOptions]
] = None,
"trigger_occurrences": 3,
}
alert = test_linode_client.monitor.create_alert_definition(
service_type="dbaas",
Comment on lines +877 to +879
alerts = client.monitor.alert_definitions()
system_alerts = []
for alert in alerts.lists[0]:


def test_get_linodes_verify_alerts(test_linode_client, create_linode):
linodes_list = test_linode_client.linode.instances().lists[0]
Comment on lines +461 to +465
assert linode.alerts["cpu"] == 50
assert linode.alerts["io"] == 6000
assert linode.alerts["network_in"] == 20
assert linode.alerts["network_out"] == 20
assert linode.alerts["transfer_quota"] == 40
Comment on lines +475 to +483
assert new_linode.alerts.cpu == 90
assert new_linode.alerts.io == 10000
assert new_linode.alerts.network_in == 10
assert new_linode.alerts.network_out == 10
assert new_linode.alerts.transfer_quota == 80
assert isinstance(new_linode.alerts.system_alerts, list)
assert isinstance(new_linode.alerts.user_alerts, list)

wait_for_clone_complete_and_delete_linode(10, 100, new_linode)
Comment on lines +497 to +498
assert linode.alerts["user_alerts"] == [create_alert_service_definition.id]
assert linode.alerts["system_alerts"] == [sample_system_alert]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants