Commit Graph

19 Commits

Author SHA1 Message Date
Subhrashis Das
11a5a963d2
feat: add git route aspect for branch handling (#41097)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


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.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16343398654>
> Commit: f8257de8135f4243309143396eca2a81bdb6f2a3
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16343398654&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 17 Jul 2025 12:14:40 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

* **New Features**
* Introduced a new annotation to streamline and secure Git-related
operations in application APIs.
* Added a robust workflow for handling Git operations with enhanced
concurrency control and error handling.
* Enabled in-memory Git storage mode for improved performance in certain
environments.
* Added support for executing Git operations via shell scripts,
including branch merging and repository management.

* **Improvements**
* Enhanced configuration flexibility for Git storage and Redis
integration.
* Improved error reporting with new, descriptive Git-related error
messages.
* Broadened environment file ignore patterns for better environment
management.

* **Bug Fixes**
  * Improved handling of private key formats for Git authentication.

* **Documentation**
* Added detailed documentation and flow diagrams for new Git operation
workflows.

* **Chores**
* Updated build and test configurations to align with new Git storage
paths.
* Deprecated and bypassed certain Redis operations when using in-memory
Git storage.

* **Tests**
* Removed several outdated or redundant test cases related to
auto-commit and Git serialization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-21 14:11:34 +05:30
Nidhi
e8c47cdaa2
fix: Start using SHA2 instead of SHA1 algorithms for signing during git operations (#33166) 2024-05-06 18:25:32 +05:30
Nidhi
c51e4b810d
chore: Introduce changes to minimize git footprint (#32595) 2024-04-16 21:34:24 +05:30
Shrikant Sharat Kandula
b5e9ce8718
chore: Use Lombok's FieldNameConstants instead of QueryDSL (#31269)
QueryDSL will be replaced with Lombok's `FieldNameConstants` here. Why?

1. QueryDSL with JPA on relational databases doesn't lend itself very
well to nested data structures. But with MongoDB, it works quite well.
So we've come to rely on it quite a bit. Since we intend to move towards
a more flat, relation-ed and normalized DB design once we get to
Postgres, dealing with nested data structures should be seen as
temporary.

2. We only use QueryDSL for field name constants, and absolutely nothing
else. QueryDSL is a far more capable and powerful system, and is
overkill for this purpose. Lombok's annotation is exactly tuned for this
purpose and is more concise and easy-to-use.

3. QueryDSL query generation current doesn't work in IntelliJ, but
Lombok's does. So this will free us up from having to run a Maven build
when sometimes switching branches.

**PS**: This PR doesn't remove QueryDSL entirely. Only a part of it.
That'd become a much bigger PR and I'm already uncomfortable with the
size of this PR. Once this is merged, I'll open further PRs until we
completely remove QueryDSL.

**PPS**: QueryDSL is a powerful querying mechanism that we don't use
today. Perhaps once we're comfortable with Postgres in the future, we
will very likely revisit.
2024-02-26 16:33:07 +05:30
Anagh Hegde
7d4ecdb7a6
chore: fix the jgit version updates in other places (#27558)
Should resolve the following CVE reports:

1. https://github.com/appsmithorg/appsmith/security/dependabot/263
1. https://github.com/appsmithorg/appsmith/security/dependabot/264
2023-09-22 13:16:04 +05:30
Shrikant Sharat Kandula
9ea97c9db8
chore(deps): Update JGIT version (#27428)
Should resolve the following CVE reports:

1. https://github.com/appsmithorg/appsmith/security/dependabot/263
1. https://github.com/appsmithorg/appsmith/security/dependabot/264
2023-09-19 16:00:07 +05:30
Nidhi
d6e74bf012
chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
Nidhi
dfccd5a058
chore: Upgrade to Spring Boot 3.0.1 (#19044)
This upgrade takes care of our move to JDK 17, Spring Boot 3.0.1 and a
few other security upgrades along the way.

Fixes #18993 

TODO:

- [x] Check CI changes for Java 17
- [x] Check vulnerability report
- [x] Mongock needs an upgrade
- [x] Add JVM args at all possible places for exposing java.time module
- [x] Add type adapters everywhere / use the same config for type
adapters everywhere
2023-01-02 19:40:59 +07:00
Nidhi
66f3dfe790
chore: Move to Jupiter JUnit5 (#17083)
* Upgrading to Jupiter tests for everything but plugins

* Whoops, too soon

* Fixed failing tests

* Imports fixed

* Removed PowerMock dep and JUnit4 from interfaces

* Woohoo! That's testcontainers

* Added maven enforcer to disallow junit4

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/GitServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserWorkspaceServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Weird formatting and version upgrades

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-29 08:54:07 +05:30
Abhijeet
1c03266d31
fix: Fix backward compatibility related to v1 git file format (#14770)
* Fix backward compatibility for v1 git file format

* Add testcase

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-06-24 09:59:18 +05:30
Vishnu Gp
63205dce27
Merge pull request #14184 from appsmithorg/feat/git-delete-only-removed-resources
Feat: Perform file ops only when the resource is updated
2022-06-22 10:53:45 +05:30
subratadeypappu
531f5f89d5
fix: Upgrade Lombok package version to 1.18.22 to avoid build error (#14080) (#14156)
Update lombok packages to version 1.18.22
2022-06-01 10:29:42 +00:00
Abhijeet
fa0e900f3f
fix: Sort unordered set elements before committing to git repo so as to have same serialised output string for identical set of elements (#10933) 2022-02-08 00:48:20 +05:30
Anagh Hegde
e216dad15b
feat: Refactor APIs to include branch name in the request header (#9679)
* refactor api's to include branchName for git

* Check for updating Ids for move action

* Added check for global profile

* Fix bad merge

Co-authored-by: Abhijeet <abhijeet@appsmith.com>
2021-12-14 15:09:30 +00:00
Anagh Hegde
6faaa33936
feat: Git version control functionality with connect to remote, commit, push flows (#8403)
* core workflows of git - branch, clone, commit, pull, merge, status, log

* Rehydrate file system before merge operation

* Add logic to handle merge conflict for merge and pull flow

* Add defaultBranch to listBranch API

* Add Unit tests for git commands

* Upgrade JGit dependencies to fix the security issue

* Git command tests

* Revert unwanted changes and update delete application flow

* Disable git feature until the FE changes are merged

Co-authored-by: Abhijeet <ABHI.NAGARNAIK@GMAIL.COM>
2021-10-20 09:47:34 +00:00
Nayan
6247b6a3a5
feat: Generate and store ssh key to git meta data of application (#7184)
- Added new API that generates a new ssh key pair and stores that inside the git meta data of an application. The key is generated in open ssh format. The private key is stored as encrypted in DB.
2021-09-08 20:54:20 +06:00
Abhijeet
168000be92
[skip_changelog] Feature/directory structure for version control (#6757)
* Insert git application metadata to application object, for git sync/version control feature there is a need to save the application in the structured format

* Added changelog to index application collection with git branch and remoteurl

* Rehydrate and dehydrate applications among different instances

* Added serailisation purpose while exporting the application to make distinction between version control and regular import-export flow 

* Git file operations moved to appsmith-git module

* Delete json reference from directory for deleted resource in DB

* Added git authentication in application metadata

* Replace String with Path to handle file path in git file structure
2021-09-06 18:18:18 +05:30
Anagh Hegde
078ad25613
feat: Create interface for git service and add all the required classes (#6903)
* Create interface for git service and add all the requireq classes

* Fix name of the service class

* Fix name of the service class as per review
2021-08-27 14:17:35 +05:30
Anagh Hegde
58fad5f3fb
feat: Add maven module for the git operations (#6825)
* Add appsmith-git maven module for all the git related operations
2021-08-25 21:30:29 +05:30