-
Notifications
You must be signed in to change notification settings - Fork 532
feat:show notes for gitops app #3045
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
|
||
response, err := impl.helmAppClient.GetNotes(ctx, request) | ||
if err != nil { | ||
impl.logger.Errorw("error in fetching chart", "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.
add request in logging
}, | ||
}, | ||
} | ||
notes, err := impl.helmAppService.GetNotes(context.Background(), installReleaseRequest) |
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.
handle error here
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.
done
e12ebcf
Kudos, SonarCloud Quality Gate passed!
|
@@ -767,7 +768,6 @@ func (impl *InstalledAppServiceImpl) FindAppDetailsForAppstoreApplication(instal | |||
Deprecated: installedAppVerison.AppStoreApplicationVersion.Deprecated, | |||
ClusterId: installedAppVerison.InstalledApp.Environment.ClusterId, | |||
DeploymentAppType: installedAppVerison.InstalledApp.DeploymentAppType, | |||
DeploymentAppDeleteRequest: installedAppVerison.InstalledApp.DeploymentAppDeleteRequest, |
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 did you remove this? what's the logic behind this?
installedAppVerison, err := impl.installedAppRepository.GetInstalledAppVersionByInstalledAppIdAndEnvId(installedAppId, envId) | ||
var notes string | ||
appName := installedAppVerison.InstalledApp.App.AppName | ||
if err != nil { |
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.
handle the error just after line 784. if there is an error while getting installedAppVersion then installedAppVersion will come as nil and code will break since you are fetching AppName from it, return empty strings while returning.
@@ -889,7 +932,7 @@ func (impl InstalledAppServiceImpl) GetInstalledAppVersionHistoryValues(installe | |||
values.ValuesYaml = versionHistory.ValuesYamlRaw | |||
return values, err | |||
} | |||
func (impl InstalledAppServiceImpl) FetchResourceTree(rctx context.Context, cn http.CloseNotifier, appDetail *bean2.AppDetailContainer) (bean2.AppDetailContainer, error) { |
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 did you remove the error returning, logic behind it?
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.
not done by me
return *appDetail, nil | ||
} | ||
|
||
func (impl InstalledAppServiceImpl) MarkGitOpsInstalledAppsDeletedIfArgoAppIsDeleted(installedAppId int, envId int) error { |
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.
deleted the whole func, why, logic?
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.
not done by me
@@ -123,6 +123,9 @@ type AppDetailContainer struct { | |||
LinkOuts []LinkOuts `json:"linkOuts,omitempty"` | |||
ResourceTree map[string]interface{} `json:"resourceTree,omitempty"` | |||
} | |||
type Notes struct { | |||
Notes string `json:"gitOpsNotes,omitempty"` |
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 did you create new struct for only notes, wasn't there any notes field in the response object?
Description
This feature will show notes.txt file on helm apps that id deployed via gitops.
Fixes AB2880
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
1.I have tested this via image deployment on vm.
2. I have checked for all cases that I have mentioned in unit test case in kubelink.
Checklist:
Does this PR introduce a user-facing change?