Skip to content

Aclp logs support#963

Open
klipensk wants to merge 21 commits into
linode:mainfrom
akrzyszt:ACLP-LOGS-support
Open

Aclp logs support#963
klipensk wants to merge 21 commits into
linode:mainfrom
akrzyszt:ACLP-LOGS-support

Conversation

@klipensk
Copy link
Copy Markdown

@klipensk klipensk commented May 12, 2026

📝 Description

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

  1. Adds full SDK support for monitor Logs API. This includes both the destinations and streams. This is a new feature not yet supported in the SDK.
  2. Adds unit tests for newly implemented features.
  3. Adds integration tests for newly implemented features.
  4. Integration tests include safeguards based around the limitations of API.
  • Logs Stream functionality is limited to one stream per account. For this reason Logs stream tests will automatically skip if there's a stream existing on the account.
  • Full e2e test for streams require a stream to complete provisioning - based on experience during development this can take up to an hour. Similarly to what's already present for database related tests, an environment variable (run_aclp_logs_stream_tests) needs to be set as true or yes to enable testing the Stream portion of the API.
    github workflow files were updated to include the run_aclp_logs_stream_tests environment variable.

✔️ How to Test

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

  1. https://techdocs.akamai.com/linode-api/reference/post-destination

How do I run the relevant unit/integration tests?

  1. Follow usual installation/setup steps
  2. Integration tests: make test-int
  3. Unit tests: make test-unit

akrzyszt and others added 17 commits May 6, 2026 10:30
…sue with always serialized storage key and secret - now test logs destination tests will always pass also in recording mode
# Conflicts:
#	test/integration/fixtures/TestLogsDestination_Create_InvalidSecret.yaml
#	test/integration/fixtures/TestLogsDestination_Create_InvalidType.yaml
#	test/integration/fixtures/TestLogsDestination_Delete.yaml
#	test/integration/fixtures/TestLogsDestination_Get.yaml
#	test/integration/fixtures/TestLogsDestination_List.yaml
#	test/integration/fixtures/TestLogsDestination_UpdateAndHistory.yaml
Copilot AI review requested due to automatic review settings May 12, 2026 11:18
@klipensk klipensk requested review from a team as code owners May 12, 2026 11:18
@klipensk klipensk requested review from ckulinsk and jbilskiAkam and removed request for a team May 12, 2026 11:18
@mawilk90 mawilk90 requested review from psnoch-akamai and yec-akamai and removed request for ckulinsk and jbilskiAkam May 12, 2026 11:19
Copy link
Copy Markdown
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 first-class linodego SDK support for the ACLP Monitor Logs API, covering both Logs Destinations (monitor/streams/destinations) and Logs Streams (monitor/streams), along with unit + integration test coverage and CI wiring for optionally running long-running stream tests.

Changes:

  • Introduces new SDK types and client methods for Logs Destinations and Logs Streams, including history endpoints and time parsing.
  • Adds comprehensive unit tests and JSON fixtures for destinations and streams (including LKE audit log stream details).
  • Adds integration tests + go-vcr cassettes for destinations/streams and updates CI to allow opting into stream tests via RUN_ACLP_LOGS_STREAM_TESTS.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
monitor_log_destinations.go Implements Logs Destination models and CRUD/history client methods.
monitor_log_streams.go Implements Logs Stream models and CRUD/history client methods.
test/unit/monitor_logs_test.go Adds unit tests for destinations, streams, and stream type constants.
test/unit/fixtures/monitor_log_destinations_get.json Unit fixture for fetching a destination.
test/unit/fixtures/monitor_log_destinations_list.json Unit fixture for listing destinations (including custom_https).
test/unit/fixtures/monitor_log_destinations_history_list.json Unit fixture for destination history listing.
test/unit/fixtures/monitor_log_destinations_custom_https_get.json Unit fixture for custom_https destination fetch.
test/unit/fixtures/monitor_log_stream.json Unit fixture for fetching a stream (audit_logs).
test/unit/fixtures/monitor_log_streams_list.json Unit fixture for listing streams.
test/unit/fixtures/monitor_log_streams_history.json Unit fixture for stream history listing.
test/unit/fixtures/monitor_log_stream_lke.json Unit fixture for fetching an LKE audit log stream (details block).
test/integration/monitor_logs_test.go Adds integration coverage for destination + stream lifecycle, with long provisioning safeguards.
test/integration/integration_suite_test.go Adjusts go-vcr sanitization behavior to keep credentials usable during recording.
.github/workflows/ci.yml Adds workflow_dispatch input and exports RUN_ACLP_LOGS_STREAM_TESTS to test runs.
test/integration/fixtures/TestLogsDestination_List.yaml VCR cassette for listing destinations.
test/integration/fixtures/TestLogsDestination_Get.yaml VCR cassette for getting a destination.
test/integration/fixtures/TestLogsDestination_Delete.yaml VCR cassette for deleting a destination and cleaning up Object Storage.
test/integration/fixtures/TestLogsDestination_UpdateAndHistory.yaml VCR cassette for updating a destination and validating history.
test/integration/fixtures/TestLogsDestination_Create_InvalidSecret.yaml VCR cassette for invalid destination secret error case.
test/integration/fixtures/TestLogsDestination_Create_InvalidType.yaml VCR cassette for invalid destination type error case.
test/integration/fixtures/TestLogStream_Create_InvalidDestination.yaml VCR cassette for invalid destination stream create error case.
test/integration/fixtures/TestLogStream_Create_EmptyDestinations.yaml VCR cassette for empty destinations stream create error case.
test/integration/fixtures/TestLogStream_Create_TwoDestinations.yaml VCR cassette for multi-destination stream create error case.
test/integration/fixtures/TestLogStream_Delete.yaml VCR cassette for stream delete flow.
test/integration/fixtures/TestLogStream_List.yaml VCR cassette for stream list flow.
test/integration/fixtures/TestLogStream_Get.yaml VCR cassette for stream get flow.
test/integration/fixtures/TestLogStream_Update_LabelAndStatus.yaml VCR cassette for stream label/status update and history validation.
test/integration/fixtures/TestLogStream_Update_Destinations.yaml VCR cassette for stream destination update and history validation.

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

Comment thread test/integration/integration_suite_test.go
Comment thread test/integration/fixtures/TestLogsDestination_Delete.yaml
Comment thread test/integration/monitor_logs_test.go
Comment thread test/integration/monitor_logs_test.go
@yec-akamai yec-akamai added community-contribution for contributions made by a non-DX author new-feature for new features in the changelog. labels May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution for contributions made by a non-DX author new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants