Commit graph

1814 commits

Author SHA1 Message Date
sagudev
200f90cf9f Add try-wpt-2020 runner 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
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
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
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
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
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
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
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
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
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
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
Martin Robinson
bc3abf9953 Remove more Taskcluster and Treeherder integration
Servo no longer uses Taskcluster and Treeherder, so this change removes
script references to those services and support files.
2023-04-10 23:04:17 +02:00
Martin Robinson
e9942bddb0 Replace usage of six.moves.urllib with urllib
Also organize some of the imports. Now that Servo only uses Python 3,
this module is unnecessary. This is part of the gradual migration to
using only Python 3.
2023-04-10 12:47:39 +02:00
Martin Robinson
f7168282a1 Have all mach command accept "--with-layout-2020" and "--layout-2020"
Some command accepted one and some the other. This changes makes them
all accept both so it's no longer necessary to remember which uses
which.
2023-04-07 11:24:14 +02:00
Martin Robinson
1613997d87 Remove a print statement mistakenly added in a previous change
This statement is totally unnecessary and interferes with the console
commands which erase and rewrite the current tidy status.
2023-03-28 09:42:35 +02:00
Martin Robinson
ec9cbeefd8 Merge forbidden panic check into test-tidy
This cleans up the GitHub actions yaml a bit and ensures that developers
are running this check locally before submitting changes. In addition,
it allows adding tests for this check. Finally, this change fixes the
tidy tests by upgrading voluptuous for Python 3.10 as well as by
reverting an inadvertent change for NixOS compatibility on one of the
dummy testing files.
2023-03-22 15:37:56 +01:00
bors-servo
886032fc74
Auto merge of #29431 - sagudev:mtry, r=jdm
Add try command to mach & try build partitioned

Adds `./mach try` command that enables anybody to easily test their changes without opening PR and requesting try from bors-servo, by force pushing HEAD to appropriate branch. Command accepts branches names to select only partial runs of CI (same like bors try command). So if you only want to test mac build (that would be `@bors-servo try=mac`) you run `./mach try mac`. If no job is specified, try branch is used.

As partitioned CI jobs were not working after migration to GitHub Actions I remade them by using if guards.
Also WPT jobs were failing due to empty `INTERMITTENT_TRACKER_DASHBOARD_SECRET` on my fork, so I added additional check to prevent failed run.

And that concludes my work on #29379 🎉

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's 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-03-21 15:05:25 +01:00
sagudev
332eeb3bbe mach try & partitioned try jobs 2023-03-21 07:26:27 +01:00
Mukilan Thiyagarajan
1b310224a5 Package and upload linux w/ layout-2020 engine.
The layout-2020 variant will be consumed by the
internal WPT trend [dashboard][1] only and won't
be made available on servo.org.

This change will be removed once the layout
engine we will use going forward is finalized.

[1]: https://servo.github.io/internal-wpt-dashboard/

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-03-10 15:21:02 +05:30
Delan Azabani
07c1286334 Improve winit/mach segfault output 2023-02-28 21:54:48 +08:00
sagudev
fd79367491 Add cargo-fix and cargo-clippy to mach 2023-02-18 07:28:15 +01:00
sagudev
73bd128d44 Warning instead of exception on unsupported Ubuntu 2023-02-17 08:18:17 +01:00
Martin Robinson
377f7d0a95 Conditionally use certain GStreamer plugins
In old versions of GStreamer gstvideoconvertscale was split into two
plugins, gstvideoscale and gstvideoconvert. This change makes the use of
these three plugins conditional on their existence and has Windows use
the two plugins from the older version of GStreamer. In addition, it
starts to clean up the gstreamer.py file which is responsible for
managing GStreamer libraries and plugins. This is the first change in a
series of changes that seek to clean up the way these libraries are
managed during the build.
2023-02-16 08:59:12 +01:00
bors-servo
dacefe5162
Auto merge of #29346 - mrobinson:aggregate-unexpected-logs, r=delan
Aggregate unexpected results into logs

This makes it easier to run `update-wpt` based on results from the bots by writing a new version of the raw log that filters out all tests with expected results.  Then aggregate this output into the filtered results archive. A future version of this could aggregate all unexpected results that were not filtered as intermittents.

<!-- 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 infrastructure 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-02-14 18:58:29 +01:00
Martin Robinson
5c9156e3ee Aggregate unexpected results into logs
This makes it easier to run `update-wpt` based on results from the bots.
A future version of this could aggregate all unexpected results that
were not filtered as intermittents.
2023-02-14 15:44:34 +01:00
Mukilan Thiyagarajan
7ce693d505 Update gst plugin for videoconvert & videoscale elements 2023-02-11 10:19:59 +05:30
Martin Robinson
3543fd27f0 wpt: Make WPT result formatting logic independent of ServoHandler
This will allow results to be formatted by other parts of the code (such
as the intermittent filtering) code. Previously, formatting was handled
in ServoHandler, which was a bit strange as it's really only necessary
for GroupingFormatter and the intermittent filtering code. This also
allows the results to be properly typed by the Python typing system.
2023-02-04 15:03:44 +01:00
bors-servo
4d5a804d03
Auto merge of #29294 - servo:integrate-filter-intermittents, r=delan
Integrate filter-intermittents into test-wpt

