Skip to content

Commit

Permalink
fix: properly init auth table and its dependencies in control plane (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aneojgurhem authored Sep 16, 2024
2 parents 2a3f558 + 30c4468 commit f0a2184
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Adaptors/MongoDB/src/AuthenticationTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,17 @@ public async Task Init(CancellationToken cancellationToken)
await sessionProvider_.Init(cancellationToken)
.ConfigureAwait(false);
sessionProvider_.Get();

await userCollectionProvider_.Init(cancellationToken)
.ConfigureAwait(false);
userCollectionProvider_.Get();

await roleCollectionProvider_.Init(cancellationToken)
.ConfigureAwait(false);
roleCollectionProvider_.Get();

await authCollectionProvider_.Init(cancellationToken)
.ConfigureAwait(false);
authCollectionProvider_.Get();
isInitialized_ = true;
}
Expand Down
4 changes: 4 additions & 0 deletions Control/Submitter/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using ArmoniK.Core.Adapters.S3;
using ArmoniK.Core.Base;
using ArmoniK.Core.Base.DataStructures;
using ArmoniK.Core.Common.Auth.Authentication;
using ArmoniK.Core.Common.gRPC;
using ArmoniK.Core.Common.gRPC.Services;
using ArmoniK.Core.Common.Injection;
Expand Down Expand Up @@ -242,6 +243,7 @@ await func.Invoke()
var resultTable = app.Services.GetRequiredService<IResultTable>();
var partitionTable = app.Services.GetRequiredService<IPartitionTable>();
var sessionTable = app.Services.GetRequiredService<ISessionTable>();
var authTable = app.Services.GetRequiredService<IAuthenticationTable>();
var taskObjectFactory = objectStorage.Init(CancellationToken.None);
var taskPushQueueStorage = pushQueueStorage.Init(CancellationToken.None);

Expand All @@ -253,6 +255,8 @@ await partitionTable.Init(CancellationToken.None)
.ConfigureAwait(false);
await sessionTable.Init(CancellationToken.None)
.ConfigureAwait(false);
await authTable.Init(CancellationToken.None)
.ConfigureAwait(false);

await taskObjectFactory.ConfigureAwait(false);
await taskPushQueueStorage.ConfigureAwait(false);
Expand Down

0 comments on commit f0a2184

Please sign in to comment.