Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ jobs:
if: steps.cache-fedora-cloud-images.outputs.cache-hit != 'true'
run: |
for arch in aarch64 x86_64; do
curl -L --output "python/packages/jumpstarter-driver-qemu/images/Fedora-Cloud-Base-Generic-41-1.4.${arch}.qcow2" \
"https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/${arch}/images/Fedora-Cloud-Base-Generic-41-1.4.${arch}.qcow2"
curl -vvv -L --output "python/packages/jumpstarter-driver-qemu/images/Fedora-Cloud-Base-Generic-41-1.4.${arch}.qcow2" \
"https://dl.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/${arch}/images/Fedora-Cloud-Base-Generic-41-1.4.${arch}.qcow2"
done
ls -lsh python/packages/jumpstarter-driver-qemu/images
for file in python/packages/jumpstarter-driver-qemu/images/*.qcow2; do
cat $file
done
Comment on lines +81 to 84

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Using cat on binary QCOW2 files will flood CI logs with binary data.

QCOW2 files are binary disk images (hundreds of MBs). Running cat on them outputs raw binary to the CI logs, providing no useful diagnostic information and potentially causing log storage/display issues.

If the intent is to verify the downloaded files, use qemu-img info or file instead.

🔧 Suggested fix using qemu-img info
          done
          ls -lsh python/packages/jumpstarter-driver-qemu/images
          for file in python/packages/jumpstarter-driver-qemu/images/*.qcow2; do
-           cat $file
+           qemu-img info "$file"
          done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ls -lsh python/packages/jumpstarter-driver-qemu/images
for file in python/packages/jumpstarter-driver-qemu/images/*.qcow2; do
cat $file
done
ls -lsh python/packages/jumpstarter-driver-qemu/images
for file in python/packages/jumpstarter-driver-qemu/images/*.qcow2; do
qemu-img info "$file"
done
🤖 Prompt for AI Agents
In @.github/workflows/python-tests.yaml around lines 81 - 84, The CI currently
runs a for-loop that cats each QCOW2 in
python/packages/jumpstarter-driver-qemu/images which will dump binary data into
logs; change the loop to run a safe inspection command such as qemu-img info
"$file" or file "$file" (inside the same for ...; do ...; done block) to print
human-readable metadata instead of raw binary, ensuring the command references
the existing loop variable `file` used in that for-loop.


- name: Run pytest
Expand Down
1 change: 1 addition & 0 deletions python/packages/jumpstarter-cli/jumpstarter_cli/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def _warn_about_expired_token(lease_name: str, selector: str) -> None:
click.echo(click.style(f"To reconnect: JMP_LEASE={lease_name} jmp shell", fg="cyan"))


# test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove leftover test comment.

This # test comment appears to be a debug marker that should be removed before merging.

Proposed fix
-# test
 async def _monitor_token_expiry(config, cancel_scope) -> None:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# test
async def _monitor_token_expiry(config, cancel_scope) -> None:
🤖 Prompt for AI Agents
In `@python/packages/jumpstarter-cli/jumpstarter_cli/shell.py` at line 30, Remove
the stray debug comment "# test" from jumpstarter_cli/shell.py; locate the
module-level or nearby inline comment in the shell.py file (no functional
symbols affected) and delete that line so no leftover test/debug marker remains
in the production code.

async def _monitor_token_expiry(config, cancel_scope) -> None:
"""Monitor token expiry and warn user."""
token = getattr(config, "token", None)
Expand Down
Loading