flux-core
flux-core copied to clipboard
flux-jobs: support emoji output formats
Problem: flux lacks a certain cuteness factor. This limits its potential to be liked by younger HPC users.
Solution: Support the {state_emoji}, {result_emoji}, and {status_emoji} fields, which will output the emojis representing job states or results respectively.
Fixes #4681

Note, while this was originally brought up as a joke in a discussion, this isn't actually that un-useful. When listing a bunch of jobs, it may be easier to visually scan for a poop instead of printed text like FAIL. So I selected emojis based on some visual "scan-ability".
Emoji alignment is difficult, but largely ignored it as it's going to be font and terminal specific.
Let the bike-shedding of emoji choices begin!
Take my money now!! :heart_eyes:
Hotline, get ready.
User: Flux gave my job a poop emoji and I don't know why
Hotline: Hmm, your job was canceled so it should be a plucky little bomb. What sort of poop is it?
User: it has a maniacal grin
Hotline: I'm not familiar with that job result. Are you sure it wasn't exploding in some way?
User: not really
Hotline: (consults Flux documentation) Could it have been "Shocked Face with Exploding Head"? How about "Potato"?
I am glad you are not using the thumbs-up emoji. On todays news: Thumbs-up emoji may hurt Gen Z! https://www.foxnews.com/lifestyle/gen-z-says-emoji-passive-aggressive-you-using-it
Sadly, it is difficult to capture jobs stuck in the CLEAN state: https://unicode-table.com/en/1F9FB/
User: my job was stuck in the toilet paper state, then later flux said it was poop
Sadly, it is difficult to capture jobs stuck in the CLEAN state: https://unicode-table.com/en/1F9FB/
User: my job was stuck in the toilet paper state, then later flux said it was poop
Hotline: Please flux it down...
Sadly, it is difficult to capture jobs stuck in the CLEAN state: https://unicode-table.com/en/1F9FB/
User: my job was stuck in the toilet paper state, then later flux said it was poop
🧼 or ✨ or perhaps even ❇️ might work for clean. I suppose 🧹 could too.
I like the ✨ … Mr Clean approved!
Oops, I really mean the "CLEANUP" state, so I think 🧼 or 🧹 seem like pretty good options. I considered 🗑 as well, but felt that was where trash goes, not the act of cleaning up.
These are critically important decisions we're making here. Gonna make sure we get this right!
🫧 or 🧽?
I forgot about the bubbles, for cleanup based on the iOS iconography I like the soap, bubbles or broom best I think. They all look like something in active use for that purpose.
Sent from Workspace ONE Boxerhttps://whatisworkspaceone.com/boxer
On October 13, 2022 at 8:51:30 PM PDT, Vanessasaurus @.***> wrote:
🫧 or 🧽?
— Reply to this email directly, view it on GitHubhttps://urldefense.us/v3/__https://github.com/flux-framework/flux-core/pull/4687*issuecomment-1278444447__;Iw!!G2kpM7uM-TzIFchu!lq-iKCllaFzrGGSUd_gpG7grr1gTKdWbGUrQG3tqeuW7EuvuEJFCdB_J93crWJf-Xw$, or unsubscribehttps://urldefense.us/v3/__https://github.com/notifications/unsubscribe-auth/AAFBFNPEI3ZA66JRA6D5CVLWDDKD3ANCNFSM6AAAAAAREVEJQE__;!!G2kpM7uM-TzIFchu!lq-iKCllaFzrGGSUd_gpG7grr1gTKdWbGUrQG3tqeuW7EuvuEJFCdB_J93f71AcZlw$. You are receiving this because you commented.Message ID: @.***>
ok, we'll go with broom ... mainly b/c the sponge looks like a peanut in some other font sets.
any opinions on
depend - ✋ sched - 📅 priority - 🏎
i think sched is pretty good (i tried clock but didn't like it as much), but depend and priority are meh ...
What about 🚦for priority?
Could do ⏹️ or 🛑 for depend I guess, ⏸️ could also work unless we have a paused state?
I could see ⏸️ > 📅 > ▶️ > 🧹 > ⏹️ as a progression through the states. Has a certain internal consistency to it, though not as visually arresting as some of the options which is unfortunate.
🥇 (first place medal) could be for priority maybe?
The cancelled one likewise could be 🚫, completed and failed I think are ✅ and ❌ in ARC, but I kinda like what you chose, very whimsical.
Oh I really like the orange - it stands out nicely.
What about vertical_traffic_lightfor priority?
Oh I like that for priority, i.e. like "waiting for green" / "waiting to go" .... although I guess that could be for depend too.
@trws ohh pause is a good idea, i like that one for depend.
doh! the pause button displayed poorly in gnome (just two vertical bars). And for some reason, gnome is missing a chunk of emojis at the higher numbers, dunno if it was a more recent unicode addition and gnome just doesn't have in my version (which would be used by a fair amount of staff at the lab). So broom and soap didn't display.
So I went with
new -> wrapped gift (note, should be virtually impossible to ever see) depend -> stop sign (per @trws suggestion above) priority - vertical traffic light (per @lucpeterson suggestion above) cleanup - wastebasket inactive - skull

I've been using this dinky script to test if anyone wants to try on their terminal. flux start ./emoji.sh
(you may need to adjust the number of tasks to get both running & pending jobs on your machine)
#!/bin/sh
flux mini run /bin/true
flux mini run /bin/false
flux mini run -t=1s sleep 10
id=`flux mini submit sleep 30`
sleep 1
flux job cancel $id
flux mini submit -n 12 sleep 60
flux mini submit -n 12 sleep 60
flux mini submit -n 12 sleep 60
flux mini submit -n 12 sleep 60
flux jobs -a --format="{id:>12} {status:<10} {state_emoji:<5} {result_emoji:<6} {status_emoji:<6} {nodelist}"
(you may need to adjust the number of tasks to get both running & pending jobs on your machine)
flux jobs --from-stdin can take a list of entries on stdin so you don't have to jump through hoops to get a set of jobs in desired states or fields. This kind of testing is exactly why that option was added.
Also, I'll just mention that flux mini submit --cc=1-4 -n 12 sleep 60 is 4x faster than the serialized calls to flux mini submit in the example script.
flux jobs --from-stdin can take a list of entries on stdin so you don't have to jump through hoops to get a set of jobs in desired states or fields. This kind of testing is exactly why that option was added.
Oh yeah, i totally forgot!
For the life of me I cannot get the wastebasket to align, i think its width is different than the rest:

#!/bin/sh
flux jobs -a --format="{id:>12} {status:<10} {state_emoji:<6} {result_emoji:<6} {status_emoji:<6} {nodelist}" --from-stdin < emojitest.txt
Yeah... It might well be, or its string width might be while its display width is the same. We would probably need ICU or similar to work it out right, which we actually have already through one of our other vendored dependencies but it's not a trivial amount of work.
Al Chu @.***> writes:
For the life of me I cannot get the wastebasket to align, i think its width is different than the rest:
image
#!/bin/sh flux jobs -a --format="{id:>12} {status:<10} {state_emoji:<6} {result_emoji:<6} {status_emoji:<6} {nodelist}" --from-stdin < emojitest.txt
emojitest.txt
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Idea: add flux jobs -o cute support (a named format). I'm guessing there may be a user demographic that prefers emojis but eschews reading man pages? (It might include me)
Idea: add flux jobs -o cute support (a named format). I'm guessing there may be a user demographic that prefers emojis but eschews reading man pages? (It might include me)
I like it! I could be the default output but with {status_emoji} instead of {status_abbrev}
re-pushed, adding --format=cute per @garlick suggestion

Should the heading be just ST or maybe itself an emoji?
Should the heading be just ST or maybe itself an emoji?
I did "STATUS" b/c the abbreviated headings were a little narrow for potentially wide emojis.
hmmm, an emoji as a header may solve alignment. Nothing comes to mind on the emoji list, could just do a ❓
I don't think this would hurt to merge as is since it's not a default output format and discussion has tailed off - if you're ready that is. Looks like there's at least a conflict to fix up
I don't think this would hurt to merge as is since it's not a default output format and discussion has tailed off - if you're ready that is. Looks like there's at least a conflict to fix up
Yup, I'm good with it, lemme fix up that conflict.
re-pushed fixing up conflict and a python isort issue that is now discovered
Codecov Report
Merging #4687 (f47fc0e) into master (b884d04) will decrease coverage by
0.89%. The diff coverage is81.03%.
:exclamation: Current head f47fc0e differs from pull request most recent head c3c8d9c. Consider uploading reports for the commit c3c8d9c to get more accurate results
@@ Coverage Diff @@
## master #4687 +/- ##
==========================================
- Coverage 84.24% 83.35% -0.90%
==========================================
Files 410 413 +3
Lines 61515 69664 +8149
==========================================
+ Hits 51826 58069 +6243
- Misses 9689 11595 +1906
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/cmd/flux-jobs.py | 95.52% <ø> (ø) |
|
| src/bindings/python/flux/job/info.py | 87.78% <81.03%> (-1.55%) |
:arrow_down: |
| src/cmd/top/ucache.c | 86.66% <0.00%> (-13.34%) |
:arrow_down: |
| src/modules/job-info/allow.c | 76.66% <0.00%> (-12.70%) |
:arrow_down: |
| src/common/libzmqutil/monitor.c | 80.00% <0.00%> (-11.03%) |
:arrow_down: |
| src/shell/builtins.c | 91.66% <0.00%> (-8.34%) |
:arrow_down: |
| src/shell/kill.c | 92.30% <0.00%> (-7.70%) |
:arrow_down: |
| src/common/libutil/timestamp.c | 92.85% <0.00%> (-7.15%) |
:arrow_down: |
| src/modules/resource/acquire.c | 65.04% <0.00%> (-7.05%) |
:arrow_down: |
| src/cmd/builtin/dmesg.c | 87.58% <0.00%> (-6.86%) |
:arrow_down: |
| ... and 331 more |