This change integrates the `filter-intermittents` command into `test-wpt`. This is in preparation for future work on tracking intermittent failures. This change also:
- Removes `ServoJsonFormatter` and replaces it with a generic WPT log handler which tracks unexpected results.
- The intermittent filter is now controlled via environment variables and the GitHub version requires a token instead of credentials.
- Output is saved to a single file and is always text.

---
<!-- 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 changes to build infrastructure.
2023-01-27 15:43:47 +01:00
Mukilan Thiyagarajan
e4764e7661 Invalidate latest nightly files in CloudFront.
After a new nightly build is uploaded to S3,
bust the cache in CloudFront Edge servers with
the CreateInvalidation AWS API.

For each platform we use the
`/nightly/<platform>/servo-latest.<ext>*`
pattern to invalidate both package and sha256
files. As part of this change, a new policy
has been attached to the
"download.servo.org-uploads-from-travis" IAM user
to allow the "cloudfront:CreateInvalidation" action.

Since CloudFront [invalidates every version][1]
of the cached file, regardless of the headers used
for that version, this change should invalidate the
different caches for 'Accept-Encoding' header.

[1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects

Closes #29034

Signed-off-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2023-01-26 18:15:37 +05:30
Josh Matthews
85a04cc8a7
Update clangfmt version. 2023-01-24 18:45:04 -05:00
Mukilan Thiyagarajan
a9ccf935ad Update LLVM toolchain version for Windows
Windows MSCV nightly builds have been failing
since Jan 18. The failure is similar to the
one @delan identified where the CI build started
to fail after the version of LLVM included in
Github Actions runner images was bumped from
14 to 15.

As discussed on Zulip, we already have support
in ./mach bootstrap to download the LLVM binaries
from our s3 bucket. Following the documented
[process], new LLVM 15.0.5 binaries have been
uploaded to S3.

This PR updates the bootstrap script to use this
new LLVM version.

[process]: https://github.com/servo/servo/wiki/Upgrading-the-windows-LLVM-binaries

Signed-off-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2023-01-24 20:46:34 +05:30
Martin Robinson
d294a71397 Integrate filter-intermittents into test-wpt
This change integrates the filter-intermittents command into test-wpt.
This is in preparation for future work on tracking intermittent
failures. This change also:
- Removes the SrvoJson logger and replaces it with a generic WPT log
  handler which tracks unexpected results.
- The intermittent filter is now controlled via environment variables
  and the GitHub version requires a token instead of credentials.
- Output is saved to a single file and is always text.
2023-01-24 15:10:09 +01:00
Andreu Botella
d7be53a70e Make mach work on Python 3.11 2023-01-22 05:13:30 +01:00
Josh Matthews
cb1be84651 Remove unused salt bootstrapping process. 2023-01-19 21:35:56 -05:00
bors-servo
5a33a91bc9
Auto merge of #29238 - servo:ci-fail-install-deps, r=jdm
Fail faster on CI when Linux bootstrap fails

Raise an exception when dependencies fail to install. Also split the run phase of the Linux bootstrap so that either of these failing commands will cause the job to fail.

<!-- 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 just change minor script issues.
2023-01-17 11:43:47 +01:00
Martin Robinson
42c3d05d2b Simplify Python code for running WPT tests
Combine `run.py` and `update.py` into `servowpt.py` in order to allow
them to share code. Import them directly into the mach script to avoid
having to call `compile` and `exec` on the code. This makes it clearer
how they are executed. In addition, move all of the setup into
`setupwpt.py` to avoid differences between tests executed via mach and
not. Finally, be more ambitious when detecting the build to use. If none
was specified, try to use the one that exists between "release" and
"debug."
2023-01-13 16:23:52 +01:00
Martin Robinson
677414730b Fail faster on CI when Linux bootstrap fails
Raise an exception when dependencies fail to install. Also split the run
phase of the Linux bootstrap so that either of these failing commands
will cause the job to fail.
2023-01-13 15:29:58 +01:00
Delan Azabani
ab578bc4cf mach filter-intermittents: add progress and --json output mode 2023-01-10 17:35:01 +08:00
dependabot[bot]
4109fa4ee9
Bump setuptools from 65.3.0 to 65.5.1 in /python
Bumps [setuptools](https://github.com/pypa/setuptools) from 65.3.0 to 65.5.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v65.3.0...v65.5.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-27 17:17:43 +00:00
michaelgrigoryan25
f8701c19bd Arch Linux patch for mach tools. 2022-12-15 15:39:48 +04:00
Michael G
1dd026cef1
Removed a typo 2022-11-28 08:44:21 +04:00
Michael G
7b246573a4
Added required dependencies for Fedora 2022-11-28 08:43:55 +04:00
Josh Matthews
b37688d0db Keep WPT import path around while running lints. 2022-11-09 22:14:38 -05:00
Josh Matthews
65a4d1646d
Update allowed license string. 2022-10-16 09:23:05 -04:00