Skip to content

Conversation

@Galimede
Copy link
Member

@Galimede Galimede commented Nov 26, 2025

Fixes #159

What does this PR do?

  • Migrate log drain commands from v2 to v4 API endpoints:
    • Replace UpdateLogDrainCommand with separate EnableLogDrainCommand and DisableLogDrainCommand
    • Add new log-drain-utils.js with polling utilities (waitForLogDrainEnabled, waitForLogDrainDisabled, waitForLogDrainDeletion)
    • Remove support for addon-based log drains (v4 API only supports applications)
    • Update all log drain commands to use ApplicationId type (ownerId + applicationId)
    • Add query parameter support to ListLogDrainCommand (status, executionStatus, executionStatusNotIn)
    • Update tests to cover new enable/disable functionality and polling behavior
    • Remove unused UpdateTagCommand (cleanup)

Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

Thanks @Galimede for taking this subject.

  • We should re-enable the drains e2e test suite which is skipped at the moment.
  • You can run it locally with the right environment (I can help you create this environment if you want)
  • Tests don't pass because the new v4 API is far from the v2 : input and output payloads are slightly different.

Do not hesitate to ping me if you need any help

@Galimede Galimede force-pushed the log-drain-v4 branch 3 times, most recently from d064049 to 862fe63 Compare January 7, 2026 11:00
Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

Thank you @Galimede for this PR. For a first one, it was quite tricky!

There are several things we need to fix. We can sync together or schedule a pair programming session if you need to.

Copy link
Member

@hsablonniere hsablonniere left a comment

Choose a reason for hiding this comment

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

First quick review, I commented some of @pdesoyres-cc's comments.

  • Why did we delete the update tag command? What's the link with drains?
  • Can we specify in the commit that it's a refactor of the new client or something like that?
  • I wonder if we really need PascalCase draint target types, maybe we could directly use the upper snake case that the API needs in our types.

@pdesoyres-cc
Copy link
Contributor

+1 for > I wonder if we really need PascalCase draint target types, maybe we could directly use the upper snake case that the API needs in our types.

Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

Almost there. Just some tiny things and it's all good

@Galimede
Copy link
Member Author

Note: I've had to keep the if statement in the test otherwise TS didn't infer it was a RAW_HTTP log which created types errors.

Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

LGTM. well done @Galimede

@Galimede Galimede dismissed hsablonniere’s stale review January 28, 2026 10:42

PR is ready to merge

@Galimede Galimede merged commit c7a5e06 into master Jan 28, 2026
3 of 4 checks passed
@Galimede Galimede deleted the log-drain-v4 branch January 28, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(log-drain): migrate commands to v4 API

3 participants