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

Work Orders getting accidentally duplicated when "rerun from here" is pressed #1596

Closed
taylordowns2000 opened this issue Jan 6, 2024 · 3 comments · Fixed by #1598
Closed
Assignees
Labels
bug Newly identified bug

Comments

@taylordowns2000
Copy link
Member

taylordowns2000 commented Jan 6, 2024

Check out this video: https://www.loom.com/share/0926d3aa804745a7b6614cfe34fcb088

To recap the desired behavior of the inspector view:

  1. When an admin accesses the inspector with a run loaded (as I do in the video) they're most likely debugging and will want to add console.log statements and re-run the work order multiple times from whatever step they're on.
  2. Keep a close eye on the buttons in the bottom right corner... there are two of them. A "primary action button" (which in this video is supposed to "Rerun from here") and a "save" button (which has a helpful red-dot-indicator that will tell us if the job code has been saved).
  3. Pressing Cntrl-S/⌘-S will save the job code.
  4. Pressing Cntrl-Enter/⌘-Enter will press the primary action button. (In this case, that should be to "Rerun from here".)
  5. There is also a "secondary action button" that can be reached via the split-button-select-list or by pressing Cntrl-Shift-Enter but that button is not pressed in this video. The secondary action would create a new work order, rather than only creating a new run for the existing work order.
  6. Try to get a sense for what I'm doing here... I want to rerun this work order lots of times while I'm debugging and modifying the job code... all to try to eventually process this input dataclip (in this case, a Stripe transaction) properly. I'd like to keep running this thing dozens of times after making small adjustments, and eventually see a successful run. When that's done, I'll click back to the history view and see that this work order is in a "success" state, even if there are two dozen runs (previously called attempts) associated with it.

The bug I'm seeing here is three-fold:

  1. In this video it sometimes appears that the job code is not saved when I press/click "Rerun from here". This is not good. We always want to "save and run" the job rather than running it without saving.
  2. In this video we also see that despite always clicking/pressing "Rerun from here" a new work order gets generated a few times. I thought this might be happening when the job code was edited, but it seems to be less predictable than that.
  3. EDIT: After some more digging, it appears that at some point in this video a new (duplicate) dataclip was generated. That shouldn't be happening and feels linked to the duplicate work order.
@taylordowns2000 taylordowns2000 added the bug Newly identified bug label Jan 6, 2024
@taylordowns2000
Copy link
Member Author

@elias-ba , not specifically assigning you here in case someone else wants to pick this up first, but will certainly need your thoughts on the above! (and if you get to this first please do take it up. i'd suggest pairing with another programmer to talk through the current logic as it's fairly complicated and getting another review would be valuable.)

@midigofrank midigofrank self-assigned this Jan 8, 2024
@midigofrank
Copy link
Collaborator

midigofrank commented Jan 8, 2024

@taylordowns2000 I think it's wrong label this as a bug. At the moment, the concept of retying means taking the previous runs input dataclip and retrying with it. When you edit a dataclip, that's essentially a new workorder

EDIT:
I confused dataclip with the job code

@taylordowns2000
Copy link
Member Author

hey @midigofrank , i think this test script here is the best way to think about the intended functionality: #1524 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Newly identified bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants