servo/python
bors-servo 45000be019
Auto merge of #29629 - servo:fix-nightly-job-upload-error, r=mukilan
Fix nightly upload to GH release logic.

The boto3 S3 client automatically [closes the given fileobj](https://github.com/boto/s3transfer/blob/develop/s3transfer/upload.py#L106) after the transfer is complete. This prevents us from reusing the package_hash_fileobj between s3 and github upload methods. This is causing the [upload to github to fail](8303739124) with:
```
ValueError: I/O operation on closed file.

  File "/home/runner/work/servo/servo/python/servo/package_commands.py", line 792, in upload_nightly
    upload_to_github_release(platform, package, package_hash_fileobj)
  File "/home/runner/work/servo/servo/python/servo/package_commands.py", line 635, in upload_to_github_release
    package_hash_fileobj.getbuffer().nbytes,
```

This PR changes fixes the issue by creating fresh instances of io.BytesIO within the two upload_to_* methods.

I've triggered a [manual nightly job](4686470246) based on this branch. This PR can be kept open until the build completes, in case other issues are surfaced.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they fix an error in nightly CI Job
2023-04-13 12:54:23 +02:00
..
mach Make mach work on Python 3.11 2023-01-22 05:13:30 +01:00
servo Auto merge of #29629 - servo:fix-nightly-job-upload-error, r=mukilan 2023-04-13 12:54:23 +02:00
tidy Remove a print statement mistakenly added in a previous change 2023-03-28 09:42:35 +02:00
mach_bootstrap.py Run WPT sync nightly on GitHub Action 2022-08-16 00:14:55 +09:00
README.md Fix styling for Markdown headers. 2016-05-02 22:20:49 -04:00
requirements.txt Auto merge of #29610 - mrobinson:notify, r=mukilan 2023-04-13 10:02:35 +02:00
tox.ini Added tox.ini 2016-05-08 12:10:48 +02:00

This directory contains various Python modules used to support servo development.

servo

servo-specific python code e.g. implementations of mach commands. This is the canonical repository for this code.

tidy

servo-tidy is used to check licenses, line lengths, whitespace, flake8 on Python files, lock file versions, and more.