Skip to content

feat(core): optional pagination on GET /logs/{executionId} - #21390

Merged
loicmathieu merged 2 commits into
kestra-io:developfrom
Asymtode712:feat/optional-pagination-logs
Oct 20, 2026
Merged

loicmathieu merged 2 commits into
kestra-io:developfrom
Asymtode712:feat/optional-pagination-logs

Conversation

@Asymtode712

Copy link
Copy Markdown
Contributor

🔗 Related Issue

Closes #21385

✨ Description

GET /logs/{executionId} always returned every log of the execution, which is heavy for executions with many logs.

It now accepts optional page and size query parameters. When either is set, only that page is returned, ordered by timestamp ascending, with page defaulting to 1 and size to 10 (max 1000). When neither is set, all logs are returned exactly as before, so existing clients are unaffected.

🛠️ Backend Checklist

  • Code compiles and tests pass for the touched modules (./gradlew :webserver:test --tests "LogControllerTest")
  • New behavior is covered by unit or integration tests

📝 Additional Notes

The response stays a plain JSON array in both modes to keep the unpaginated contract unchanged, which deviates from the PagedResults convention. Switching to a paged envelope would be a breaking change and is left out on purpose.

@loicmathieu loicmathieu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks

@loicmathieu
loicmathieu merged commit c471eb8 into kestra-io:develop Oct 20, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this from To review to Done in Pull Requests Oct 20, 2026
@MilosPaunovic MilosPaunovic added the kind/external Pull requests raised by community contributors label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/external Pull requests raised by community contributors

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add an optional pagination to GET /logs/{executionId}

3 participants