-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore: Add code-split for service layer Git integration for packages #38497
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -520,7 +520,7 @@ public Mono<Application> deleteApplication(String id) { | |
| return applicationMono | ||
| .flatMapMany(application -> { | ||
| GitArtifactMetadata gitData = application.getGitApplicationMetadata(); | ||
| if (GitUtils.isApplicationConnectedToGit(application)) { | ||
| if (GitUtils.isArtifactConnectedToGit(application.getGitArtifactMetadata())) { | ||
| return applicationService.findAllApplicationsByBaseApplicationId( | ||
| gitData.getDefaultArtifactId(), applicationPermission.getDeletePermission()); | ||
| } | ||
|
Comment on lines
+523
to
526
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Migration from The old method is still present in the codebase and being actively used. In ApplicationImportServiceCEImpl.java, the new
🔗 Analysis chainConfirm all references to the old method are removed. This line correctly adopts the artifact-level check instead of the legacy application-level Git check. Ensure that any remaining usage of Run the following script to scan for any references to the now retired 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Searching for references to isApplicationConnectedToGit across the repository
ast-grep --pattern $'isApplicationConnectedToGit($_)'
Length of output: 66109 Script: #!/bin/bash
# Search for any remaining references to isApplicationConnectedToGit in Java files
rg "isApplicationConnectedToGit" -t java -C 2
Length of output: 2401 |
||
|
|
||
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.
Implementation needs improvement
The current implementation has several issues:
artifactTypeparameter is unusedConsider this implementation:
@Override public Flux<ActionCollection> findByArtifactIdAndArtifactType(String artifactId, ArtifactType artifactType) { + if (artifactId == null) { + return Flux.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.ARTIFACT_ID)); + } + if (artifactType == null) { + return Flux.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.ARTIFACT_TYPE)); + } + // Handle different artifact types if needed + if (artifactType == ArtifactType.APPLICATION) { return repository.findByApplicationId(artifactId); + } + return Flux.error(new AppsmithException(AppsmithError.UNSUPPORTED_OPERATION)); }📝 Committable suggestion