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

Reusable Worker Service #286

Merged
merged 16 commits into from
Mar 21, 2024
Merged

Reusable Worker Service #286

merged 16 commits into from
Mar 21, 2024

Conversation

nicoburniske
Copy link
Member

@nicoburniske nicoburniske commented Mar 21, 2024

Closes #282

  • Integrates AuthService into WorkerService
  • Move AuthService Trait into golem-service-base
  • Add Internal enum variant to AuthError
  • Pass AccountId and AccountLimits to WorkerService via Namespace

pub struct WorkerRequestToHttpResponse {
pub worker_service: WorkerServiceDefault,
pub worker_service: Arc<dyn WorkerService<EmptyAuthCtx> + Sync + Send>,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@afsalthaj
Copy link
Contributor

Let's propagate the namespace from worker functionalities , and update the PR.

@afsalthaj
Copy link
Contributor

Also regenerate open API spec YAML

@@ -19,42 +21,29 @@ pub trait ApiDefinitionService<Namespace, AuthCtx> {
&self,
definition: &ApiDefinition,
auth_ctx: AuthCtx,
) -> Result<ApiDefinitionIdAnnotated<Namespace>, ApiRegistrationError>;
) -> ApiResult<ApiDefinitionId, Namespace>;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@nicoburniske nicoburniske marked this pull request as ready for review March 21, 2024 15:21
@afsalthaj
Copy link
Contributor

afsalthaj commented Mar 21, 2024

@nicoburniske Nice one!

I would recommend, before changing golem-services further, good to upgrade golem-cloud with these new changes.
This means the following

  • Tag release of golem-services (OSS) - wait for it to be green. Current release has some issues.
  • Update Cargo.toml in cloud and make necessary changes
  • Update Noop validations into actual validation in Cloud
  • Use Auth::InternalError when converting project error (in auth.rs in cloud)

@nicoburniske nicoburniske merged commit 1a07e54 into main Mar 21, 2024
7 checks passed
@nicoburniske nicoburniske deleted the reusable-worker-service branch March 21, 2024 19:12
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.

Move worker service implementation from golem-worker-service to golem-worker-service-base
3 participants