Skip to content

Update attachment command to support zip files#1224

Merged
gayanW merged 4 commits intov1from
AIENG-330
Jan 22, 2026
Merged

Update attachment command to support zip files#1224
gayanW merged 4 commits intov1from
AIENG-330

Conversation

@gayanW
Copy link
Contributor

@gayanW gayanW commented Jan 22, 2026

The record attachment command is updated to also support zip files.

Let says user have the following files:

  test-logs/
  ├── test-app.log
  └── logs.zip
      ├── nested/
      │   └── debug.log
      └── binary-test.dat

Usage:

+ launchable record attachment --session $session test-logs/test-app.log

| File                   | Status                  |
|------------------------|-------------------------|
| test-logs/test-app.log | ✓ Recorded successfully |
+ launchable record attachment --session $session test-logs/logs.zip
| File             | Status                           |
|------------------|----------------------------------|
| nested/debug.log | ✓ Recorded successfully          |
| binary-test.dat  | ⚠ Skipped: not a valid text file |

@gayanW gayanW requested a review from ono-max January 22, 2026 01:38
Comment on lines 116 to 122
os.unlink(zip_path)
os.unlink(tar_path)
os.unlink(text_file_1)
os.unlink(text_file_2)
os.unlink(binary_file)
os.rmdir(os.path.dirname(text_file_2))
os.rmdir(temp_dir)
Copy link
Contributor

@ono-max ono-max Jan 22, 2026

Choose a reason for hiding this comment

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

If you use tempfile.TemporaryDirectory(), all its contents are automatically cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@ono-max ono-max left a comment

Choose a reason for hiding this comment

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

Approved this PR not to block you.

@gayanW gayanW merged commit f5d1e92 into v1 Jan 22, 2026
13 checks passed
@gayanW gayanW deleted the AIENG-330 branch January 22, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants