Skip to content

Commit

Permalink
perf(api): getPipeline / env / app
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault committed Jan 13, 2021
1 parent fd9bcd5 commit 6d9163e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions engine/api/application.go
Expand Up @@ -152,11 +152,7 @@ func (api *API) getApplicationHandler() service.Handler {
}

if app.FromRepository != "" {
proj, err := project.Load(ctx, api.mustDB(), projectKey,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
project.LoadOptions.WithEnvironments,
project.LoadOptions.WithIntegrations)
proj, err := project.Load(ctx, api.mustDB(), projectKey, project.LoadOptions.WithIntegrations)
if err != nil {
return err
}
Expand Down
6 changes: 1 addition & 5 deletions engine/api/environment.go
Expand Up @@ -81,11 +81,7 @@ func (api *API) getEnvironmentHandler() service.Handler {
}

if env.FromRepository != "" {
proj, err := project.Load(ctx, api.mustDB(), projectKey,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
project.LoadOptions.WithEnvironments,
project.LoadOptions.WithIntegrations)
proj, err := project.Load(ctx, api.mustDB(), projectKey, project.LoadOptions.WithIntegrations)
if err != nil {
return err
}
Expand Down
6 changes: 1 addition & 5 deletions engine/api/pipeline.go
Expand Up @@ -348,11 +348,7 @@ func (api *API) getPipelineHandler() service.Handler {
}

if p.FromRepository != "" {
proj, err := project.Load(ctx, api.mustDB(), projectKey,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
project.LoadOptions.WithEnvironments,
project.LoadOptions.WithIntegrations)
proj, err := project.Load(ctx, api.mustDB(), projectKey, project.LoadOptions.WithIntegrations)
if err != nil {
return err
}
Expand Down

0 comments on commit 6d9163e

Please sign in to comment.