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

Surface latest sync status for connections. #2405

Merged
merged 6 commits into from
Mar 25, 2021

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented Mar 11, 2021

What

This solves #2332.

TLDR: Right now there is no summary of a connector's health - the status of a connection's last sync - within the webapp. This change surfaces this information so the UI can take advantage of it.

How

  • Add the latestSyncJobStatus field to the WbConnectionRead struct. Take the chance to rename the lastSync field to latestSyncJobCreatedAt to better reflect what the field captures. lastSync was confusing as I expect it to return the Id/object of the last sync and not the last sync's timestamp.
  • We keep the current expectation when setting status - the same job that sets the timestamp field is used to set the status field.
  • We surface the job's status as is. This gives the UI flexibility on displaying the various statuses.

Since the 'latest' sync job is determined by the JobHistoryHandler, I buffed up the job history handler test cases to make sure we do always return the latest sync job.

Some minor refactors as I made changes.

Pre-merge Checklist

  • UI change

Recommended reading order

  1. config.yaml
  2. WebBackendConnectionsHandler.java
  3. various test files

@davinchia davinchia marked this pull request as ready for review March 11, 2021 10:21
Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I would add to the checklist in the description that a UI change needs to happen before we can merge this. Can you create a quick frontend issue with what needs to be done? Basically you just need to link the original issue and describe the mapping of statuses to the colors you mentioned to me yesterday.

@davinchia davinchia merged commit 5ab0883 into master Mar 25, 2021
@davinchia davinchia deleted the davinchia/expose-sync-status branch March 25, 2021 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants