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

✨ Add handling for tasks "Succeeded with errors" in task and application tables #2011

Merged
merged 8 commits into from
Jul 16, 2024

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Jul 12, 2024

Summary

Resolves: #1997

When a task is succeeded but has attached errors, render task state, application tasks state and application analysis state with a warning.

Details of Changes

With this change, hub is not adding a new terminal state, but having a new terminal state is an easy way to handle things. The task queries will now evaluate the state and errors props to determine if "Succeeded" should be "SucceededWithErrors". This synthetic task status makes updating all of the UI component much simpler.

To function properly, HUB Issue 725 / PR 720 are required.

Changes have also been made to utilize the /tasks/reports/dashboard endpoint to get a much smaller view of tasks when dealing with them in aggregate.

The application details drawer was refactored to push data fetching closer to actual use, and to break up a very large component into a container component with a component dedicated to each tab.

Screenshots

Application inventory page:
screenshot-localhost_9000-2024 07 15-18_33_20

Application tasks popover:
image

Task Manager page:
screenshot-localhost_9000-2024 07 15-18_35_15

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 31.03448% with 20 lines in your changes missing coverage. Please review.

Project coverage is 42.11%. Comparing base (b654645) to head (d061d53).
Report is 193 commits behind head on main.

Files Patch % Lines
client/src/app/queries/tasks.ts 20.00% 16 Missing ⚠️
client/src/app/api/rest.ts 33.33% 2 Missing ⚠️
client/src/app/components/Icons/TaskStateIcon.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2011      +/-   ##
==========================================
+ Coverage   39.20%   42.11%   +2.90%     
==========================================
  Files         146      171      +25     
  Lines        4857     5488     +631     
  Branches     1164     1311     +147     
==========================================
+ Hits         1904     2311     +407     
- Misses       2939     3161     +222     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.11% <31.03%> (+2.90%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@rszwajko rszwajko left a comment

Choose a reason for hiding this comment

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

The approach looks OK !

client/src/app/queries/tasks.ts Outdated Show resolved Hide resolved
client/src/app/queries/tasks.ts Outdated Show resolved Hide resolved
@sjd78 sjd78 changed the title ✨ [WIP] Add a task and analysis status of "Succeeded with errors" ✨ [WIP] Add handling for tasks "Succeeded with errors" in task and application tables Jul 15, 2024
@sjd78 sjd78 force-pushed the success_with_error branch 2 times, most recently from bae5883 to 0f04a08 Compare July 15, 2024 22:36
@sjd78 sjd78 marked this pull request as ready for review July 15, 2024 22:37
@sjd78 sjd78 requested a review from ibolton336 as a code owner July 15, 2024 22:37
@sjd78 sjd78 changed the title ✨ [WIP] Add handling for tasks "Succeeded with errors" in task and application tables ✨ Add handling for tasks "Succeeded with errors" in task and application tables Jul 15, 2024
Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
Also refactor some components to:
  - push data access closer to where it is used
  - break into smaller manageable components

Signed-off-by: Scott J Dickerson <[email protected]>
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.

Handle task and application tasks status of "task succeeded but has errors"
3 participants