Repository navigation
[Test] Read stored lifecycle hooks without the sqlite3 CLI - #11375
Merged
Merged
Conversation
The lifecycle hook smoke tests inspected ~/.sky/skylet_config.db by running the `sqlite3` CLI on the cluster, which is not installed on every cloud's default image (e.g. Nebius), so those steps failed with exit 100 there. Read the DB with Python's built-in sqlite3 module from the SkyPilot runtime env instead, via a shared constant. The queried key and the grep assertions are unchanged. Also fix pre-existing pylint warnings in the file (long lines, an unused variable, a double-quoted string). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
FILE_PATTERN=test_lifecycle_hooks.py /smoke-test -k "test_hook_lifecycle_combined or test_hook_clear_via_relaunch" --nebius |
kevinmingtarja
approved these changes
Nov 16, 2026
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.
Summary
Several lifecycle hook smoke tests (
test_hook_lifecycle_combined,test_hook_clear_via_relaunch,test_hook_sky_exec_does_not_clear_stored_hooks,test_hook_relaunch_propagates_after_stop,test_hook_relaunch_preserves_autostop) inspect~/.sky/skylet_config.dbby running thesqlite3CLI on the cluster viasky exec. That binary is not present on every cloud's default image (the Nebius default image,ubuntu24.04-driverless, is the likely case), so those steps fail with exit 100 on Nebius while passing on AWS, GCP, Azure and Kubernetes.This replaces the inline
sqlite3commands with a shared_INSPECT_STORED_HOOKS_CMDthat reads the same key with Python's built-insqlite3module from the SkyPilot runtime env (constants.SKY_REMOTE_PYTHON_ENV). Output format (one value per row, nothing if the key is absent) and all grep assertions are unchanged. Also fixes pre-existing pylint warnings in the file so it scores 10.00.Tested
sky exec c '<cmd>'andinspect='<cmd>' && sky exec c "$inspect") locally against a sampleskylet_config.db; output matches and grep assertions pass.bash format.sh; pylint 10.00/10 on the file.🤖 Generated with Claude Code