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

Simplify messaging for sync canceled jobs #20999

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

edmundito
Copy link
Contributor

What

Resolves #19630

Updates information when a Sync is canceled:

  • Hide displaying failure reason
  • Hide stats below "Sync Cancelled message"
  • Show canceled icon on the attempt where the sync was canceled
  • Updates the attempt count from red to grey

https://www.loom.com/share/26bdb2489be34416aa56e33709ed5a6c

How

Adds more checks. For attempts, it checks if the failure type was a manual cancelation

Misc:

  • Clean up some imports and exports
  • Fix a graphical glitch when the log is expanded, causing the status item to resize by 1px. This was due to a missing border in the collapsed state.

Recommended reading order

From top to bottom

* Hide stats
* Show cancelled icon when it's multiple attempts
* Update attempts count to gray
* Extract shared attempt functions into utils file
* Cleanup component export and scss imports
* Fix height glitch when opening and closing log
@edmundito edmundito requested a review from krishnaglick January 3, 2023 23:50
@edmundito edmundito requested a review from a team as a code owner January 3, 2023 23:50
@octavia-squidington-iv octavia-squidington-iv added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Jan 3, 2023
Copy link
Contributor

@teallarson teallarson left a comment

Choose a reason for hiding this comment

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

Nothing blocking, but had a few questions/comments.

@@ -44,16 +44,18 @@
.attemptCount {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we could use the <Text/> component in place of the div wrapping this text to remove the explicit font sizes.

}
}

border-bottom: variables.$border-thin solid transparent !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity -- is this due to <Row /> having its own border: none; rule in the styled component and it was also broken before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tealjulia Yep that's the reason.

};

const AttemptDetails: React.FC<AttemptDetailsProps> = ({ attempt, className, hasMultipleAttempts }) => {
export const AttemptDetails: React.FC<AttemptDetailsProps> = ({ attempt, className, hasMultipleAttempts }) => {
const { formatMessage } = useIntl();

if (attempt.status !== AttemptStatus.succeeded && attempt.status !== AttemptStatus.failed) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to these changes... but I'm curious why we don't just check if attempt.status === AttemptStatus.running here. It doesn't look like it's ever null/undefined from the types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just needs to be cleaned up because of changes that were made to get rid of the Status enum which was tracking too many statuses:
https://github.com/airbytehq/airbyte/pull/19599/files#diff-9438e96560c48e89bef8ea05895b60ab0cc824a87ae8408196d4de80a12b4f4aL24

Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

LGTM pending Teal's ✅

@teallarson teallarson self-requested a review January 6, 2023 19:36
@edmundito edmundito merged commit 7a80e17 into master Jan 9, 2023
@edmundito edmundito deleted the edmundito/less-cancelled-failure-msg branch January 9, 2023 16:18
@cgardens
Copy link
Contributor

nice! looks great.

jbfbell pushed a commit that referenced this pull request Jan 13, 2023
* Hide stats
* Show cancelled icon when it's multiple attempts
* Update attempts count to gray
* Extract shared attempt functions into utils file
* Cleanup component export and scss imports
* Fix height glitch when opening and closing log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cancellation should not be red
5 participants