hop icon indicating copy to clipboard operation
hop copied to clipboard

[Bug]: hitting OK in transforms does sometimes not apply the changes

Open gmitter-ef opened this issue 9 months ago • 14 comments

Apache Hop version?

2.12.0, 2.13.0-snapshot, 2.14.0

Java version?

OpenJDK 17

Operating system

Windows

What happened?

  • choose default project
  • create a new pipeline
  • add a "Data grid" transform
  • add a field "test" of type "String" and enter "A" as data
  • rename the Data grid to e.g. "test" (not sure if renaming is actually necessary for the bug exposal!)
  • save the file
  • Repeat the following steps: ** edit the Data grid ** delete value "A" for field "test" ** hit "OK" ** save the file ** edit the Data grid ** enter value "A" for field "test ** hit "OK" ** save the file

At some point in time, the file does not get bold after hitting OK, and the changes you made are not applied!!!

This is a bug that applies to all kinds of transforms, and is hard to reproduce, but extremely annoying. NOTE: this seems to have been introduced in 2.12.0., until 2.11.0 this was never experienced.

Issue Priority

Priority: 3

Issue Component

Component: Hop Gui

gmitter-ef avatar Mar 20 '25 08:03 gmitter-ef

i can confirm also the behavior. i am experiencing this also at version 2.8.0. its very annoying when we are doing a lot of changes and loosing them just with a click of a button.

enjoyy2 avatar Mar 20 '25 14:03 enjoyy2

Hi @gmitter-ef you suggested to use DataGrig transform because you are experiencing the issue on that transform only? Can you give us a wider view if the problem? The problem you are experiencing is related with events handled by any visual component (with this term I mean any component in Hop that has a gui so for example transforms, actions and so on). That said I'm asking you about that because it could be an issue related only with the way the DataGrid component handle GUI events.

sramazzina avatar Apr 08 '25 09:04 sramazzina

Hi @sramazzina! No, it is a problem that is NOT restricted to DataGrid transform only, I only chose DataGrid because there it was rather simple to reproduce the issue.

gmitter-ef avatar Apr 15 '25 13:04 gmitter-ef

@gmitter-ef @enjoyy2 just tried 15-20 times to reproduce the issue (on MacOS, not Windows), but I assume @sramazzina woul have encountered this on Windows too if it was easy to reproduce. The more information you can provide to reproduce this, the better. Without a clear reproduction path, I'm afraid we're in the dark on this.

bamaer avatar May 07 '25 17:05 bamaer

I know we also have listeners to see if files have changed on the file system and then reload the file. So I am wondering if you are storing your pipelines/workflows on a network backed location? OneDrive or a NAS mount or a synced home folder?

hansva avatar May 07 '25 17:05 hansva

@bamaer Hi, I just used a fresh installation of 2.13 and reproduced it again under Windows 11. Both deleting the value as well as entering it sometimes does not apply the change, and the file name tab does not get bold.

In 25 consecutive editing steps (either entering or deleting the value "A") the issue occured on the 5th, 16th and 24th time.

gmitter-ef avatar May 08 '25 05:05 gmitter-ef

I know we also have listeners to see if files have changed on the file system and then reload the file. So I am wondering if you are storing your pipelines/workflows on a network backed location? OneDrive or a NAS mount or a synced home folder?

No, everything on the regular file system, C:\apache-hop-client-2.13.0\hop

gmitter-ef avatar May 08 '25 05:05 gmitter-ef

Do not know if it helps a lot, but the "JavaScript" transform is definitely also affected, the changes seem to be a little more frequently not applied than in the Data grid.

Image

  • Change "Type" from "String" to "Integer" and back some times
  • Change " = 'bla';" to " = 'xyz';" some times. In 25 changes 4 times the change was not applied.

Also selecting the code with the mouse, hitting "Delete" and then clicking OK loses the modification regularly.

gmitter-ef avatar May 08 '25 06:05 gmitter-ef

i am getting the same behavior as gmitter-ef on multiple transforms since 2.8.0, formula, java transform, select values, create json, i select some fields then hit ok, when i enter again their are not selected, even with select values transform. also i am on regular file system. it's seems like hitting ok does not save the file with the new changes. sometimes i even hit ok, the pipeline name does not even highlight in bold as not being saved, but in fact it is already saved cause pressing ctrl+s does not do anything.

i developed a behavior to always save what i wrote in custom code or formula transforms to have it in the clipboard not to loose work. i also click around the canvas sometimes and move a transform a little and save the pipeline to avoid this behavior, sometimes works but not always. somehow something is stuck behind before trying to open a transform and edit it.

enjoyy2 avatar May 08 '25 07:05 enjoyy2

I know we also have listeners to see if files have changed on the file system and then reload the file. So I am wondering if you are storing your pipelines/workflows on a network backed location? OneDrive or a NAS mount or a synced home folder?

No, everything on the regular file system, C:\apache-hop-client-2.13.0\hop

And your project is in the same hop folder?

hansva avatar May 08 '25 07:05 hansva

I was able to reproduce it. now have to figure out what is happening

hansva avatar May 08 '25 07:05 hansva

Just wanted to add that the issue is reproducable very fast in 2.14.0 when trying to rename a write-to-log transform in a pipeline: there the issue occurs every few save-trials, sometimes even multiple times in a row. It sometimes feels that it needs 5 or more times hitting Ok when trying to add/change the characters at the end of the name (here: the number)!

Image

gmitter-ef avatar Jun 05 '25 11:06 gmitter-ef

Just observed a set of multiple subsequent changes that got ignored when trying to change "Action name" in the "Simple evaluation" action also, in 2.14 under Windows.

gmitter-ef avatar Jun 12 '25 10:06 gmitter-ef

.take-issue

hansva avatar Jun 30 '25 08:06 hansva

so what I've found out that happens in terms of visual steps. because i deal with this every day, getting to modify an action/transform and after hitting ok doing lots of changes nothing applies. i was just working on a workflow with a get sftp to configure. now when i click the get a file with sftp usually the tab with the name of the workflow gets bold, as not saved. i changed something, hit ok, still bold, save it and reopen it, then i see the change. close the transform. now i have opened it again. the workflow is not bold so he does not determine the fact that i have opened it and it s in the change process. sometimes it makes it bold then it disappears. attaching a screenshot. hitting ok now does not get the changes i wanted.

Image

and this happens to mostly everything in a pipeline or workflow.

enjoyy2 avatar Jul 04 '25 08:07 enjoyy2

The changes to fix this have just been merged, but it will require serious testing. In about an hour or 2 you can fetch the latest build here and start testing. I would really appreciate it if you do

hansva avatar Jul 04 '25 08:07 hansva

@hansva Sorry, I can tell that unfortunately the bug still exists in 2.15. Played around in 2.15 (Windows, OpenJDK 17) with the JavaScript transform, and edited the code-section, transform-name field, and the columns of the output fields (Fieldname, Type) arbitrarily. After a couple of successfully applied changes at some point in time certain changes are lost.

gmitter-ef avatar Oct 03 '25 10:10 gmitter-ef

Just wanted to chime in that I've been encountering this regularly as well, sometimes several times within a few minutes. Is there a known workaround for this at the moment? It can basically cripple my ability to edit a pipeline as I need to check every single time I hit OK to confirm changes are saved and constantly re-do work.

twicepipes avatar Oct 16 '25 23:10 twicepipes

I need a new reproduction path because I can no longe reproduce the original scenario

hansva avatar Oct 17 '25 06:10 hansva

@hansva I had a couple of subsequent losses in changes when editing a write-to-log transform (where I just updated "Transform name" and "Write to log" input fields; the "Fiels" list remained empty). Debug level, and all after a filter-row-step in the "false" branch. Perhaps that can help...

gmitter-ef avatar Oct 27 '25 11:10 gmitter-ef

today it was happening in the "Data grid" again, but was not able to reproduce it systematically.

gmitter-ef avatar Nov 06 '25 11:11 gmitter-ef