Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feature - Add failed task #1195
base: main
Are you sure you want to change the base?
Feature - Add failed task #1195
Changes from 7 commits
a8d8b42
6d1b3de
c0a7489
b88b3fe
e724537
c5eeeb9
120dc70
506c0a3
b3dba12
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 rather see a public setter on this, the current setup with
StopTaskWithFailure
implies the task always stops as soon as it's failed which I don't think is a reasonable assumption to make.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 don't think so. You named it right
Completed with errors
in the comment below and I think it's not related toFailed
status. I think what you need is methods likeAddError
,GetErrors
so then you can get occurred errors.I wouldn't mix
Failed
andCompleted
statuses in any way because from my point of viewFailed
task cannot continue working. If some error occurred and task can continue working then I wouldn't call itFailed
.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.
But that feels like adding business-logic into a visual component whose goal it is to represents a process. I just want to visualize "The process encountered an error" and whether that stopped the process, or the process is still going is not related to the visual "error state".
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.
For me it's just unintuitive to see failed job still going.
@patriksvensson Any chance to review this feature and join the discussion?
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.
Imagine a CI/CD pipeline, you might have configured it so that even if a test fails, it still publishes the build artifacts. So then the process is in an error state, while still continuing.
In my case the progress bar represents a deployment where a system is deploying 10 different resources, one might fail, but that doesn't stop the deployment from deploying the other nine. (You could argue this is odd behavior, but the behavior is outside of my control, I simply schedule the deployment and monitor its progress).
I would also argue it's more in line with the current design, there are no restrictions on changing the
Value
,MaxValue
orIsIndeterminate
properties, what benefit is gained from restricting the Failed/Error state?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.
Your general example really looks odd for me. But for your particular case, I have something similar actually.

So What I did - I created multiple
ProgressTask
that show the state of each individual task. Since we don't have any option to indicate that error occurred, I made custom widget that shows text state.After the whole process is over it displays all errors that happened during it.
Back to the topic, my main idea is that
Failed
status !=Something bad happened during the process but process still goes on
.I agree, it'd be good to have something that indicates that something happened but I think it should be different status, not
Failed
. For your specific case, I'd suggest to separate deployments into independent tasks.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 a UI widget why enforce this limitation? If you want to, you can set Failed = true, and then stop the task, and you have what you want, a failed task that is no longer running.
In my case, I'd like to just say Failed = true and let it run until the underlying task is actually completed indicating that while this is still in progress, it encountered an issue. What's so wrong with having the option to do that?
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'd like to see support for "Completed with errors", something can have run to completion while still encountering errors.