Skip to content

Improve tail worker support #3192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 29, 2024
Merged

Improve tail worker support #3192

merged 5 commits into from
Nov 29, 2024

Conversation

kentonv
Copy link
Member

@kentonv kentonv commented Nov 29, 2024

This fixes some issues from #3021, which I noticed while working on something unrelated.

The third commit is more of a suggestion. Do we think anyone is using logging yet? If so, maybe I should drop this commit. If not, maybe I should change the commit to actually remove logging in favor of the simpler flat array which I've named tails... let me know.

ServiceDesignators are meant to be resolved at link time, so that errors can be reported before the service starts up.
@kentonv kentonv requested review from jasnell and danlapid November 29, 2024 20:45
@kentonv kentonv requested review from a team as code owners November 29, 2024 20:45
@kentonv
Copy link
Member Author

kentonv commented Nov 29, 2024

@jasnell Can you comment on whether logging is in use yet?

I know it theoretically could be, but have you explicitly documented it or told anyone about it or used it anywhere beyond what's in #3021?

Using a simple array seems strictly easier to understand than a union with zero/one/many variants.

REVIEW: Can we simply remove `logging`? It was introduced relatively recently. Is anyone depending on it yet?
@kentonv kentonv force-pushed the kenton/refactor-tail branch from 86adb53 to 9c48d92 Compare November 29, 2024 21:27
@jasnell
Copy link
Member

jasnell commented Nov 29, 2024

Nope, intentionally hadn't documented it just yet but better to ask the wrangler folks. Not sure if anyone on that side has made use of it.

@kentonv
Copy link
Member Author

kentonv commented Nov 29, 2024

I don't see toService nor toServices mentioned in workers-sdk so doesn't look like it's used in wrangler yet. OK, will update this to just replace it with tails.

`logging` was introduced recently and hasn't been documented nor advertised yet, so likely isn't used. Since it's still the last field in the capnp, we can probably get away with removing it and replacing it with `tails`.
For consistency with the config.
@kentonv kentonv merged commit d65a5e3 into main Nov 29, 2024
14 checks passed
@kentonv kentonv deleted the kenton/refactor-tail branch November 29, 2024 22:09
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