-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pause and Resume #549
Pause and Resume #549
Conversation
Hello ognyan-kostadinov,My role is to assist you with the merge of this Status report is not available. |
Codecov Report
@@ Coverage Diff @@
## development/1.6 #549 +/- ##
===================================================
+ Coverage 51.94% 52.80% +0.86%
===================================================
Files 193 196 +3
Lines 9239 9307 +68
Branches 2559 2574 +15
===================================================
+ Hits 4799 4915 +116
+ Misses 4419 4371 -48
Partials 21 21
... and 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
src/react/actions/zenko.ts
Outdated
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'm not sure any modification is necessary in this file.
const { | ||
data: instanceStatus, | ||
status, | ||
isFetching, | ||
} = useQuery({ | ||
queryKey: ['instanceStatus', instanceId], | ||
queryFn: () => { | ||
return managementClient.getLatestInstanceStatus( | ||
instanceId, | ||
) as InstanceStatus; | ||
}, | ||
onError: (error) => { | ||
dispatch(handleClientError(error)); | ||
}, | ||
refetchOnMount: false, | ||
refetchOnWindowFocus: 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.
As this instanceStatus query is only used by PauseAndResume component, I would suggest to move it there, similarly as for the invalidation logic
dispatch(networkStart('Pausing Replication workflow')); | ||
pauseReplicationSiteMutation.mutate(locationName); |
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.
IMO, this dispatch network start shall be handled by the mutation
dispatch(networkStart('Pausing Async Metadata updates')); | ||
pauseIngestionSiteMutation.mutate(locationName); |
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.
IMO, this dispatch network start shall be handled by the mutation
const invalidateInstanceStatusQueryCache = async () => { | ||
await queryClient.invalidateQueries(['instanceStatus', instanceId]); | ||
await queryClient.refetchQueries(['instanceStatus', instanceId]); | ||
dispatch(networkEnd()); |
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 should also be called for the pause and resume mutation in case of failures
processed only once the Workflow processes are resumed.Name of | ||
the bucket/container created in the specific location (e.g. | ||
RING, Azure, AWS S3, GCP...), and where buckets attached to that | ||
location will store data. |
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.
processed only once the Workflow processes are resumed.Name of | |
the bucket/container created in the specific location (e.g. | |
RING, Azure, AWS S3, GCP...), and where buckets attached to that | |
location will store data. | |
processed only once the Workflow processes are resumed. |
await queryClient.invalidateQueries(['instanceStatus', instanceId]); | ||
await queryClient.refetchQueries(['instanceStatus', instanceId]); |
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.
Why do we need both ? I assume await queryClient.refetchQueries(['instanceStatus', instanceId]);
should be enough here.
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.
In addition once the query would be extracted we could retrieve the query id from the extracted query directly
} = useQuery({ | ||
queryKey: ['instanceStatus', instanceId], | ||
queryFn: () => { | ||
return managementClient?.getLatestInstanceStatus( | ||
instanceId, | ||
) as InstanceStatus; | ||
}, | ||
onError: (error) => { | ||
dispatch(handleClientError(error)); | ||
}, | ||
refetchOnMount: false, | ||
refetchOnWindowFocus: 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.
I would extract this query into a queries object similarly as we do for other features. That will enable simpler reuse of the queries later on
await waitForElementToBeRemoved(() => screen.queryByTestId('loader'), { | ||
timeout: 8000, | ||
}); |
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.
Can we use below option instead?
await waitForElementToBeRemoved(() => screen.queryByTestId('loader'), { | |
timeout: 8000, | |
}); | |
await waitForElementToBeRemoved(() => screen.queryByText('Loading'), { | |
timeout: 8000, | |
}); |
/approve |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the The following options are set: approve |
/status |
StatusStatus report is not available. The following options are set: approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue ZKUI-313. Goodbye ognyan-kostadinov. |
No description provided.