Conversation
…f arg in reserve sub-command
…ed unit tests with proper mocking for all new features
…ent handling, synchronized with the fix-reserve branch
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #988 +/- ##
==========================================
- Coverage 75.48% 74.78% -0.70%
==========================================
Files 112 111 -1
Lines 11082 10664 -418
Branches 941 908 -33
==========================================
- Hits 8365 7975 -390
+ Misses 2505 2489 -16
+ Partials 212 200 -12
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
ajzobro
left a comment
There was a problem hiding this comment.
Updates to copyrights.
Co-authored-by: Andy Zobro <241730435+ajzobro@users.noreply.github.com>
rene-oromtz
left a comment
There was a problem hiding this comment.
Thanks for this addition! This should help clear out the Waiting for Output message. Just added some comments but overall looks good and you already tested in the demo
…pdates to regenerate the graphic e.g.: make vhs && make html && make serve
|
converting to draft while I work out a bug I found in my efforts to make a nice example picture (gif) |
…havior with respect to printing duplicate status lines, when to print previous status duration information
…me to see the demo; The demo is still made the same way, just uses the other output
complete -F _ksi_completions edit-in-kitty complete -F _minimal asciinema complete -F _longopt head complete -F _service /etc/init.d/rsync complete -F _service /etc/init.d/cryptdisks-early complete -F _longopt uniq complete -F _command else complete -F _ksi_completions clone-in-kitty complete -F _service /etc/init.d/ipmievd complete -F _longopt mkfifo complete -F _longopt tee complete -F _service /etc/init.d/x11-common complete -F _longopt grep complete -F _filedir_xspec vi complete -F _longopt objdump complete -F _longopt sha1sum complete -F _longopt cut complete -F _service /etc/init.d/plymouth complete -F _command nohup complete -F _service /etc/init.d/ipmiutil_wdt complete -a unalias complete -u groups complete -F _longopt texindex complete -F _known_hosts telnet complete -F _command vsound complete -F _service /etc/init.d/cups complete -c which complete -F _longopt m4 complete -F _service /etc/init.d/pcscd complete -F _longopt cp complete -F _longopt base64 complete -F _longopt strip complete -o bashdefault -o default -o nospace -F __git_wrap__gitk_main gitk complete -v readonly complete -o nospace -F _cd cd complete -F _known_hosts showmount complete -F _longopt tac complete -F _known_hosts fping complete -F _longopt env complete -c type complete -F _known_hosts ssh-installkeys complete -F _longopt expand complete -o bashdefault -o default -o nospace -F __git_wrap__git_main git complete -F _longopt ln complete -F _command aoss complete -o default -o nospace -F _virtualenvs showvirtualenv complete -F _service /etc/init.d/kerneloops complete -F _service /etc/init.d/alsa-utils complete -F _service /etc/init.d/ufw complete -F _longopt ld complete -F _service /etc/init.d/apparmor complete -F _fancygit fancygit complete -F _longopt enscript complete -F _command xargs complete -j -P '"%' -S '"' jobs complete -F _service service complete -F _longopt tail complete -F _longopt unexpand complete -F _longopt netstat complete -o nospace -S '/' -F _cdsitepackages_complete cdsitepackages complete -F _longopt ls complete -o nospace -F _cd pushd complete -v unset complete -F _service /etc/init.d/ipmi_port complete -o default -o nospace -F _virtualenvs rmvirtualenv complete -F _longopt csplit complete -F _known_hosts rsh complete -F _command exec complete -F _longopt sum complete -F _longopt nm complete -F _longopt nl complete -F _user_at_host ytalk complete -F _ksi_completions kitty complete -u sux complete -F _longopt paste complete -F _service /etc/init.d/grub-common complete -F _longopt dir complete -F _longopt a2ps complete -F _root_command really complete -F _service /etc/init.d/anacron complete -F _known_hosts dig complete -F _user_at_host talk complete -F _service /etc/init.d/keyboard-setup.sh complete -F _longopt df complete -F _command eval complete -F _longopt chroot complete -F _command do complete -F _service /etc/init.d/dbus complete -F _service /etc/init.d/saned complete -F _longopt du complete -F _longopt wc complete -F _service /etc/init.d/openipmi complete -A shopt shopt complete -F _known_hosts ftp complete -F _longopt uname complete -o default -o nospace -F _virtualenvs workon complete -F _known_hosts rlogin complete -F _longopt sha384sum complete -F _longopt rm complete -F _service /etc/init.d/cryptdisks complete -F _root_command gksudo complete -F _command nice complete -F _longopt tr complete -F _longopt sha256sum complete -F _root_command gksu complete -F _service /etc/init.d/unattended-upgrades complete -F _longopt ptx complete -F _known_hosts traceroute complete -j -P '"%' -S '"' fg complete -F _longopt who complete -F _longopt less complete -F _longopt mknod complete -F _command padsp complete -F _service /etc/init.d/console-setup.sh complete -F _longopt bison complete -F _service /etc/init.d/sssd complete -F _longopt od complete -F _service /etc/init.d/rpcbind complete -F _service /etc/init.d/kmod complete -F _service /etc/init.d/gdm3 complete -F _service /etc/init.d/ipmiutil_evt complete -F _completion_loader -D complete -F _longopt split complete -F _ksi_completions kitten complete -F _longopt fold complete -F _known_hosts mtr complete -F _user_at_host finger complete -F _service /etc/init.d/apport complete -F _root_command kdesudo complete -u w complete -o default -F __start_vhs vhs complete -F _longopt irb complete -F _command tsocks complete -F _minimal c complete -F _longopt diff complete -F _service /etc/init.d/openvpn complete -F _service /etc/init.d/whoopsie complete -F _longopt shar complete -F _longopt vdir complete -F _service /etc/init.d/plymouth-log complete -j -P '"%' -S '"' disown complete -F _longopt bash complete -F _service /etc/init.d/procps complete -F _longopt md5sum complete -A stopped -P '"%' -S '"' bg complete -F _longopt objcopy complete -F _longopt bc complete -F _service /etc/init.d/sysstat complete -b builtin complete -F _longopt shasum complete -F _command ltrace complete -F _service /etc/init.d/ssh complete -F _known_hosts traceroute6 complete -F _longopt date complete -F _longopt cat complete -F _longopt readelf complete -F _longopt awk complete -F _longopt sha512sum complete -F _longopt seq complete -F _longopt mkdir complete -F _longopt sha224sum complete -F _service /etc/init.d/speech-dispatcher complete -A helptopic help complete -F _minimal '' complete -A setopt set complete -F _longopt sort complete -F _longopt pr complete -F _longopt colordiff complete -F _longopt fmt complete -F _service /etc/init.d/bluetooth complete -F _longopt sed complete -F _service /etc/init.d/spice-vdagent complete -F _longopt gperf complete -F _command time complete -F _root_command fakeroot complete -u slay complete -F _longopt grub complete -F _service /etc/init.d/cron complete -F _longopt rmdir complete -F _service /etc/init.d/uuidd complete -o nospace -S '/' -F _cdvirtualenv_complete cdvirtualenv complete -F _service /etc/init.d/ipmiutil_asy complete -F _longopt units complete -F _longopt touch complete -F _longopt ldd complete -F _command then complete -F _command command complete -o default -o nospace -F _virtualenvs cpvirtualenv complete -F _known_hosts fping6 in cli and tests
…e of the word 'completed with' from 'complete with'
|
@tang-mm @rene-oromtz ready for another review. |
rene-oromtz
left a comment
There was a problem hiding this comment.
Thanks for the changes! Overall this looks good and seems you have been also testing this extensively (nice touch with the video btw!).
I added only a few comments and one consideration regarding "complete" vs "completed". While we should be removing what it seems now unused completed state I will prefer we move that discussion/changes to its own Jira card. There are a lot of occurrences of completed and while most are harmless at least one of them will break the queue-status action.
ajzobro
left a comment
There was a problem hiding this comment.
Couple changes requested
Co-authored-by: Andy Zobro <241730435+ajzobro@users.noreply.github.com>
rene-oromtz
left a comment
There was a problem hiding this comment.
Thanks for the changes, LGTM
tang-mm
left a comment
There was a problem hiding this comment.
Thanks for considering all the feedback! This is a great addition to have. Excited to see it go live 🚀
Description
In the testflinger CLI there are several cases where the user may watch live output: the
submit --poll,poll, andreservesub-commands (fix in #983, this builds upon that PR) all poll the live logs from the agent running the job.Without affecting how piped or redirected output is displayed, this PR adds a
StatusLinefor the display of ephemeral information and timers rather than printing "Waiting for output" and other periodic messages to the stream.When run in an interactive TTY, the CLI will provide a StatusLine to show a timer (count up, or in the case of the reserve state, count down) which displays the state of the job.
Resolved issues
Resolves https://warthogs.atlassian.net/browse/CERTTF-838 (#930)
Documentation
Web service API changes
N/A
Tests
Many new unit tests were added and a repeated testing was done on console to ensure that this worked in both interactive environements, e.g.:
uv run testflinger --server http://testflinger-staging.canonical.com submit --poll ../staging_interactive.yamlAs well as non-interactive environments, e.g.:
uv run testflinger --server http://testflinger-staging.canonical.com submit --poll ../staging_interactive.yaml | teeor
uv run testflinger --server http://testflinger-staging.canonical.com submit --poll ../staging_interactive.yaml > /tmp/foo