remove calls to list apps api during pipeline deployment

Description

The list apps (GET /apps) call is made before deploying a pipeline to ensure that a pipeline of the same name does not already exist. This check is necessary, because the deployment path in the backend (PUT /apps/{app-id}) creates a new version of the application when an existing pipelineName / appId is given.

In the UI, we do not want to call the deploy method before ensuring that the pipeline name does not already exist, in the case where the intent of the user is to create a new pipeline. (If the intent of the user is to edit and create a new version, we do not perform this check, nor call the list apps API).

However, this is not an efficient method of checking the existence of the pipeline name, as in case of instances with large number of pipelines the network overhead and the load on the backend service are high. A better way to check if a pipeline name is available, is to use the GET /apps/{app-id} API. This would return a 404 response if the name is available.

Solution

Use the GET /apps/{app-id} API to ensure that the pipeline name is available.

Release Notes

None

Activity

Show:

Ankit Jain November 15, 2024 at 6:11 AM

This change looks incorrect to me:

We are just considering every error other than 404 to consider pipeline exists, it could be possible it returned 5xx because of backend not available.

I think we should not assume for all other errors pipeline exist and display confusing error message in UI

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Docs Impact

No

UX Impact

No

Affects versions

Triaged

Yes

Size

S

Components

Fix versions

Due date

Priority

Created October 15, 2024 at 1:05 PM
Updated December 3, 2024 at 2:12 PM
Resolved December 3, 2024 at 2:12 PM