Skip to content

Support ACLP alerts integration with Linode#650

Open
yec-akamai wants to merge 2 commits intolinode:proj/aclp-linode-alertsfrom
yec-akamai:TPT-3924/linode-alerts-integration
Open

Support ACLP alerts integration with Linode#650
yec-akamai wants to merge 2 commits intolinode:proj/aclp-linode-alertsfrom
yec-akamai:TPT-3924/linode-alerts-integration

Conversation

@yec-akamai
Copy link
Contributor

📝 Description

Allow specify ACLP alerts with linode in create, get, list, update and clone.

✔️ How to Test

Unit test:

make test-unit

@yec-akamai yec-akamai requested a review from a team as a code owner February 18, 2026 20:23
@yec-akamai yec-akamai added the new-feature for new features in the changelog. label Feb 18, 2026
@yec-akamai yec-akamai requested review from Copilot, psnoch-akamai and vshanthe and removed request for a team February 18, 2026 20:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for specifying and reading ACLP alert configuration on Linode Instances, including wiring the alerts field through instance create/clone flows and validating behavior via updated unit fixtures/tests.

Changes:

  • Added InstanceAlerts/InstanceACLPAlertsOptions JSON-object models and mapped Instance.alerts to InstanceAlerts.
  • Added alerts support to LinodeGroup.instance_create(...) and Instance.clone(...).
  • Updated unit tests and fixtures to include system_alerts/user_alerts and added a clone test case.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
linode_api4/objects/linode.py Adds alert JSON-object types, maps Instance.alerts, and adds alerts support to Instance.clone.
linode_api4/groups/linode.py Adds alerts parameter to instance creation request body.
test/unit/objects/linode_test.py Extends unit coverage for reading/writing alerts and adds clone-with-alerts test.
test/fixtures/linode_instances.json Updates instance list fixture to include ACLP alert IDs.
test/fixtures/linode_instances_123_clone.json Adds clone response fixture including alerts payload.
test/integration/models/sharegroups/test_sharegroups.py Minor import formatting cleanup.
Comments suppressed due to low confidence (1)

linode_api4/objects/linode.py:1858

  • alerts was added before placement_group in Instance.clone, which breaks callers that pass placement_group positionally (it will now be interpreted as alerts). To avoid a positional-argument breaking change, move alerts to the end of the parameter list or otherwise ensure it can only be provided by keyword without changing existing positional ordering.
    def clone(
        self,
        to_linode=None,
        region=None,
        instance_type=None,
        configs=[],
        disks=[],
        label=None,
        group=None,
        with_backups=None,
        alerts: Optional[
            Union[Dict[str, Any], InstanceACLPAlertsOptions]
        ] = None,
        placement_group: Union[
            InstancePlacementGroupAssignment,
            "PlacementGroup",
            Dict[str, Any],
            int,
        ] = None,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@vshanthe vshanthe left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments