FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
109 stars 18 forks source link

Merge Conflicts and Content Loss Across All Branches in Flutter Flow #3177

Open gianverdum opened 1 month ago

gianverdum commented 1 month ago

Can we access your project?

Current Behavior

I am encountering significant issues when attempting to merge any branch in Flutter Flow. Initially, the content of the source branch was being replaced by the destination branch content. As of now, every merge operation results in a large number of conflicts that did not appear previously. After resolving these conflicts, parts of the merged code break in both the source and destination branches, necessitating the recovery of previous versions to avoid data loss.

Expected Behavior

Merging branches should integrate changes from the source branch into the destination branch without unexpectedly replacing content or generating excessive conflicts. After resolving any legitimate conflicts, both branches should maintain their integrity without breaking or losing any part of the developed work.

Steps to Reproduce

  1. Open the branch "Fix 110-111-112" and take a look at the current appearance of the RegisterProfile page inside the Registration folder.
  2. Request to merge "Fix 110-111-112" into "Stage01".
  3. Accept all changes from the source branch.
  4. Check the RegisterProfile page inside the Registration folder on both the source branch ("Fix 110-111-112") and the destination branch ("Stage01") to see that most of the content is gone, and the page is blank.

Reproducible from Blank

Bug Report Code (Required)

IT40qPHY2M9/o8Np0JDuSvUwqAknNm58R7s30utRaCosfZT2BLMcec/RVERCXu3iYFVpeGeWmWoW0eD9vtjLDMc6YCmeGohJzJZiaBX/VlGuSr6XFJWgYXFBL5hhI0uP0KuNnBB+FMhacXMj2l2MJe/KbB7aQZDuIjAGDq/LZO4=

Visual documentation

Open source branch image Request merge into Stage01 image Appeared a new error blocking to show further steps image

Environment

- FlutterFlow version:  v4.1.61+ released June 18, 2024
- Platform: Web
- Browser name and version: Microsoft Edge Version 125.0.2535.92
- Operating system and version affected: Windows 11 Pro 23H2

Additional Information

A support ticket was opened on 13/06 with the information below, and I have not yet received a response. The issue reported in this ticket is related to the bug being opened here. This problem started occurring after the Flutter Flow update on the same date as the ticket opening, and since then, I have been 100% impacted. I have numerous improvements and fixes in two branches that I cannot promote to production, which is directly affecting my startup.

Previous Support Ticket Information: Ticket Type: Support Request Ticket ID: #3303 Title: Reports Branch Content Replaced by Stage01 Content Instead of Merging Properly

charliefabley commented 1 month ago

I too have had similar problems over the months with the merge. We have started to ensure that we only ever put a small amount into a branch and do the merge every day. But even then we double double check to ensure the destination hasn't lost edits. One thing that I do feel is completely incorrect not only because the documentation suggests otherwise but that it's even possible for the branch to be overwritten by the destination. We have found this happened on several occasions, and it actually means that if you do something wrong in the merge you risk losing the edits in the branch. So I still think there's a long way to go on the merge process and reported this to FF at least two months ago

gianverdum commented 1 month ago

Continuing the Visual Documentation

Before merge image Review Conflicts image Resolve RegisterProfile conflict image Resolve RegisterShopServices conflict image Resolve API conflict image

image

Resolve custom functions conflict image image Merge branch image

If the histtory is correct the merge was made in the oposite way, from the destination into de source image

msusviela commented 1 month ago

Hi @charliefabley and @gianverdum.

This should be fixed by now. If not, please let me know and provide me with the bug report code for the project so I can send them to our internal support team so they can manually fix the conflicts.

gianverdum commented 1 month ago

This time, the attempt to merge the branch "Fix 110-111-112" into "Stage01" did not break the content of the source branch. However, I did not see the changes reflected in the destination branch.

Follow the steps I took to ensure the issue was resolved.

View merge history via URL https://app.flutterflow.io/project/Vf44ICXveRWgXDgw6rtw?tab=widgetTree&page=RegisterCustomer image

View merge history via URL https://app.flutterflow.io/project/HianRY0PeFVjr2HuDlaT?tab=widgetTree&page=RegisterCustomer image

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for your response. Unfortunately, the issue still persists. Here is the bug report code for the project: IT40tsrlz4p5muZH4bruXvVvvCk4GmJ+W5IFitlraCosfZT2BLMcec/RVERDQsu9d0FiP2eGkWoW0fzKveGSMsIpByyeG75Ezqp2VDuXYGSXRLnRFJWgYXFBL5hhI0uP0KuNnBB+FMhacXMj2l2MJe/KbB7aQZDuIjAGDq/LZO4=

Could you please forward this to your internal support team to manually fix the conflicts? Your assistance is greatly appreciated.

Thank you, Gian Verdum

msusviela commented 1 month ago

Thanks @gianverdum. I already sent that to support, i'll let you know as soon as I have any update

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for the update and for forwarding the issue to support. I appreciate your assistance. Please keep me informed of any progress or further actions needed from my side.

Thanks again, Gian Verdum

msusviela commented 1 month ago

Hi @gianverdum. The merging issue should be resolved. Please, let me know if it's working as intended. If the issue still persist for one particular merge, please let me know the merge Id of that particular merge

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for the update. I will check to see if the merging issue is resolved.

In case the problem persists, could you please guide me on where to find the merge ID for a particular merge?

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for your prompt response. I have conducted some tests and here are my findings:

My project setup includes the main branch, from which we have derived the Stage01 branch. From Stage01, we have two additional branches: Fix 110-111-112 and Reports, each working on mostly different tasks.

Now, I need to merge both branches back into Stage01 to test all the changes before merging into the main branch and deploying to production.

Merging Reports Branch:

There were conflicts in custom functions. Instead of simply adding the new functions, the merge replaced all existing functions. I had to undo the merge, manually add the missing custom functions from Stage01 back into the Reports branch, and then perform the merge again. The RegisterProfile page lost the configuration of the Stack widget, which required manual adjustment. Merging Fix 110-111-112 Branch:

After merging this branch into Stage01, the content from Stage01 was replicated, and entire pages disappeared. For example, the RegisterSelectPlan page, which should be in the Registration folder, was missing. In summary, conflict resolution is breaking page layouts, overwriting all custom function content, deleting entire pages, and replicating the destination branch content in the source branch.

Please advise on the next steps to resolve these issues.

Thank you for your assistance.

gianverdum commented 1 month ago

Hi @msusviela,

I received a notification about an update on Flutter Flow a little while ago, so I attempted the merge process from the branch Fix 110-111-112 to Stage01 again.

Unfortunately, there are still several conflicts that cause errors. In my perception, these conflicts arise because there are no actual divergences between the branches. When accepting one of the versions during conflict resolution, I can already see that the merge will be broken based on the accepted changes.

For example, the RegisterShopServices page. Below are screenshots showing the page in each branch and then how it looks after accepting the changes during the merge.

image image image

As I have not received any feedback from the Flutter Flow team since yesterday, I can only presume that the issue is still unresolved.

Thank you for your continued support.

msusviela commented 1 month ago

Hi @gianverdum. I'll ask them again

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for following up. I appreciate your assistance.

Just to keep you updated, I received a response from support mentioning that they reached out to the engineer working on this issue and are hoping to get feedback soon. However, I haven't received any further updates since then.

I am very interested in the solution and would like to know the estimated time for resolving this issue. The ongoing merge conflicts are significantly impacting our workflow, and a timely resolution would be greatly appreciated.

Thank you again for your help.

msusviela commented 1 month ago

Hi @gianverdum. Currently our dev team is looking after it! I'll let you know as soon as I have any update in this.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

danielthedifficult commented 1 month ago

Our project is having a similar issue.

We opened a branch update_format_currency_method_user_pov to implement a new custom function for text formatting, then we applied the custom function to certain text widgets and buttons.

When merging back to main, the changes were correctly applied. However, when we merged a second branch bug-cancel-screen-is-blank (created before update_format_currency_method_user_pov), which contained a separate custom function.

We found that all the change from update_format_currency_method_user_pov were lost.

In the Git diff of bug-cancel-screen-is-blank's merge, we see that the 'custom_functions' file was modified, and thus removed the custom function from text-format-fixes (aka not a 'real' merge).

This also removed all changes in the ui that referenced this custom function - perhaps this is a natural result of the merge, or perhaps this is a 'safety' feature that removed a custom function that no longer existed- i don't know :)

What I do know is that your documentation on how to use merges safely is not clear, and our confidence when using them is low.

Project ID: time-left-lkfqib

gianverdum commented 1 month ago

image

Hi, @msusviela

I just received the email above. Are you really planning to close this issue without resolving the problem?

msusviela commented 1 month ago

Hi @gianverdum. We're not going to close it without a solution. I asked them and they're still working on it.

msusviela commented 1 month ago

Hi @gianverdum. Could you please explain with details what you're expecting with this merge? I'm asking so our support team is able to perform it.

gianverdum commented 1 month ago

Hi @msusviela,

Thank you for your response. Due to the lack of resolution for the issue, my co-founder and I decided to manually redo all the work from the branches directly into the Main branch. We have now completed this process and published the updated version in production.

To clarify, we did not open the issue for your team to perform the manual merge for us. It was due to the delay in addressing the issue that we had to redo everything manually. However, we still need the underlying problem resolved, as we have a strong interest in continuing to use branches for our development workflow. Currently, we are unable to do so due to the ongoing merge conflicts.

I hope this clarifies our situation and the urgency of resolving this issue so that we can effectively use branches in the future.

RyanHedges commented 3 weeks ago

My project continues to experience this problem as well. I don't recall experiencing this until the most recent FF update, but that's anecdotal. We've also tried merging [main] into our working branch trying to preemptively deal with the issues, but in most cases it doesn't seem to do or mean anything as it often says "0 conflicts".

For those that find themselves here without a fix or proposed work around provided by the FF team, here is how we're tolerating this bug on our team of two. Do this in the browser version of FF

Some other strategies we've employed

I hope this helps other frustrated teams until this is addressed! 🫶

charliefabley commented 3 weeks ago

