Skip to content
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

Worker enumeration #337

Merged
merged 26 commits into from
Mar 29, 2024
Merged

Worker enumeration #337

merged 26 commits into from
Mar 29, 2024

Conversation

justcoon
Copy link
Contributor

@justcoon justcoon commented Mar 28, 2024

fix: #295, #296

@vigoo
Copy link
Contributor

vigoo commented Mar 28, 2024

do we need custom filter structure for Running worker enumeration, and all worker enumerations APIs? (for running workers Status filter is questionable)

I think there should be a single filter type, because the separation to two different queries only exists on the worker-executor level. So while it does not make too much sense to have a status filter for the method that only supports status==running, this is not an user facing API and the user facing one, exposed by worker-service, will have a single endpoint with a single filter type anyway. So I think we can live with this unnecessary impreciseness in our private API, instead of having to write all kind of conversion code between two almost similar types.

difference between grpc WorkerMetadata and golem-common WorkerMetadata (they do not contains retry_count)

Currently WorkerMetadata in golem-common is serialized into Redis except it's last_known_status field, while the gRPC one contains information which is almost the same, but in a more flat structure and information that a user should see. Retry count is probably something we could add to that, but for example last oplog index, and the jump table are not. So there is reason behind them not being completely the same.
Also, once the worker is done, golem-common's WorkerMetadata itself no longer need to be serializable and probably it can be moved to be a worker-executor specific internal type for in-memory information about workers. Will see when I get there

@vigoo
Copy link
Contributor

vigoo commented Mar 29, 2024

Very nice! Added a few small comments, other than that it's very close to be merged

@justcoon justcoon merged commit 37d9eb5 into main Mar 29, 2024
6 checks passed
@justcoon justcoon deleted the worker_enumeration branch March 29, 2024 20:04
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.

Enumeration in worker executor service
3 participants