-
Notifications
You must be signed in to change notification settings - Fork 554
feat: manifest comparision #3844
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
Conversation
| } | ||
| return appList | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this line
| func (handler AppListingRestHandlerImpl) GetDeploymentsWithCharts(w http.ResponseWriter, r *http.Request) { | ||
| vars := mux.Vars(r) | ||
| token := r.Header.Get("token") | ||
| appId, err := strconv.Atoi(vars["app-id"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make these vars to camelcase
| return | ||
| } | ||
|
|
||
| envId, err := strconv.Atoi(vars["env-id"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| return | ||
| } | ||
| // RBAC enforcer applying | ||
| object := handler.enforcerUtil.GetAppRBACName(app.AppName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use func GetAppRBACNameByAppId instead of GetAppRBACName
| return | ||
| } | ||
| // RBAC enforcer applying | ||
| object := handler.enforcerUtil.GetAppRBACName(app.AppName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use func GetAppRBACNameByAppId instead of GetAppRBACName
| query := "select merged_values_yaml from pipeline_config_override where id = ? ; " | ||
| _, err := impl.dbConnection.Query(&result, query, id) | ||
| if err != nil { | ||
| impl.Logger.Error("error", "error", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log error message correctly
|
|
||
| defaultVersions, err := impl.chartService.ChartRefAutocompleteForAppOrEnv(appId, 0) | ||
| if err != nil { | ||
| impl.Logger.Errorw("err", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log error properly
gireesh-naidu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| return | ||
| } | ||
|
|
||
| app, err := handler.pipeline.GetApp(appId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do u need app here?
| common.WriteJsonResp(w, nil, resp, http.StatusOK) | ||
| } | ||
|
|
||
| func (handler AppListingRestHandlerImpl) GetYaluesAndManifest(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the func name to GetValuesAndManifest
| } | ||
|
|
||
| token := r.Header.Get("token") | ||
| app, err := handler.pipeline.GetApp(request.AppId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do u need app here ?
| } | ||
|
|
||
| type ValuesAndManifestResponse struct { | ||
| Data string `json:"data"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment what kind of data u store here
| return | ||
| } | ||
| // RBAC enforcer applying | ||
| object := handler.enforcerUtil.GetAppRBACName(app.AppName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this rbac on app level while u fetch the manifest for env level aswell. the RBAC should be conditional.
61f19e8
|
SonarCloud Quality Gate failed.
|










Description
This feature will enable users to compare the generated manifest if they are doing some changes or updating the chart version so they can see if anything getting changed would not affect their existing micro-services. Users will be quite confident while updating the chart version and they will keep their microservice to the latest version.
While making changes in the Deployment template users do not feel confident about the impact of the changes
DevOps team may not want developers to make changes in production directly as they may make inadvertent errors.
Ability to view and compare the manifest output of values.yaml in Devtron Apps.
🤖 Prototype link
🎨 Design link
Fixes #3503
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: