fix: added fix for disabling the autocommit feature without feature flag (#34020)

## Description
- Added @featureFlagged annotation `(release_git_autocommit_enabled)` to
the interface method `isAutoCommitRequired` for
`AutocommitEligibilityHelper` to disable the autocommit as a feature

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/9398022580>
> Commit: f25b9eff2b2e4b0a646120d3c29748e6d71b9f5b
> Workflow: `PR Automation test suite`
> Tags: `@tag.Git`

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Introduced a feature flag for auto-commit functionality in the app.

- **Tests**
  - Disabled specific auto-commit test methods.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Manish Kumar 2024-06-06 14:56:52 +05:30 committed by GitHub
parent 8d0091ec78
commit b9cf7707a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,7 @@ public class AutoCommitEligibilityHelperImpl extends AutoCommitEligibilityHelper
}
@Override
@FeatureFlagged(featureFlagName = FeatureFlagEnum.release_git_autocommit_feature_enabled)
public Mono<AutoCommitTriggerDTO> isAutoCommitRequired(
String workspaceId, GitArtifactMetadata gitArtifactMetadata, PageDTO pageDTO) {

View File

@ -34,6 +34,7 @@ import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.BranchTrackingStatus;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mockito;
@ -229,6 +230,7 @@ public class ApplicationPageServiceAutoCommitTest {
}
@Test
@Disabled
public void testAutoCommit_whenOnlyServerIsEligibleForMigration_commitSuccess()
throws URISyntaxException, IOException, GitAPIException {
@ -282,6 +284,7 @@ public class ApplicationPageServiceAutoCommitTest {
}
@Test
@Disabled
public void testAutoCommit_whenOnlyClientIsEligibleForMigration_commitSuccess()
throws GitAPIException, IOException, URISyntaxException {
ApplicationJson applicationJson =
@ -344,6 +347,7 @@ public class ApplicationPageServiceAutoCommitTest {
}
@Test
@Disabled
public void testAutoCommit_whenAutoCommitNotEligible_returnsFalse()
throws URISyntaxException, IOException, GitAPIException {