-
Notifications
You must be signed in to change notification settings - Fork 713
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
Scheduled syncing updates #10748
Scheduled syncing updates #10748
Conversation
Allow editing and deleting of scheduled syncs.
Build Artifacts
|
const activeSyncTasks = this.facilityTasks.filter( | ||
t => | ||
isSyncTask(t) && | ||
((t.repeat !== null && !t.clearable) || |
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.
None blocking comment: I am wondering if we could introduce intermediate variables with descriptive names to improve code readability. Something like
const isSync = isSyncTask(task);
const isRepeatableNonClearable = task.repeat !== null && !task.clearable;
So that instead of using a complex logical expression, the return statement in the filter()
method utilizes the intermediate variable
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.
Yes, I think this functional style can be a bit hard to read and intermediary variables can help. I mostly didn't do that because it was like that when I got here! I'll leave for now, but I think worth thinking about when we do further reworking of the frontend task handling (which I have some overall ideas on how we can migrate to a dedicated composable).
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.
I am wondering why whenever I try to edit task scheduled for an hour it become inactive?
Uploading Screen Recording 2023-05-25 at 15.19.00.mov…
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 is because the tasks scheduled on the hour immediately sync - and because of backend complexities, we can't edit currently running tasks. I think this could probably use some user experience improvements, but also wasn't quite sure the best way to manage it without string updates too.
@@ -90,6 +99,13 @@ | |||
} | |||
}); | |||
}, | |||
cancel() { | |||
if (this.alreadyRegistered && this.successOnAlreadyRegistered) { |
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.
If a facility tries to re-register to a project they are already registered to, should there be a check to see if it is already registered with the project before submission, which would change this data prop alreadyRegistered
to true? Or is this line only meant to catch the error if the facility is found to already be registered?
I'm asking because the parts where alreadyRegistered
is used in the template are never really shown and could be removed. I manipulated the data in Vue.js devtools to see this view.
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 is only meant to catch the case where there is an error with registration due to the facility already being registered to KDP.
In the case where we are directly doing a registration action by using the Register
option from the dot menu, this emits a 'cancel' event. In the case that I am using it here, I wanted it to instead emit a success event in this case, as it is fine to carry on and try to sync to KDP because it is already registered, so this logic is intended to be handling that.
Hi @rtibbles here are some minor issues I was able to identify while testing the scheduled syncing:
KDP.Sync.mp4
|
Going to dismiss this for now until we get QA sign off!
Thanks Peter - I think issue 1 is an existing issue, so let's file that as a follow up. For issue 2, I'll hide the connection status for KDP, and we can update that when we have better connection tracking for KDP once #10431 is resolved. For issue 3, I'll tweak to make this less weird. |
@rtibbles I confirm that 2 and 3 are fixed now and have filed a follow-up issue for 1 here: #10759 I also noticed that if I lose my internet connection or I stop the server for a facility for which I have scheduled a sync, the line in the table completely disappears instead of seeing the 'Not connected' status: 2023-05-31_14-30-15.mp4A somewhat similar issue can be observed at Facility > Data > Manage sync schedule where after editing the schedule the entry disappears: 2023-05-31_16-29-18.mp4 |
Thanks @pcenov - that's a good catch, I'll update to fix this. |
Hi @rtibbles, I confirm that now if I stop the server of a facility for which I have a scheduled sync that is reflected correctly in the status which changes first to 'Not connected' and then back to 'Connected' once I've restarted the server. However if I turn off my wi-fi and then turn it on, the status remains 'Not connected' until I manually restart the server. 2023-06-02_17-54-09.mp4Also this issue is still not fixed: "A somewhat similar issue can be observed at Facility > Data > Manage sync schedule where after editing the schedule the entry disappears:" 2023-05-31_16-29-18.mp4Lastly, one new very minor issue which we've missed so far - the 'Frequency' drop-down is incorrectly labeled 'Frequence' I can of course file those as separate issues if you wish. |
This will need to be a separate issue, as we don't have the string to update this, I believe. |
I think this should be filed as a follow up issue too - seems to be an issue with the connection status being properly updated when the network adapter state changes, so this is rather outside the remit of this PR! |
I had foolishly assumed that the previous issue that I fixed and this issue had the same root cause, I'll investigate further now. |
@pcenov this issue:
Was actually an issue with any navigation back from the sync edit page or the listing of all syncs page. Now all navigation actions should be working including:
|
Thanks @rtibbles for further investigating and fixing it properly. No new issues observed while regression testing today, LGTM! |
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.
Manual QA passed, good to go! 👏🏽 💯
Summary
References
Fixes #10490
Reviewer guidance
Schedule, edit, and delete scheduled syncs using the UI in both the Device plugin and the Facilities plugin.
Screencast.from.05-24-2023.05.12.25.PM.webm
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)