Thank you these tips are very useful,, and for the record we experienced the same issues of losing work far more often than we'd like, to the point at which we avoid branches where possible. This is a real shame as we're a team of three now and it's getting harder in order to do that.

On Tue, Jul 9, 2024 at 8:28 PM Ryan Hedges @.***> wrote:

My project continues to experience this problem as well. I don't recall experiencing this until the most recent FF update https://community.flutterflow.io/c/whats-new-in-flutterflow/post/what-s-new-in-flutterflow-june-25-2024-MNd3u70ipLLlMKa, but that's anecdotal. We've also tried merging [main] into our working branch trying to preemptively deal with the issues, but in most cases it doesn't seem to do or mean anything as it often says "0 conflicts".

For those that find themselves here without a fix or proposed work around provided by the FF team, here is how we're tolerating this bug on our team of two. Do this in the browser version of FF

  • We create a new branch off [main]. Call it [my_new_branch].
  • Have the old [my_branch] and the new [my_new_branch] opened in two different browser tabs.
  • Ensure no other changes will be made to [main] while this is happening.
  • Copy and paste, or remake the changes from [my_branch] to [my_new_branch]. Thankfully copy and paste for full pages or components works fairly well to reduce the overhead of all of this
  • Merge [my_new_branch] into [main]
    • Most of the time there are no merge conflicts. But sometimes there are so accepting changes from [my_new_branch] doesn't feel as risky for lost work
  • Immediately save a version https://docs.flutterflow.io/getting-started/ui-builder/tool-bar#id-6.1-saving-a-version
  • Immediately push to github and make a PR from the flutterflow branch
  • Look for any unexpected changes or code removals and go back and address on [main] if needed.

Some other strategies we've employed

  • Save versions of [main] after every merge and change so we can peek and copy and paste back deleted changes
  • Keep changes as small and isolated as possible. Means more branches, more conflicts, but the above workflow becomes less time consuming and error prone.

I hope this helps other frustrated teams until this is addressed! 🫶

— Reply to this email directly, view it on GitHub https://github.com/FlutterFlow/flutterflow-issues/issues/3177#issuecomment-2219155834, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEUI4UPTOC5JO4JYRRHE2Y3ZLR52DAVCNFSM6AAAAABJSDNVUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJZGE2TKOBTGQ . You are receiving this because you were mentioned.Message ID: @.***>

msusviela commented 3 weeks ago

Hi @gianverdum. Yesterday a new update for FlutterFlow came out. There should be changes regarding branching that should fix some branching issues. Please, let me know if you're still experiencing those issues. Thanks!

gianverdum commented 3 weeks ago

Hi @msusviela,

I'm performing the merge to see if the issues are resolved. However, the conflicts that appear do not seem to exist upon comparison. image

JJust to continue the test, I'm accepting the branch Fix 110-111-112. The first merge to stage01 appeared to have worked.

Merging the Reports into stage01 showed a conflict in the RegisterProfile page regarding an added stack. image When resolving it, the data breaks in the same way it did when we opened this issue. image Even so, I'm accepting the stage01 version. Despite going through to perform the second merge into stage01, it wasn't possible because after resolving conflicts, most of which don't actually exist, it creates a lot of bugs that don't make sense. image

In summary, the outcome of merging these branches has changed, probably due to the updates you mentioned, but there are still some issues preventing it from being done correctly.

RyanHedges commented 3 weeks ago

Today I noticed that existing branches exhibit the identical errors and issues as they did from before the update today when I tried to merge them. I have since copied the changes onto new branches and deleted the old ones.

When creating and using new branches after todays update, the gratuitous amounts of incorrect merge conflicts hasn't appeared. That being said, we continue to experience content loss. Content loss of new work when merging [main] into [my_branch], as well as previously changed content when merging [my_branch] into [main].

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

mahmoud99990 commented 2 weeks ago

Hi @charliefabley and @gianverdum.This should be fixed by now. If not, please let me know and provide me with the bug report code for the project so I can send them to our internal support team so they can manually fix the conflicts.

I have same issue ..

https://github.com/user-attachments/assets/895e50d0-df4b-4c5d-8d0e-6e0034edf40d

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

jonl-percsolutions-com commented 3 days ago

My team is also seeing similar issues in merging a branch in 4.1.79+.

If ya'll can't get merging right, please provide an option to store and back the whole project in an external github repo, instead of just the main branch, where the merges would be able to be done in a trusted and working tool, but without sacrificing the utility of flutter flow.

We can not continue to justify paying for flutter flow teams if flutter flow continues to lose our code and cause additional work.

jonl-percsolutions-com commented 3 days ago

One work around we have discovered, if not dealing with multiple branches or changes that occurred afterwards, rolling back to a prior snapshot before the merge request appears to resolve most, but not all the merge conflicts and issues.

Things that we saw after doing so:

Items from a design library utilized in the branch, but not yet existing in main were not merged in.

Did there not used to be a rebase option? The rebase option is now missing.

it is shown in the documentation, but appears to be missing after the close branch button was moved.

https://docs.flutterflow.io/getting-started/ui-builder/tool-bar/branching

Another small issue:

The merge -> main button does not always appear:

image