Fix interactive comand result fetching (infra)#1734
Merged
Hook25 merged 13 commits intofix_clear_old_sessionsfrom Feb 19, 2025
Merged
Fix interactive comand result fetching (infra)#1734Hook25 merged 13 commits intofix_clear_old_sessionsfrom
Hook25 merged 13 commits intofix_clear_old_sessionsfrom
Conversation
3b48ee2 to
a361693
Compare
ada26e8 to
d664243
Compare
pieqq
approved these changes
Feb 19, 2025
Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
fernando79513
pushed a commit
that referenced
this pull request
Feb 19, 2025
* Fix top level args parsing in checkbox local Minor: this fixes them all, including the debug level * Minor: remove validator as it is wrong last_job_start_time is mostly None as whenever a job finishes it will be none * Test the fixed clear-old-sessions message Minor: also fix metabox as cmd was overwritten when a manifest was provided * Fix the crash in remote as well * Fix and add new unittest * Test also args * Also test the utils function * Python3.5 :( * Forgotten tool to corrupt sessions * Implement feedback * python3.5 :( * Fix interactive comand result fetching (infra) (#1734) * Result fetching for run_cmd * Give the result half a second to materialize * Add result to the ExecuteResult * Preserve all fields on check * Wrong check called * Check is not a property * Trace metabox output * Rollback the binary load to test, make result array * Set the cmd to none in non-interactive for now * Revert trace logging * Purge debug files * Remove pointless append * Use reference in the url comment Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com> --------- Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com> --------- Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Currently interactive commands don't have a result. This is an issue as any interactive command may fail (As those ran with RunCmd), and we don't catch the result at all. This PR fixes this issue by fetching the result from the api via a daemon. The solution is similar to the one used by pylxd for the non-interactive run command linked in the file, but here we use a Thread as we want to be able to interact with the underlying process while it is running.
Resolved issues
Fixes: CHECKBOX-1754
Documentation
Relevant hakcery links back to the original source and provides the reason it is done
Tests
Ran the new metabox first with the bug I was trying to debug: https://github.com/canonical/checkbox/actions/runs/13373883151/job/37348527458#step:7:8417
then after discovering the reason and fixing it: https://github.com/canonical/checkbox/actions/runs/13374110350