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

[Bug]: Seeing modifications to be commited, even when no changes have been made on the app #27941

Closed
1 task done
btsgh opened this issue Oct 11, 2023 · 7 comments · Fixed by #33016
Closed
1 task done
Assignees
Labels
BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Git Pod Anything related to git sync Git status Issues related to information shown on git status modal or number of changes appearing in a branch Git Version Control Issues related to version control Integrations Pod Issues related to a specific integration Low effort Takes 1-2 days Low An issue that is neither critical nor breaks a user flow Production QA Pod Issues under the QA Pod QA Needs QA attention REST API plugin REST API plugin related issues

Comments

@btsgh
Copy link

btsgh commented Oct 11, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Description

In a git connected app, after committing and deploying, when I browse to the api and come back to home page, I see that though I have not made any changes on the query, or app, the message on git modal asks me to commit as there have been changes since last deployment

Steps To Reproduce

  1. Create a git connected app
  2. Create two branches A and A-test
  3. In the A-test branch, create an api, run the api, attach it to a table on a page and rename the page
  4. Now commit changes and deploy the app
  5. Merge changes from A-test to A branch
  6. Do not change anything in either of the branches, but just browse through the page, query and come back to page
  7. Observe after a while that one modification tool tip pops up and on the modal, the message indicates user to commit since there have been changes since last deployment. Even if we discard and pull, this still does not go away
  8. The screenshot below is from the file committed on github repo
Screenshot 2023-10-11 at 12 44 52 PM

Application url -
https://app.appsmith.com/app/gitissuetest/page1-652646902be41c5c758b0d65?branch=master

Public Sample App

No response

Environment

Production

Issue video log

https://ddpa7mfuvv.vmaker.com/record/T0ZC7jXDLddaHzNc

Version

Cloud

@btsgh btsgh added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Production Needs Triaging Needs attention from maintainers to triage Git Pod Anything related to git sync labels Oct 11, 2023
@github-actions github-actions bot removed the Git Pod Anything related to git sync label Oct 11, 2023
@btsgh btsgh added the Git Pod Anything related to git sync label Oct 11, 2023
@github-actions github-actions bot removed the Git Pod Anything related to git sync label Oct 11, 2023
@Parthvi12 Parthvi12 added the Git Version Control Issues related to version control label Oct 12, 2023
@github-actions github-actions bot added the Git Pod Anything related to git sync label Oct 12, 2023
@nidhi-nair nidhi-nair added Low An issue that is neither critical nor breaks a user flow Low effort Takes 1-2 days Git status Issues related to information shown on git status modal or number of changes appearing in a branch and removed High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage labels Apr 2, 2024
@RakshaKShetty
Copy link

Issue still exists
image

@nidhi-nair
Copy link
Contributor

@rohan-arthur @sumitsum could you folks help with information on this property? Who owns the assignment of this property and would it be okay to not persist the value at all?

@sumitsum
Copy link
Contributor

IMO, autoGeneratedHeader logic resides on the client. Adding @AmanAgarwal041 @sneha122 for help.

@sumitsum
Copy link
Contributor

sumitsum commented Apr 24, 2024

Regarding persistence, I think it needs to be persisted in the DB, otherwise query execution will fail. Should this be shared via export feature - this can be debated.

@sneha122
Copy link
Contributor

@nidhi-nair The autoGeneratedHeaders was introduced to solve this issue, if we remove it, it would cause issue mentioned in the notion doc. We can probably check why this field is getting introduced as changes in the first place with [] array and then determine the fix for this

@nidhi-nair
Copy link
Contributor

Thanks for the context Sneha, Sumit! From what Sneha has mentioned, and the implementation details in the doc, I agree that the field itself cannot be removed from exported files.

I am going to re-assign this issue to you Sneha to triage and figure out how this value can be initialized correctly on the server itself. I suppose a default empty list value should do the trick. I'll work with the team to introduce mechanisms that ensure addition of such fields in the future would always be compliant with git.

@sneha122 sneha122 added the REST API plugin REST API plugin related issues label Apr 26, 2024
@github-actions github-actions bot added the Integrations Pod Issues related to a specific integration label Apr 26, 2024
@sneha122
Copy link
Contributor

@nidhi-nair I have created a fix for the issue, please check the Pr once, it was a frontend change because all defaults are getting initialised in the frontend. @btsgh Please test out the changes on DP once as well

sneha122 added a commit that referenced this issue Apr 30, 2024
## Description
The autoGeneratedHeaders property in actionConfiguration is
unnecessarily getting introduced as git changes. This PR fixes that
issue.

With current implementation, In a git connected application, when we
create any action and bind it to table widget, once we successfully
commit these changes, after surfing the application without making any
changes, we can see new changes to be committed for git and in those
changes we can see `autoGeneratedHeaders: []` inside
actionConfiguration. This issue has been fixed by initialising the field
by default when we create action.

<img width="932" alt="gittest"
src="https://github.com/appsmithorg/appsmith/assets/30018882/9d76ab45-7cb4-4aa4-ba44-baf19a1f38e0">


Redux unit tests have been added to assert the fix


Fixes #27941 
_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.Datasource"

### 🔍 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/8874903423>
> Commit: 769749d
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8874903423&attempt=1"
target="_blank">Click here!</a>

<!-- 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**
- Enhanced API and GraphQL editors with support for auto-generated
headers to streamline configuration processes.
- **Tests**
- Added new tests to ensure the reliability of API configuration
functionalities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
@appsmith-bot appsmith-bot added the QA Needs QA attention label Apr 30, 2024
@github-actions github-actions bot added BE Coders Pod Issues related to users writing code to fetch and update data QA Pod Issues under the QA Pod labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Git Pod Anything related to git sync Git status Issues related to information shown on git status modal or number of changes appearing in a branch Git Version Control Issues related to version control Integrations Pod Issues related to a specific integration Low effort Takes 1-2 days Low An issue that is neither critical nor breaks a user flow Production QA Pod Issues under the QA Pod QA Needs QA attention REST API plugin REST API plugin related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants