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 warning color to DAG in UI #245

Merged
merged 17 commits into from
Jul 28, 2022

Conversation

kenxu95
Copy link
Contributor

@kenxu95 kenxu95 commented Jul 22, 2022

Describe your changes and why you are making these changes

When a warning check fails to pass, we mark the artifact it outputs in a new warning color: orange.

Also, changes the color palette to something with more contrast (cc: @agiron123 as color picker)

Examples below:
I realize these are currently inconsistent as to whether the check operator or the check artifact are highlighted - curious as to what the right colors are in each case. The error check fails the entire workflow, so having the operator be red seems to make sense. I'm thinking I also make the warning operator orange? Or maybe in the future we should squash the check operator and artifact concepts into one. @vsreekanti

image

Related issue number (if any)

ENG-1265

Checklist before requesting a review

  • I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
  • I have performed a self-review of my code.
  • I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
  • If this is a new feature, I have added unit tests and integration tests.
  • I have run the integration tests locally and they are passing.
  • I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
  • All features on the UI continue to work correctly.
  • Added one of the following CI labels:
    • run_integration_test: Runs integration tests
    • skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

@kenxu95 kenxu95 requested review from vsreekanti and agiron123 July 22, 2022 18:48
@vsreekanti
Copy link
Contributor

I think we can/should make the check artifact and the check operator both red, no? Alternately, we can make the check operator green (it executed successfully) and the check artifact red (it was bad). But my guess is that if a check fails, we should make the operator and artifact both red. @jegonzal @agiron123 any thoughts?

@kenxu95
Copy link
Contributor Author

kenxu95 commented Jul 22, 2022

Making both of them red is inconsistent with the way we currently do things - if an operator fails, then the artifact is never written and so stays in a pending state, where they can't see the data. Do we want to try and change this larger pattern? I have no idea how hard that would be.

And I don't know if marking only the artifact as red makes sense, because the operator needs to fail on error-severity checks to mark the entire workflow as failed. It would require some custom logic in the UI just for checks in order to pretend like the check operator passed but the artifact failed.

I feel like marking both the warning check operator and artifact as orange is both the easiest and most consistent (warning is equivalent to success for all intents and purposes, except for the fact that a warning will show on the sidebar).

@vsreekanti
Copy link
Contributor

So if a check returns False the operator fails, the result will not be written?

@kenxu95
Copy link
Contributor Author

kenxu95 commented Jul 22, 2022

Only if the check has ERROR severity, yes. It gets written in the WARNING case.

@vsreekanti
Copy link
Contributor

Sorry, I think I'm being vague. I was asking if the False value would be persisted, not the artifact that the check is attached to.

@kenxu95
Copy link
Contributor Author

kenxu95 commented Jul 22, 2022

By attached to you mean the artifact that is the input of the check operator? I think I was interpreting the question correctly then - but I just checked the code and it looks like we do persist the False in either case.

except AqueductError as e:
assert TIP_OP_EXECUTION in e.message
client.publish_flow("hello", artifacts=[processed_artifact])
# try:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why you are leaving this code commented out?

@agiron123
Copy link
Contributor

I think we can/should make the check artifact and the check operator both red, no? Alternately, we can make the check operator green (it executed successfully) and the check artifact red (it was bad). But my guess is that if a check fails, we should make the operator and artifact both red. @jegonzal @agiron123 any thoughts?

@vsreekanti I think both of them being red makes more sense since the two nodes are related to one another.

@agiron123
Copy link
Contributor

Left a few comments on the code, but should be good to go after you resolve them @kenxu95

Copy link
Contributor

@agiron123 agiron123 left a comment

Choose a reason for hiding this comment

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

Good to go after comments are resolved.

@kenxu95
Copy link
Contributor Author

kenxu95 commented Jul 22, 2022

Ok I just read a bit more of the frontend code and there's quite a bit of entanglement here due to how much we treat checks as a special case through out codebase. For me to implement the best solution I need to know:

  1. What are the principles behind the color coding of failed operators? If we decide to do red-red here, but other non-check operators stay red-gray on failure, is that inconsistency ok? Or should I simply keep it consistent and do red-gray for everything. Or should I try and change everything to red-red.

  2. For warning checks, should I keep it orange-orange, with the principle that orange is really the same as green, except that it comes with a warning message on the sidebar?

  3. When should the user see the value "False" when the select the check artifact? Should they always see it, or only when the check has error severity WARNING. If they always see it, we would once again be inconsistent with how non-check operators work. Currently, when you select a non-check artifact of a failed operator, you get:

image

@vsreekanti
Copy link
Contributor

@kenxu95, let me know if you have any more questions about our conversations on Friday or if you feel like you have enough direction to wrap this up!

@kenxu95
Copy link
Contributor Author

kenxu95 commented Jul 26, 2022

oh sry meant to update this @vsreekanti I think I have enough direction. Chatted with Wei about this today and decided that a lot of this is better implemented on the backend, since the UI logic was getting super confusing. The backend stuff was done today and I'm currently polishing this up.

@kenxu95 kenxu95 force-pushed the eng-1265-add-ability-to-distinguish-between-ui branch from 437acaa to cd83d21 Compare July 26, 2022 05:42
@kenxu95 kenxu95 changed the base branch from main to update_checks_in_orchestration July 26, 2022 05:48
@kenxu95 kenxu95 force-pushed the eng-1265-add-ability-to-distinguish-between-ui branch from d8240b3 to 46b90b9 Compare July 26, 2022 05:58
@kenxu95 kenxu95 force-pushed the update_checks_in_orchestration branch from 34fd8f4 to c6e3b4a Compare July 26, 2022 21:50
@kenxu95 kenxu95 changed the base branch from update_checks_in_orchestration to exec_state_backfill July 27, 2022 00:01
@kenxu95 kenxu95 force-pushed the exec_state_backfill branch from 5da1a85 to 3db4785 Compare July 27, 2022 00:18
@kenxu95 kenxu95 force-pushed the eng-1265-add-ability-to-distinguish-between-ui branch from 46b90b9 to 22a0985 Compare July 27, 2022 00:22
@kenxu95 kenxu95 force-pushed the exec_state_backfill branch from 3db4785 to 51a2084 Compare July 27, 2022 19:37
@kenxu95 kenxu95 force-pushed the eng-1265-add-ability-to-distinguish-between-ui branch from 22a0985 to 5acc2d7 Compare July 27, 2022 21:15
Base automatically changed from exec_state_backfill to update_checks_in_orchestration July 28, 2022 00:17
Base automatically changed from update_checks_in_orchestration to main July 28, 2022 00:30
kenxu95 added 16 commits July 27, 2022 17:31
got all the executation info

built everything except the reads

lint

context siwtch

ready for review

uncomment

fixed enum annoyance

done

fixed unit tests

made change

ready to test and think about some more

look

ready for review

package log

lint

added warning error message and fixed lint

package lock

it works, except warnings need to look like warnigns

warnings works

fix the status bar

hold up

lint and review
@kenxu95 kenxu95 force-pushed the eng-1265-add-ability-to-distinguish-between-ui branch from f756018 to 2a0bb2d Compare July 28, 2022 00:32
@kenxu95 kenxu95 added the run_integration_test Triggers integration tests label Jul 28, 2022
@kenxu95 kenxu95 merged commit ca96bd0 into main Jul 28, 2022
@kenxu95 kenxu95 deleted the eng-1265-add-ability-to-distinguish-between-ui branch July 28, 2022 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run_integration_test Triggers integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants