Skip to content

reverted and changes Alert Channel changes as per latest API v4 changes#890

Open
srbhaakamai wants to merge 6 commits intolinode:mainfrom
srbhaakamai:main
Open

reverted and changes Alert Channel changes as per latest API v4 changes#890
srbhaakamai wants to merge 6 commits intolinode:mainfrom
srbhaakamai:main

Conversation

@srbhaakamai
Copy link
Contributor

@srbhaakamai srbhaakamai commented Feb 10, 2026

📝 Description

What does this PR do and why is this change necessary?

✔️ How to Test

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

How do I run the relevant unit/integration tests?
srbha@blr-mpo40 linodego % export LINODE_TOKEN="" && export LINODE_API_VERSION="v4beta" && go test -count=1 ./test/integration -run "TestMonitorAlertDefinition" -v
=== RUN TestMonitorAlertDefinition_smoke
--- PASS: TestMonitorAlertDefinition_smoke (66.19s)
=== RUN TestMonitorAlertDefinitions_List
--- PASS: TestMonitorAlertDefinitions_List (1.37s)
=== RUN TestMonitorAlertDefinition_CreateWithIdempotency
--- PASS: TestMonitorAlertDefinition_CreateWithIdempotency (3.88s)
PASS
ok github.com/linode/linodego/test/integration 72.096s

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

Copilot AI review requested due to automatic review settings February 10, 2026 07:23
@srbhaakamai srbhaakamai requested a review from a team as a code owner February 10, 2026 07:23
@srbhaakamai srbhaakamai requested review from lgarber-akamai and psnoch-akamai and removed request for a team February 10, 2026 07: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

Re-enables Monitor alert channel functionality and related integration tests, updating the Alert Channel model to match the latest API v4 shape.

Changes:

  • Re-enabled integration tests that depend on listing alert channels and selecting a channel ID dynamically.
  • Implemented AlertChannel types (including content/details blocks) and restored ListAlertChannels.
  • Added JSON unmarshalling for created/updated timestamps using parseabletime.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
test/integration/monitor_alert_definitions_test.go Re-enables alert channel listing tests and uses live channel discovery for alert definition creation.
monitor_alert_channels.go Restores alert channel API surface (types + ListAlertChannels) updated for API v4 response schema.

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

@yec-akamai yec-akamai self-requested a review February 11, 2026 14:31
@srbhaakamai srbhaakamai marked this pull request as draft February 12, 2026 06:19
@satkumar-akamai
Copy link

@srbhaakamai

  1. For the List Channels API, the content and details fields currently contain essentially the same data but with different structure. We have kept both fields for backward compatibility, but content will be removed from the response in the future.
    Please ensure that the test suites do not heavily depend on the content field.

  2. Please update the latest ENUM in Alert Status field in Alert Management APIs (provided in the api spec)

@srbhaakamai srbhaakamai marked this pull request as ready for review February 13, 2026 08:11
Copy link

@satkumar-akamai satkumar-akamai left a comment

Choose a reason for hiding this comment

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

Changes looks good as per API Spec.

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Overall looks good. Can you fix the comments please?

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Can you also run the integration test and re-generate the fixtures please?

@srbhaakamai
Copy link
Contributor Author

@yec-akamai i fixed all comments from you and copilot. Please check. i marked most of them which were simple as resolved from my side. please have a look and request further review/approval.

Srinidhi

return alertDef, err
}

if alertDef.Status != AlertDefinitionStatusInProgress {
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering there are more statuses added, just checking if it's enabling status is probably not so useful.

I think we can change this function to intake and wait for a specific a target status. We can change the function head to be

func (client Client) WaitForAlertDefinitionStatus(
	ctx context.Context,
    status AlertDefinitionStatus,
	serviceType string,
	alertID int,
	timeoutSeconds int,
) {...}

and wait for the target status.

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.

3 participants

Comments