FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
129 stars 26 forks source link

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

Open gianverdum opened 4 months ago

gianverdum commented 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months ago

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

gianverdum commented 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months ago

Hi @gianverdum. I'll ask them again

gianverdum commented 4 months 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 4 months 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 4 months 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 4 months 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 4 months ago

image

Hi, @msusviela

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

msusviela commented 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 3 months 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 3 months 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 3 months 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 months 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 months 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

github-actions[bot] commented 3 months 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.

ready4sea commented 2 months ago

Hi,

I have also been encountering merge issues for the last 2 months. This has been the subject of 4 tickets opened with support (# 1506, 4335, 4885 and 6080). In our latest chat, I have been asked to post here in order to help you figure out the causes of the main issue plaguing the merge process: parameters, values, arguments and fields which appear in the selected side of the conflict resolution disappear in the merged version. There are other smaller issues, but this is the single biggest problem.

Here are screenshots from a long video recording I made (and which I cannot share publicly here).

This is the way the branch feature looks like before merging and before conflict resolution: image (2)

After selecting this side during conflict resolution, this is the way the accepted (merged) version looks like: image (3)

There are many many such occurrences which have the same pattern: the values are not carried over in the merged version. As a result, I would need to recreate my entire actions and logic in the merged version, which clearly defeats the purpose of branching, merging and conflict resolution.

In my case, I end up having nearly 70 such conflicts in the merged version, where arguments, parameters and fields are "not properly set" or "not specified" or do "not exist": image (1)

This issue begs for swift resolution: I have a feature stuck on a branch since way back in June, and I can't merge it. Please advise.

ready4sea commented 2 months ago

Any news regarding this issue ? @FlutterFlowEng

jmvl commented 2 months ago

I'm experiencing the same problem with my Flutterflow project. I was using a branch for a specific feature, trying to merge it to the main branch, and it broke the main branch completely, not applying the changes after resolving the merging conflict. This is a terrible situation. For now and in order to move on with the work, I need to redo all the changes of the branch into the main branch and keep on saving it very often. This is totally unprofessional way of working. We want to use branches. It makes collaborative work impossible with Flutterflow. We considering to move to Flutter and drop Flutterflow completely if this is not resolved.

bartusisman commented 1 month ago

Does anyone know will these kind of problems be less likely to occur when flutterflow 5.0 gets released with the new commit feature?

ready4sea commented 1 month ago

I have no clue, but my issue is still not solved and I have a support ticket open, plus I've been asked to open a different ticket (#3821), which has been linked to this one. I sure hope FF 5.0 will solve these issues !

TimothyWCTI commented 1 month ago

Why has this issue been closed as not planned?

ready4sea commented 1 month ago

Why has this issue been closed as not planned?

I had a lengthy discussion with support, and I was told that my data loss "is not a bug but an expected behavior". Later on they even said "Given the complexity of the current branching system, it may be best not to rely on this feature for now".

😞

TimothyWCTI commented 1 month ago

I'm not sure I understand how variables being lost is expected behavior, even with how strange development can occasionally be. I'm currently on a Team subscription with some co-workers, but have been forced to solo-develop due to these branching issues. But their recommendation is to avoid branching? Will they announce this publicly so people don't have to search for this closed issue to find out branching is not recommended?

ready4sea commented 1 month ago

@TimothyWCTI , Let me tell you I also have trouble understanding this. And the discussion has been harsh precisely because I consider it fully abnormal. I have taken up a team plan for this purpose as well. And they are having issues recognizing that notwithstanding the time lost, money spent, effort wasted and data loss, it's as if I had been working with a Pro plan, but paying two Teams seats instead. The refunds offered have sadly not been up to the standard they are professing publicly. So my guess is no, they will not announce anything and sadly it looks as though the only ones following this (now closed) issue is us developers confronted the issue. I had tried tagging the involved people in #3821, so I won't do it again here. However, you can try doing so as well, but alas I fear we're pretty much on our own.

TimothyWCTI commented 1 month ago

@ready4sea, It sounds like we can only wish each other luck while we wait for more people to discover this issue and create some demand for a better solution.

leighajarett commented 1 month ago

Hi everyone - so sorry you're having an issue with branching.

To give you some background, we built our own "diffing" logic - which means we internally have our own logic that checks for differences between branches and decides what the merge result should look like. We understand that this end result isn't matching up with user expectations.

We're in the process of doing a large overhaul to this system to improve the accuracy of the merges and ensure the entire experience is transparent and reliable.

I know this is really frustrating. I just want to come in here and say we understand that branching isn't where it needs to be, this is a known issue and we're actively working on it. It's one of our highest priorities and we hope to have something released ASAP that will resolve these issues once and for all.

In the meantime, we recommend keeping branch histories relatively short to avoid overly complex merges (so create a new branch for your feature, build the feature, merge it in and then close the branch).

Thank you so much for your patience

leighajarett commented 1 month ago

I will reopen this issue so it's fully clear to everyone that we are working on a fix. Sorry that it was closed!

ready4sea commented 1 month ago

Thank you for the clarification @leighajarett.

Indeed, there has been a lot of frustration around this issue. And I wish the branching could have been short like you suggest. But when I attempted to merge there was data loss, and since then there have been 6 support tickets and 3 months have gone by. Now of course, my feature is stranded on a branch, and main has diverged more and more. We have finally come to the conclusion with support that merging would not be possible. I am now facing days of copy-pasting instead, and I won't go into the barely settled topic of compensation for this disaster.

Now if I may reiterate here the opinion I expressed in the survey following the last FFDC : launching very hype features with bells and whistles is all good for investors. But in the end, the clients are the developers who have to live with major issues which remain unsolved after months and months. Such as this one, or internationalization (#2346), or the fact that the FF implementation of Remote Config (#2950). In addition, some of the newer features, while they look promising, seem to be half baked. For example, dev environments hinder code download (see #3951, which I just opened).

Now, I really believe you guys are onto something with FF, don't get me wrong. But I feel you really need to close off those big issues before pushing into more new features. Your customers will thank you for it. Because, let's face it, why use AI to save a few hours, when bugs waste days of your work ?

leighajarett commented 1 month ago

Thanks for the feedback. I totally understand your frustration. We're re-focusing on fixing bugs and will be sure to try and do a better job of prioritizing these issues.

Anyways hope this helps. I hear your concerns, we'll focus on getting some of these issues resolved

joaosoaresmatos commented 1 day ago

Same issue here, folks. Do you know if there’s any expectation for a solution? It’s been over a month since the last comment. Is it really prioritized as urgent?

@leighajarett