Commit graph

45420 commits

Author SHA1 Message Date
Oriol Brufau
10cdaef5e5 Expect some tests to fail in layout-2020
sslfail.html and websocket_disconnect.html are already expected to fail
in layout-2013.

text-indent-percentage-001.xht and text-indent-tab-positions-001.html
fail in layout-2020 due to lack of support for text-indent and tabs.
2023-04-25 19:58:02 +02:00
bors-servo
2ae158dec1
Auto merge of #29665 - servo:wpt_update_25-04-2023, r=servo-wpt-sync
Sync WPT with upstream (25-04-2023)

Automated downstream sync of changes from upstream as of 25-04-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-04-25 13:41:04 +02:00
WPT Sync Bot
ea44238f3a Update web-platform-tests to revision b'6aa16a6888fcf6dd3ee2eac2e911c2d7c353d193' 2023-04-25 11:40:51 +00:00
bors-servo
d577d4489a
Auto merge of #29662 - sagudev:cii, r=mrobinson
try-wpt-2020 runner & run wpt test on selected layout

wpt-2020 try runner was not enabled as observed in #29655 and even if it was it would have not been working right (as observed in workflow dispatch).

There may be additional changes needed for WPT importer/report_agregator as quick look over it shows flags are not passed over to them.

A lot of layout2020 tests are still falling.

