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

Bug: API for creating Devtron App Workflow, creates Invalid GitMaterial incase of linked CI (No validations) #3827

Closed
2 tasks done
Ash-exp opened this issue Aug 25, 2023 · 0 comments · Fixed by #3842
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@Ash-exp
Copy link
Contributor

Ash-exp commented Aug 25, 2023

📜 Description

The API for creating Devtron App Workflow : /orchestrator/core/v1beta1/application/workflow, will create invalid CI Material incase of linked CI if the payload contains invalid GitMaterialId. As it creates the workflow successfully with corrupted data, we will not be able to update branch name in linked CI pipeline.

This exposed the Issue #3797

👟 Reproduction steps

  1. Create a devtron App with CI pipeline
  2. Hit the Create Devtron App Workflow API: /orchestrator/core/v1beta1/application/workflow with linked CI Payload. Use an invalid combination of GitMaterialId and ParentAppId. (GitMaterialId should exist in the DB but not attached to the specified ParentAppId)
  3. It will successfully create the workflow.
  4. Now try to update branch (That does exist for ParentApp GitMaterial, but not in the GitMaterialId that have been provided in the payload) for the CI pipeline. It would break as the GitMaterial is different.

👍 Expected behavior

There Should be Validation on GitMaterialId before Creating workflow

👎 Actual Behavior

It saves corrupted data if provided by the User

☸ Kubernetes version

NA

Cloud provider

NA

🌍 Browser

Chrome

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

AB#5213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants