-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix updating task states, preventing state="" replacing existing state #586
Conversation
This should be fixed now. The test failures are fixed in #584 |
Just tested, the unknown task status is gone, but now the held indicator doesn't show up. |
Hmmm. @hjoliver what happens if you hold a task, and then expand it in the tree? |
Then it shows up! |
e1e90a9
to
5fc43ba
Compare
Rebased 🤞 |
Codecov Report
@@ Coverage Diff @@
## master #586 +/- ##
==========================================
- Coverage 81.66% 81.59% -0.08%
==========================================
Files 66 66
Lines 1320 1320
Branches 81 81
==========================================
- Hits 1078 1077 -1
- Misses 223 224 +1
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
From @kinow on Element chat:
|
5fc43ba
to
635a2c6
Compare
Rebased |
@hjoliver I was adding the ID to the element key, so I could more easily manipulate/find it in vue-dev-tools or programmatically while debugging the issue. But adding But if that fixes the issue for now, at least we can fix this issue and open another one for follow-up. |
To test, I have Chromium and Firefox open, in two monitors. With In Firefox I hold a task, then confirm Chromium and Firefox updated the component. Then do the same with Chromium, confirming in Firefox. Some times I hold a task, some times release. Removing and killing appears to work fine too. |
Hmmm, isHeld still isn't reactive for me (updated branch, re-install, re-build, hard refresh). Tried with Firefox and Chrome. |
I think I found the issue. Appears to be because When that happens, the JS object added to the But since there's no observer for Posted a question to the Element chat room to see if |
@hjoliver whenever you have time, could you please take another look and confirm if that fixes the issue for you? The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a logical change to me though I've encountered the issue it's fixing myself. Hopefully Hillary can confirm it fixes the reported issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# value for isHeld, and then it is stripped. When stripNull: false is used, | ||
# we will actually get the default value from Protobuf (in the case of | ||
# isHeld, we will get isHeld: false, which is what we want for the UI). | ||
added (stripNull: false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}) | ||
cylcTree.updateTaskProxy(updateTaskProxy) | ||
expect(cylcTree.root.children[0].children[0].children[0].node.state).to.equal(TaskState.RUNNING.name) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in #530
delete taskProxy.state | ||
const taskProxyNode = createTaskProxyNode(taskProxy) | ||
expect(taskProxyNode.node.state).to.equal('') | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in #530
Confirmed it has been added to #530, with the only difference being that we did not need the Calling mutations with the aotf form, then the state is updated correctly in the UI in ~1 second. Without the need of changing the expand/collapse state of the component. |
This is a small change with no associated Issue.
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.