Tests:
- [Quick check](https://github.com/sagudev/servo/actions/runs/4786225230)
- [wpt](https://github.com/sagudev/servo/actions/runs/4786228332)
- [wpt-2020](https://github.com/sagudev/servo/actions/runs/4786229751)
2023-04-25 10:55:17 +02:00
sagudev
200f90cf9f Add try-wpt-2020 runner 2023-04-25 09:53:01 +02:00
sagudev
8bed625d28 Use defined layout for wpt test 2023-04-25 09:53:01 +02:00
sagudev
b3670c503d Allow wpt commands to accept --with-layout-2013 2023-04-25 09:53:01 +02:00
bors-servo
98bae01f02
Auto merge of #29656 - servo:wpt_update_23-04-2023, r=servo-wpt-sync
Sync WPT with upstream (23-04-2023)

Automated downstream sync of changes from upstream as of 23-04-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-04-24 11:34:54 +02:00
bors-servo
c44c6e8c11
Auto merge of #29646 - CYBAI:fix-classname-filter, r=jdm
Fix checking for empty set in getElementsByClassName

Because empty set with `.all(predicate)` will always return `true`, it will result in always filtering wrong elements when the classes is empty set.

Thus, we return earlier with `always_empty` HTMLCollection in the empty classes case so that we can avoid filtering on empty sets.

With adding the checking, we can fix the failures in `/dom/nodes/getElementsByClassName-empty-set.html`.

---

- [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)
- [x] There are tests for these changes
2023-04-24 07:55:25 +02:00
bors-servo
06873da566
Auto merge of #29658 - mrobinson:fix-script-name, r=mukilan
Fix the path to the WPT export script after a rename

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes do not require tests because they are a fix for build GitHub actions.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-24 05:50:54 +02:00
bors-servo
3d8ba89f43
Auto merge of #29652 - switchpiggy:switchpiggy, r=jdm
Fixed bug where ./mach test-wpt was unable to run on windows due to servowpt…

….py not correctly setting default binary path

<!-- Please describe your changes on the following line: -->
Changed the default_binary_path variable to account for the binary_name change to "servo.exe" on win32 properly. Before, the target_dir was being changed after the default path variable was set. This would result in the following error when ./mach test-wpt was run:

"Binary path C:\Code\servo\target\release\servo does not exist"

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because the validity of the change can be tested by running ./mach test-wpt.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-24 04:12:12 +02:00
bors-servo
2b7231f2c6
Auto merge of #29578 - servo:dependabot/cargo/spin-0.9.8, r=mukilan
Bump spin from 0.9.5 to 0.9.8

Bumps [spin](https://github.com/mvdnes/spin-rs) from 0.9.5 to 0.9.8.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/mvdnes/spin-rs/blob/master/CHANGELOG.md">spin's changelog</a>.</em></p>
<blockquote>
<h1>[0.9.8] - 2023-04-03</h1>
<h3>Fixed</h3>
<ul>
<li>Unsoundness in <code>Once::try_call_once</code> caused by an <code>Err(_)</code> result</li>
</ul>
<h1>[0.9.7] - 2023-03-27</h1>
<h3>Fixed</h3>
<ul>
<li>Relaxed accidentally restricted <code>Send</code>/<code>Sync</code> bounds for <code>Mutex</code> guards</li>
</ul>
<h1>[0.9.6] - 2023-03-13</h1>
<h3>Fixed</h3>
<ul>
<li>Relaxed accidentally restricted <code>Send</code>/<code>Sync</code> bounds for <code>RwLock</code> guards</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/mvdnes/spin-rs/commits">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=spin&package-manager=cargo&previous-version=0.9.5&new-version=0.9.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-04-24 01:03:58 +02:00
bors-servo
1b4fdcf7bc
Auto merge of #29647 - mrobinson:catch-more-notification-exceptions, r=jdm
Catch more exceptions when delivering build notifications

It seems that catching ImportError isn't enough, so we must catch any type of exception when trying to deliver a build notification.

Fixes #29645.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes do not require tests because they fix a small build infrastructure issue.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-23 21:58:30 +02:00
bors-servo
0b888c8644
Auto merge of #29644 - mrobinson:rename-establishes-containing-block, r=delan
Rename `ComputedValuesExt::establishes_containing_block`

This renames the helper method to be a bit more accurate. For elements with static, relative, and sticky positioning, their containing block is always formed by their nearest block container ancestor. This method is really dealing with style that means an element will establish a containing block for absolutely positioned descendants.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes do not require tests because they do not change behavior.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-23 20:25:01 +02:00
Martin Robinson
8a04877cd6 Fix the path to the WPT export script after a rename 2023-04-23 18:41:24 +02:00
switchpiggy
6cb656059d Fixed bug where test-wpt was unable to run on windows due to servowpt.py not correctly setting default binary path 2023-04-23 18:31:35 +02:00
bors-servo
bf29f59adf
Auto merge of #29641 - CYBAI:fix-attr-checking, r=jdm
Throw HierarchyRequest error for attr node in pre-insertion

Based on Step 4 of https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity, we should throw `HierarchyRequest` error when the node is not a [DocumentFragment](https://dom.spec.whatwg.org/#documentfragment), [DocumentType](https://dom.spec.whatwg.org/#documenttype), [Element](https://dom.spec.whatwg.org/#element), or [CharacterData](https://dom.spec.whatwg.org/#characterdata) [node](https://dom.spec.whatwg.org/#concept-node).

Thus, Attr is not one of them; we should throw an error in this case.

(I'm guessing it was a kind of typo in https://github.com/servo/servo/pull/25310 because we need to handle Attr with `unreachable` in line 1946)

So, with doing so, we can fix the CRASH in `/dom/attributes-are-nodes.html`.

---

- [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)
- [x] There are tests for these changes
2023-04-23 18:16:15 +02:00
bors-servo
26f6c1c34b
Auto merge of #29648 - mukilan:download-build-deps-from-github, r=mrobinson
Download prebuilt dependencies from Github instead of S3

After moving nightly builds to GitHub releases, the major contributor to AWS cost is now the S3 data transfer charges.

This PR only addresses the data transfer costs incurred due to the download of gstreamer dependency in the linux and the Windows dependencies (llvm, cmake, moztools, openssl etc) for MSVC builds. Android dependencies and UWP/Hololens dependencies will continue to be served from S3. These can be moved to GH as well in a future PR.

The new [servo-build-deps](https://github.com/servo/servo-build-deps/releases) repo now has two tagged releases - linux and msvc. For now, I've manually uploaded the latest versions of the dependencies referred in Servo code to the corresponding releases. We can add the older versions of the dependencies later if needed, potentially using a script to copy from s3.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 it is a small change in the CI/bootstrap code.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-23 16:30:52 +02:00
bors-servo
2268a0f3c3
Auto merge of #29639 - mrobinson:reorganize-wpt-python, r=mukilan
Reorganize Servo's WPT Python scripts

This change moves all of Servo's WPT Python support scripts into one directory as they were previously scattered throughout the directory structure. This should allow more code reuse and make it easier to understand how everything fits together.

The changes:

- `tests/wpt/update` → `python/wpt/importer`
- `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter`
- `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py`
- `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests`
- `tests/wpt/servowpt.py` → - `python/wpt/update.py` - `python/wpt/run.py`
- `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py`

This change also removes
 - The ability to run the `update-wpt` and `test-wpt` commands without using `mach`. These didn't work very well, because it was difficult to get all of the wptrunner and mach dependencies installed outside of the Python virtualenv. It's simpler if they are always run through `mach`.
- The old WPT change sync / upstreaming script that was no longer used. This allows this code to pass `test-tidy` now.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-23 14:23:57 +02:00
bors-servo
dc5566c60a
Auto merge of #29657 - mrobinson:build-mac-with-dummy-media-stack, r=mukilan
Build on Mac with the dummy media stack

This is a temporary fix for broken GStreamer homebrew packages.

Fixes #29653.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #29653.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-23 12:50:40 +02:00
Martin Robinson
2db364b4b1 Build on Mac with the dummy media stack
This is a temporary fix for broken GStreamer homebrew packages.

Fixes 29653.
2023-04-23 12:50:00 +02:00
WPT Sync Bot
40def0914a Update web-platform-tests to revision b'a3cb53d786edfd9106825e312866624150382075' 2023-04-23 01:36:19 +00:00
cybai
c77e4e4e69 Fix checking for empty set for getElementsByClassName
Because empty set with `.all(predicate)` will always return `true`, it
will result in always filtering wrong elements when the classes is empty
set.

Thus, we return earlier with `always_empty` HTMLCollection in the mpety
classes case so that we can avoid filtering on empty sets.
2023-04-21 15:21:53 +09:00
cybai
0f65bbd296 Throw HierarchyRequest error for Attr in pre-insert and replacechild 2023-04-21 15:07:22 +09:00
Martin Robinson
e2cf3e8d1a Reorganize Servo's WPT Python scripts
This change moves all of Servo's WPT Python support scripts into one
directory as they were previously scattered throughout the directory
structure. This should allow more code reuse and make it easier to
understand how everything fits together.

The changes:

- `tests/wpt/update` → `python/wpt/importer`
- `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter`
- `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py`
- `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests`
- `tests/wpt/servowpt.py` →
    - `python/wpt/update.py`
    - `python/wpt/run.py`
- `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py`

This change also removes
 - The ability to run the `update-wpt` and `test-wpt` commands without
   using `mach`. These didn't work very well, because it was difficult
   to get all of the wptrunner and mach dependencies installed outside
   of the Python virtualenv. It's simpler if they are always run through
   `mach`.
- The old WPT change upstreaming script that was no longer used.
2023-04-20 12:24:55 +02:00
Mukilan Thiyagarajan
6e7cb9bffa Download prebuilt dependencies from Github instead of S3
After moving nightly builds to GitHub releases,
the major contributor to AWS cost is now the S3 data
transfer charges.

This PR only addresses the data transfer costs incurred
due to the download of gstreamer dependency in the
linux and the Windows dependencies (llvm, cmake, moztools,
openssl etc) for MSVC builds. Android dependencies and
UWP/Hololens dependencies will continue to be served
from S3. These can be moved to GH as well in a future PR.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-04-20 15:37:39 +05:30
Martin Robinson
ef8359df4b Catch more exceptions when delivering build notifications
It seems that catching ImportError isn't enough, so we must catch any
type of exception when trying to deliver a build notification.

Fixes #29645.
2023-04-20 12:06:05 +02:00
Martin Robinson
db194e74ad Rename ComputedValuesExt::establishes_containing_block
This renames the helper method to be a bit more accurate. For elements
with static, relative, and sticky positioning, their containing block is
always formed by their nearest block container ancestor. This method is
really dealing with style that means an element will establish a
containing block for absolutely positioned descendants.
2023-04-20 11:49:28 +02:00
bors-servo
9acb9cc5cf
Auto merge of #29632 - sagudev:ci-cache-win, r=jdm
Use ccache on windows workflow

Because `sccache` is not working when setting `CCACHE=sccache` I used ccache which is taking cache hits.

I would certainly love to share some timings, but I found out that windows builds have very inconsistent timings.
2023-04-19 04:27:06 +02:00
bors-servo
3291171629
Auto merge of #29643 - mrobinson:try-to-fix-ci-failures, r=mukilan
Try to fix the CI failures

It seems that the WPT update process added an unintentional flake to the results.

Fixes #29642.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes fix #29642
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-18 17:58:02 +02:00
Martin Robinson
926a1781e1 Try to fix the CI failures
It seems that the WPT update process added an unintentional flake to the
results.

Fixes #29642.
2023-04-18 16:28:17 +02:00
bors-servo
0acc345ae7
Auto merge of #29638 - mrobinson:fix-notify, r=mukilan
Make errors during build status notification warnings

Instead of raising an exception, simply print a warning on stderr when notification fails.

Fixes #29635.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes fix #29635
- [x] These changes do not require tests because they fix a minor tools issue.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-17 11:09:22 +02:00
Martin Robinson
61a70fbff2 Make errors during build status notification warnings
Instead of raising an exception, simply print a warning on stderr when
notification fails.

Fixes #29635.
2023-04-17 09:03:01 +02:00
bors-servo
6e2615f0b5
Auto merge of #29636 - servo:wpt_update_16-04-2023, r=servo-wpt-sync
Sync WPT with upstream (16-04-2023)

Automated downstream sync of changes from upstream as of 16-04-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-04-16 03:29:40 +02:00
WPT Sync Bot
75286b8eab Update web-platform-tests to revision b'f0b66362cc5dec54d81e0a56458b48f310a2eba9' 2023-04-16 01:29:26 +00:00
bors-servo
766917ef4f
Auto merge of #29631 - mrobinson:correct-positioned-block-axis-calculation, r=mrego
Fix calculation of block axis for abspos elements in Layout 2020

The calculation of the block axis positioning of absolutely positioned elements was using the inline size of the containing block instead of the block size.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-14 16:33:49 +02:00
Martin Robinson
c23f05583b Fix calculation of block axis for abspos elements
The calculation of the block axis positioning of absolutely positioned
elements was using the inline size of the containing block instead of
the block size.
2023-04-14 11:17:26 +02:00
sagudev
d939c9a8b7 ccache 2023-04-14 10:57:49 +02:00
bors-servo
4251159513
Auto merge of #29627 - CYBAI:respect-headers-ct, r=mukilan
Respect MIME type from headers instead of caching it

Based on the spec,

> A [Request](https://fetch.spec.whatwg.org/#request) object’s [MIME type](https://fetch.spec.whatwg.org/#concept-body-mime-type) is to return the result of [extracting a MIME type](https://fetch.spec.whatwg.org/#concept-header-extract-mime-type) from its [request](https://fetch.spec.whatwg.org/#concept-request-request)’s [header list](https://fetch.spec.whatwg.org/#concept-request-header-list).

request and response should always return the MIME type from their header list. As we're currently caching the mime type directly, this PR will help to remove the caching field and always retrieve from headers instead.

---

- [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)
- [x] There are tests for these changes
2023-04-14 07:51:58 +02:00
cybai
c4882aab7e Update steps comment to match latest (2023-04-14) spec 2023-04-14 14:32:28 +09:00
bors-servo
083a96a8d7
Auto merge of #29630 - sagudev:ci-win-gstream, r=jdm
Use GStreamer in Windows workflow

I accidental came across https://github.com/servo/servo/projects/26 and can't helped but to fix one. (Few were already fixed but not closed).

Test run: https://github.com/sagudev/servo/actions/runs/4687138840/jobs/8306052042

---
<!-- 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
- [x] These changes fix #28277

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is only CI

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-13 15:10:16 +02:00
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](https://github.com/servo/servo/actions/runs/4685791796/jobs/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](https://github.com/servo/servo/actions/runs/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
sagudev
49e498924f Use GStreamer in Windows workflow 2023-04-13 12:17:03 +02:00
bors-servo
15f966bde5
Auto merge of #29610 - mrobinson:notify, r=mukilan
Use notify-py to send notifications

- Use notify-py to send notifications, but use a custom notifier on
  Linux since transient (ie non-sticky) notifications are not supported.
- Add an icon to the notification.
- Don't send a notification after doing `./mach check` because that
  can trigger notifications when `rust-analyzer` is working.

---
<!-- 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
- [x] These changes do not require tests because they just change build notifications.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-13 10:02:35 +02:00
Martin Robinson
492091e5b0 Use notify-py to send notifications
- Use notify-py to send notifications, but use a custom notifier on
  Linux since transient (ie non-sticky) notifications are not supported.
- Add an icon to the notification.
- Don't send a notification after doing `./mach check` because that
  can trigger notifications when `rust-analyzer` is working.
2023-04-13 10:01:25 +02:00
Mukilan Thiyagarajan
76a5a1081b Fix nightly upload to GH release logic.
The boto3 S3 client automatically closes the given
fileobj after the transfer is complete. This prevents
us from reusing the package_hash_fileobj between
s3 and github upload methods.

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

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-04-13 12:31:42 +05:30
bors-servo
7ab48556b0
Auto merge of #29623 - mrobinson:wpt-import-one-week, r=mukilan
Import WPT tests every week instead of every day

We often have multiple imports stacked up which makes it more confusing to land each one. In addition, giving a week to do the import will give us more margin to triage failing tests and hopefully to be able to use intermittent expectations for flaky tests.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes do not require tests because this just change the frequency of a scheduled action.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-04-13 07:56:05 +02:00
bors-servo
4a9b80382c
Auto merge of #29621 - mukilan:upload-nightly-to-gh-releases, r=mrobinson
Upload nightly builds to Github Releases

This change extends the `mach upload-nightly` command to publish the nightly builds for all platforms as GH Release assets.

The GH releases are made on a separate repository so that we can persist older nightly builds without having to accumulate git tags for them.

Example releases on a fork can be seen here: https://github.com/mukilan/servo-nightly-builds/releases/
Assets of the *latest* nightly releases will available at a stable url e.g for linux
`https://github.com/mukilan/servo-nightly-builds/releases/latest/download/servo-latest.tar.gz`

Some design tradeoffs in this approach are:
1. To allow the 'latest' link from servo.org to remain stable, the release assets are named 'servo-latest.{ext}' instead of containing the release tag/date.
2. The release is created as draft and published atomically when all platforms have been built successfully. This allows us to link to the 'latest' alias from servo.org while gauranteeing that it contains builds for all platforms. The other option here would be to have code in servo.org UI that uses GH API to find the most recent release with a successful build for a given platform.
3. The tags in the nightly repo are all based on the same commit that has no relation to servo code base.

---

- [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 it extends the nightly CI job
2023-04-12 18:16:59 +02:00
Mukilan Thiyagarajan
f1ba708cf7 Upload nightly builds to Github Releases
This change extends the `mach upload-nightly` command to
publish the nightly builds for all platforms as GH Release
assets.

The GH releases are made on a separate repository so
that we can persist older nightly builds without having
to accumulate git tags for them.

Some design tradeoffs in this approach are:
1. To allow the 'latest' link from servo.org to remain stable,
the release assets are named 'servo-latest.{ext}' instead of
containing the release tag/date.
2. The release is created as draft and published atomically
when all platforms have been built successfully. This allows
us to link to the 'latest' alias from servo.org while
gauranteeing that it contains builds for all platforms.
The other option here would be to have code in servo.org UI
that uses GH API to find the most recent release with a
successful build for a given platform.
3. The tags in the nightly repo are all based on the same
commit that has no relation to servo code base.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-04-12 21:02:07 +05:30
cybai
445c90e5c5 Respect MIME type from headers instead of caching it 2023-04-13 00:31:49 +09:00