-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: Git connected Application forking should use default branch application #13255
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
/ok-to-test sha=54f835d |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2218286104. |
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2218286104. Click to view performance test results
|
@@ -38,7 +39,20 @@ public class ApplicationForkingServiceCEImpl implements ApplicationForkingServic | |||
|
|||
public Mono<Application> forkApplicationToOrganization(String srcApplicationId, String targetOrganizationId) { | |||
final Mono<Application> sourceApplicationMono = applicationService.findById(srcApplicationId, AclPermission.READ_APPLICATIONS) | |||
.switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.NO_RESOURCE_FOUND, FieldName.APPLICATION, srcApplicationId))); | |||
.switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.NO_RESOURCE_FOUND, FieldName.APPLICATION, srcApplicationId))) | |||
.flatMap(application -> { |
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.
Let's make changes to upstream method as it has branch reference already:
public Mono<Application> forkApplicationToOrganization(String srcApplicationId,
String targetOrganizationId,
String branchName)
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.
Can we please move this to requested location just like we had done for cloneApplication?
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.
Can you please fix this for other APIs as well:
- Duplicate
- Export
@abhvsn We do not fetch the application there. It would be good to add it here right? |
But here we expect we have the actual |
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 follow the same implementation that we have for duplicate application API. Also can you please add the same for export application
return applicationService.findBranchedApplicationId( | ||
application.getGitApplicationMetadata().getDefaultBranchName(), | ||
srcApplicationId, | ||
AclPermission.MANAGE_APPLICATIONS |
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 update this with read_permission as forking is enabled for view access as well for sample apps
/ok-to-test sha=bb5825e |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2245224721. |
Description
Fixes #13185
Type of change
How Has This Been Tested?
Checklist: