Skip to content

Rename WorkerRegistry -> Worker - #1469

Merged
brandur merged 1 commit into
masterfrom
brandur-workers
Oct 7, 2026
Merged

brandur merged 1 commit into
masterfrom
brandur-workers

Conversation

@brandur

@brandur brandur commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Renames:

  • WorkerRegistry -> Worker
  • WorkerRegistry#register -> Workers#add
  • WorkerRegistry#register_fn -> Workers#add_fn

Another one to try and bring Rust more in line with Go naming
conventions (which have also been copied into other languages). I
believe one of our earlier versions of Go used WorkerRegistry and an
explicit decision was made to rename to Workers instead.

@brandur

brandur commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

@bgentry IIRC, it was you that originally wanted WorkerRegistry to be renamed to Workers, so was a bit surprised to see the original naming resurrected here. Naming not the end of the world, but it'd be kind of nice if everything matched more or less to make things easy to find across language. Thoughts?

Language Collection and registration
Go Workers, AddWorker(...), WorkFunc(...)
TypeScript Workers, .add(jobDefinition, handler)
Java branch Workers.Builder, .add(jobType, handler)
Ruby Workers, .add(worker)
Rust, after this change Workers, .add(worker)?, .add_fn(handler)?

@brandur
brandur requested a review from bgentry October 7, 2026 05:15
@bgentry

bgentry commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T13:50:52.192199Z 1305480 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bgentry bgentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yep makes sense 👍 You've got a Rust CI failure, maybe an unrelated flake?

Comment thread rust/CHANGELOG.md Outdated

### Changed

- **Breaking:** Renamed `WorkerRegistry` to `Workers`, `register` to `add`, and `register_fn` to `add_fn` to align worker registration with Go's naming. Both methods retain their `Result` return type and registration behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR number missing. I thought I got that rule added to AGENTS.md 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops, that's right. Fixed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 13054804ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Renames:

* `WorkerRegistry` -> `Worker`
* `WorkerRegistry#register` -> `Worker#add`
* `WorkerRegistry#register_fn` -> `Worker#add_fn`

Another one to try and bring Rust more in line with Go naming
conventions (which have also been copied into other languages). I
believe one of our earlier versions of Go used `WorkerRegistry` and an
explicit decision was made to rename to `Workers` instead.
@brandur

brandur commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

CI breakage is actually correct detecting a backwards incompatibility in the API. Not sure how useful this check is in general since we generally know already if we're making a breaking change or not, and it takes quite a long time to run, but it's flagging the right thing in this case.

@brandur
brandur merged commit a8de4d5 into master Oct 7, 2026
27 of 28 checks passed
@brandur
brandur deleted the brandur-workers branch October 7, 2026 17:14
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.

2 participants