Skip to content

Commit

Permalink
fix(API): [KDL6-290] fixing minio project creation
Browse files Browse the repository at this point in the history
  • Loading branch information
igzor committed Jan 29, 2025
1 parent 8d8f74f commit b33b53a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/api/usecase/project/interactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ func (i *interactor) Create(ctx context.Context, opt CreateProjectOption) (entit
return entity.Project{}, err
}

// Create Minio policy for the project user
err = i.minioAdminService.CreateProjectPolicy(ctx, opt.ProjectID)
if err != nil {
return entity.Project{}, err
}

// Create Minio project user
accessKey, err := i.minioAdminService.CreateProjectUser(ctx, opt.ProjectID, secretKey)
if err != nil {
Expand All @@ -187,12 +193,6 @@ func (i *interactor) Create(ctx context.Context, opt CreateProjectOption) (entit
SecretKey: secretKey,
}

// Create Minio policy for the project user
err = i.minioAdminService.CreateProjectPolicy(ctx, opt.ProjectID)
if err != nil {
return entity.Project{}, err
}

// Create a k8s KDLProject containing a MLFLow instance
err = i.k8sClient.CreateKDLProjectCR(ctx, k8s.ProjectData{ProjectID: opt.ProjectID, MinioAccessKey: project.MinioAccessKey})
if err != nil {
Expand Down

0 comments on commit b33b53a

Please sign in to comment.