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

[CDAP-21074] remove calls to list apps api during pipeline deployment #1249

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

GnsP
Copy link
Collaborator

@GnsP GnsP commented Oct 15, 2024

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.

PR Type

  • Bug Fix
  • Feature
  • Build Fix
  • Testing
  • General Improvement
  • Cherry Pick

Links

Jira: CDAP-21074

Test Plan

Existing e2e-tests must pass

Screenshots

NA

@GnsP GnsP force-pushed the remove-list-pipelines-call-in-deploy branch from 51a3ef6 to 3dcd442 Compare October 29, 2024 05:56
@GnsP GnsP force-pushed the remove-list-pipelines-call-in-deploy branch from d5ddc6d to 9d3f9e8 Compare October 29, 2024 08:30
@GnsP GnsP merged commit 051148f into cdapio:develop Oct 29, 2024
3 checks passed
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.

3 participants