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

fix: prevented chart updation when its in use #3755

Merged
merged 4 commits into from
Aug 22, 2023
Merged

fix: prevented chart updation when its in use #3755

merged 4 commits into from
Aug 22, 2023

Conversation

ashishdevtron
Copy link
Contributor

@ashishdevtron ashishdevtron commented Aug 11, 2023

Description

Chart repo which is used to deploy helm app can be updated through postman, which should not happen.

Fixes #3455

How Has This Been Tested?

  • Tested locally

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

pkg/chartRepo/repository/ChartRepoRepository.go Outdated Show resolved Hide resolved
pkg/chartRepo/repository/ChartRepoRepository.go Outdated Show resolved Hide resolved
api/chartRepo/ChartRepositoryRestHandler.go Outdated Show resolved Hide resolved
pkg/chartRepo/ChartRepositoryService.go Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@prakarsh-dt prakarsh-dt merged commit c4e53d4 into devtron-labs:main Aug 22, 2023
3 of 7 checks passed
@@ -213,7 +213,12 @@ func (handler *ChartRepositoryRestHandlerImpl) UpdateChartRepo(w http.ResponseWr
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
return
}

err = handler.chartRepositoryService.ValidateDeploymentCount(request)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can put this validation after RBAC

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.

Bug: data validation error when we disable/enable a chart repo
4 participants