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: handling side-effects for displaying external helm apps with same name across diff namespaces and clusters #4951

Merged
merged 50 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0d1e135
store display name, along with unique appName(displayName-ns-clusterI…
prakash100198 Apr 16, 2024
01a346e
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 19, 2024
723332f
comments
prakash100198 Apr 19, 2024
7c09365
appName and display name handling at other places as well for externa…
prakash100198 Apr 19, 2024
33bf9ee
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 19, 2024
1e016f5
handling display name in GetHelmAppMetaInfo in AppCrudOperationServic…
prakash100198 Apr 21, 2024
f69202f
FetchAppDetailsForInstalledAppV2 send display name if present
prakash100198 Apr 21, 2024
e5212e1
DeleteDBLinkedHelmApplication deletion handling for ext app with uniq…
prakash100198 Apr 22, 2024
ed1248f
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 22, 2024
b535b32
applist method incorporated checks on display name if exists instead …
prakash100198 Apr 22, 2024
bfc4031
query change in GetAppAndEnvDetailsForDeploymentAppTypeInstalledApps …
prakash100198 Apr 22, 2024
5c299a5
GenerateInstallAppVersionMinDTO if display name exists then send appn…
prakash100198 Apr 22, 2024
d5cadda
FindAppDetailsForAppstoreApplication, considering display name as wel…
prakash100198 Apr 22, 2024
3128fc8
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 23, 2024
c37ed41
multiple fixes around corner cases around display names
prakash100198 Apr 23, 2024
47ede99
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 23, 2024
bc9e81a
minor fix
prakash100198 Apr 23, 2024
df58a7b
fixes for fetching resoirce trees for ext apps using display name ins…
prakash100198 Apr 23, 2024
7abc37a
bug fixes
prakash100198 Apr 24, 2024
9795efc
linkHelmApplicationToChartStore, use displayName instead of appName f…
prakash100198 Apr 24, 2024
2e492c0
LinkHelmApplicationToChartStore: server mode full from hyperion when …
prakash100198 Apr 24, 2024
ed3ed9a
revert:- LinkHelmApplicationToChartStore: server mode full from hyper…
prakash100198 Apr 24, 2024
4d15cd8
on update proj, update app offering mode to full and, getAppNameForIn…
prakash100198 Apr 24, 2024
238b51e
handled corner cases in DeleteDBLinkedHelmApplication
prakash100198 Apr 24, 2024
26f429e
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 24, 2024
f870ab6
code refactoring
prakash100198 Apr 24, 2024
7beee96
remove unwanted error check
prakash100198 Apr 24, 2024
d6cf6e3
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 24, 2024
df5d335
removed logic to block update and deploy when not linked to devtron
prakash100198 Apr 25, 2024
031530d
Merge branch 'main' into ext-app-fixes
prakash100198 Apr 25, 2024
290452c
code review incorporations and code refactoring
prakash100198 Apr 25, 2024
99e89a3
handling display name in migrate app type and trigger for migrated ap…
prakash100198 Apr 25, 2024
e28f4fb
minor fix
prakash100198 May 1, 2024
3a6018e
Merge branch 'main' into ext-app-fixes
prakash100198 May 1, 2024
f6ac093
minor fix
prakash100198 May 1, 2024
22bacd8
Merge branch 'main' into ext-app-fixes
prakash100198 May 2, 2024
632f3da
code review incorporation and refactoring
prakash100198 May 2, 2024
8fbc78c
Merge branch 'main' into ext-app-fixes
prakash100198 May 2, 2024
bbd9fde
wire fix
prakash100198 May 2, 2024
063ba80
Merge branch 'main' into ext-app-fixes
prakash100198 May 7, 2024
c10aa81
fixes for multiple installed apps with same app pointer linked to cha…
prakash100198 May 16, 2024
676d1d4
Merge branch 'main' into ext-app-fixes
prakash100198 May 16, 2024
973c05d
remove unused code
prakash100198 May 16, 2024
cabcdc4
Merge branch 'main' into ext-app-fixes
prakash100198 May 19, 2024
4aa2feb
fix for showing unassigned proj to ext app that's already linked to d…
prakash100198 May 19, 2024
947a29d
fix
prakash100198 May 19, 2024
e8c0f8d
fix
prakash100198 May 19, 2024
be13836
revert
prakash100198 May 20, 2024
d7cf678
fix
prakash100198 May 20, 2024
e05b330
Merge branch 'main' into ext-app-fixes
prakash100198 May 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed logic to block update and deploy when not linked to devtron
prakash100198 committed Apr 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit df5d3353372acf337ebe7157267a93bad4682c50
11 changes: 5 additions & 6 deletions api/helm-app/service/ClusterUtils.go
Original file line number Diff line number Diff line change
@@ -5,12 +5,11 @@ import (
)

const (
DaemonSetPodDeleteError = "cannot delete DaemonSet-managed Pods"
DnsLookupNoSuchHostError = "no such host"
TimeoutError = "timeout"
NotFound = "not found"
ConnectionRefused = "connection refused"
AppNotLinkedToChartStoreErr = "app not yet linked with any chart from chart-store in devtron, hence can't perform update operation from devtron ui"
DaemonSetPodDeleteError = "cannot delete DaemonSet-managed Pods"
DnsLookupNoSuchHostError = "no such host"
TimeoutError = "timeout"
NotFound = "not found"
ConnectionRefused = "connection refused"
)

func IsClusterUnReachableError(err error) bool {
9 changes: 0 additions & 9 deletions api/helm-app/service/HelmAppService.go
Original file line number Diff line number Diff line change
@@ -677,15 +677,6 @@ func (impl *HelmAppServiceImpl) checkIfNsExists(app *AppIdentifier) (bool, error
}

func (impl *HelmAppServiceImpl) UpdateApplication(ctx context.Context, app *AppIdentifier, request *bean.UpdateApplicationRequestDto) (*openapi.UpdateReleaseResponse, error) {
if request.SourceAppType == bean.SOURCE_EXTERNAL_HELM_APP {
_, err := impl.installedAppRepository.GetInstalledAppByAppName(app.GetUniqueAppNameIdentifier())
if err != nil && util.IsErrNoRows(err) {
return nil, &util.ApiError{HttpStatusCode: http.StatusUnprocessableEntity, Code: strconv.Itoa(http.StatusUnprocessableEntity), InternalMessage: AppNotLinkedToChartStoreErr, UserMessage: AppNotLinkedToChartStoreErr}
} else if err != nil {
impl.logger.Errorw("error in fetching installed app from appName unique identifier", "appNameUniqueIdentifier", app.GetUniqueAppNameIdentifier())
return nil, err
}
}
config, err := impl.GetClusterConf(app.ClusterId)
if err != nil {
impl.logger.Errorw("error in fetching cluster detail", "clusterId", app.ClusterId, "err", err)