Commit Graph

290 Commits

Author SHA1 Message Date
David Taylor
a10dcffb73
DEV: Update core lint commands to only affect bundled plugins (#29824)
Non-bundled plugins have their own linting configs/commands, and should not be linted by these package.json commands
2024-11-19 18:56:14 +00:00
Alan Guo Xiang Tan
95fa997e4b
DEV: Upload tests workflow to use actions/upload-artifact@v4 (#29699)
v3 is going to be EOL on Nov 14.
2024-11-11 11:37:53 +00:00
David Taylor
5cc531ed75
DEV: Update jsconfig, add glint config, add basic check in CI (#28667)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
This switches us back to the 'unstable' version of Glint, which is 'Volar' under the covers. While it's still a work-in-progress, it already works much better for us than the 'stable' version of Glint.

The CI check makes sure that we don't re-introduce any ts/glint-incompatible changes in future (e.g. object literal property decorators).
2024-10-29 16:55:31 +00:00
David Taylor
92a4b17ad8
DEV: Tweak uppy dependency config (#29436)
- Remove pnpm peerdep exception. We're now up-to-date, and the issue is resolved

- Configure Dependabot to group future updates
2024-10-28 14:18:33 +00:00
Jarek Radosz
97be676b99
DEV: Fix workflow syntax (#29314)
A followup to 417e57d4ce
2024-10-21 15:53:52 +01:00
David Taylor
417e57d4ce
DEV: Correct flaky env from deb425f3 (#29312)
The env needs to be '1', not 'true'
2024-10-21 14:52:27 +01:00
David Taylor
deb425f3f6
DEV: Use flaky-test-retry in PRs as well (#29311)
The aim of the flaky-tests-rerun system is to reduce the amount of time developers have to spend manually restarting CI jobs. That means that, to get the benefit, we need to run it for PRs as well as on `main`.

Our internal reporting system only looks at the data from runs on `main`, so that it's not polluted by legitimately failing tests in PRs.
2024-10-21 13:02:20 +01:00
David Taylor
d04fd3a8ac
Revert "DEV: Fix github workflow yaml syntax (#29217)" (#29218)
This reverts commit 387f2c52e6.

Merging fails if there are no artifacts matching the pattern. Reverting while we work out a path forward
2024-10-15 17:23:37 +01:00
David Taylor
387f2c52e6
DEV: Fix github workflow yaml syntax (#29217)
Followup to ec75c442db
2024-10-15 15:47:27 +01:00
David Taylor
ec75c442db
DEV: Update upload-artifact to v4 (#29127)
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-10-15 15:00:36 +01:00
Alan Guo Xiang Tan
f45d5dc268
DEV: Start running discourse-ai tests for stable again. (#29205)
I think the tests works with the new base image now. Will revert if it
doesn't.
2024-10-15 17:37:06 +08:00
Alan Guo Xiang Tan
4d1e66418c
DEV: Skip plugin:pull_compatible_all when running against main branch (#29081)
Plugins are expected to always be compatible against the main `branch`
so we can skip the `plugin:pull_compatible_all rake task.
2024-10-07 14:30:03 +08:00
Alan Guo Xiang Tan
c8bec538c3
DEV: Only enable our self hosted runners on the discourse/discourse repo (#29024)
Our self hosted runners does not work for forked repositories.
2024-09-30 11:18:20 +08:00
Alan Guo Xiang Tan
9a2e6fc890
DEV: Cache minio binaries cause downloading them is slow (#28956) 2024-09-18 10:20:10 +08:00
Alan Guo Xiang Tan
54cf00ba78
DEV: Reduce number of parallel processes for frontend tests (#28936)
Seeing errors like the following which is normally due to us running
too many processes.

```
not ok 292 Firefox - [undefined ms] - error
    ---
        message: >
            Error: Browser timeout exceeded: 10s
            Error while executing test: Acceptance: Uppy Composer Attachment - Multiple Upload Errors: should show a consolidated message for multiple failed uploads
            Stderr:
             *** You are running in headless mode.

            Stdout:
             [GFX1-]: glxtest: libpci missing
            [GFX1-]: glxtest: Unable to open a connection to the X server
            [GFX1-]: No GPUs detected via PCI

            [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
```
2024-09-17 08:01:40 +08:00
Alan Guo Xiang Tan
c415b916a2
DEV: Switch to our own hosted runners for tests workflow everywhere (#28926) 2024-09-16 12:03:10 +08:00
Alan Guo Xiang Tan
4377649077
DEV: Only run check-flaky-spec-report when enabled in tests workflow (#28903) 2024-09-13 14:59:49 +08:00
Alan Guo Xiang Tan
9a4f71353d
DEV: Fix incorrect github.ref value in tests workflow (#28902) 2024-09-13 14:24:42 +08:00
Alan Guo Xiang Tan
f6ba5ed4d9
DEV: Use hosted runners on main branch for tests workflow (#28901)
Follow-up to 92f7b3e789
2024-09-13 13:43:06 +08:00
Michael Fitz-Payne
92f7b3e789
Reapply "DEV: update runners to debian-12" (#28899)
docker.io rate limits _should_ be addressed now. Switch back to
`debian-12` runners.

This is now a conditional within the `tests` workflow as we evaluate the
migration.

This reverts commit a99e2c62e6.
2024-09-13 13:35:32 +08:00
Michael Fitz-Payne
a99e2c62e6 Revert "DEV: update runners to debian-12"
Need to address rate limits from docker.io

This reverts commit 6ba0dcdb0e.
2024-09-13 08:19:51 +10:00
Michael Fitz-Payne
6ba0dcdb0e DEV: update runners to debian-12
The self-hosted Github runners have been provisioned, and we can switch
to using them for evaluation.

To prefer Github-hosted runners, you can safely revert this commit.

See: t/123181.
2024-09-13 06:32:55 +10:00
Penar Musaraj
d7679f8aa3
DEV: Shorter PR draft template (#28862) 2024-09-11 16:25:00 -04:00
Gabriel Grubba
a4359d274e
DEV: update pull request template with more details of what is expected in a PR (#28857)
* DEV: update pull request template with more details of what is expected in a PR

Added information:
- We expected the pr to have a title that is descriptive of the changes
- Good commit messages and prefixes
- If the pull request had UX/UI changes to include screenshots
- If changing flaky tests to include the reason for the change

* Update .github/pull_request_template.md

Co-authored-by: David Taylor <david@taylorhq.com>

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-11 13:57:45 -03:00
Jarek Radosz
83acd8b80a
DEV: Change qunit_parallel to 2 for frontend themes (#28842)
This seems to mitigate the flaky timeouts we've been seeing recently, while not affecting the speed in any meaningful way.
2024-09-11 11:39:26 +02:00
Gerhard Schlager
7c3a29c9d6
DEV: Add converter framework for migrations-tooling (#28540)
* Updates GitHub Actions
* Switches from `bundler/inline` to an optional group in the `Gemfile` because the previous solution didn't work well with rspec
* Adds the converter framework and tests
* Allows loading private converters (see README)
* Switches from multiple CLI tools to a single CLI
* Makes DB connections reusable and adds a new abstraction for the `IntermediateDB`
* `IntermediateDB` acts as an interface for IPC calls when a converter steps runs in parallel (forks). Only the main process writes to the DB.
* Includes a simple example implementation of a converter for now.
2024-09-09 17:14:39 +02:00
Jarek Radosz
4792468c88
DEV: Drop qunit timeout args (#28775)
whatever was using that value is long gone
2024-09-06 13:08:42 +02:00
Alan Guo Xiang Tan
7092d88ee4
DEV: Remove redundant step in tests workflow (#28716)
Base image no longer ships with Chromium so no need to remove it
2024-09-04 07:53:49 +08:00
David Taylor
80b9c280ba
DEV: Switch to pnpm for JS dependencies (#28671)
This will bring significant improvements to install speed & storage requirements. For information on how it may affect you, see https://meta.discourse.org/t/324521

This commit:
- removes the `yarn.lock` and replaces with `pnpm-lock.yaml`
- updates workspaces to pnpm format
- adjusts package dependencies to work with pnpm's stricter resolution strategy
- updates Rails app to load modules from more specific node_modules directories
- adds a `.pnpmfile` which automatically cleans up old yarn-managed `node_modules` directories
- updates various scripts to call `pnpm` instead of `yarn`
- updates patches to use pnpm's native patch system instead of patch-package
- adds a patch for licensee to support pnpm
2024-09-03 10:51:07 +01:00
Alan Guo Xiang Tan
08b60cfd73
DEV: Fix app-cache key not considering number of parallel database (#28629)
This is a follow-up to 8adc484804
2024-08-29 13:03:21 +08:00
Alan Guo Xiang Tan
8adc484804
DEV: Fix app-cache regression in tests workflow (#28626)
This regressed in b83a2a34a4 because the
Github actions docs doesn't make it clear that `runner.name` is actually
the runner's name plus some unique string appended at the end. Why they
would do that is beyond me.
2024-08-29 10:40:34 +08:00
Alan Guo Xiang Tan
ace8db23d2
DEV: Profile RSpec tests in tests workflow (#28536)
The `--profile 50` option will print the top 50 slowest tests
2024-08-26 08:52:17 +08:00
Alan Guo Xiang Tan
b586f2cb98
DEV: Don't hardcode number of parallel processes for QUnit (#28535) 2024-08-26 08:42:35 +08:00
Alan Guo Xiang Tan
17db30ab7e
DEV: Avoid hardcoding PARALLEL_TEST_PROCESSORS in tests workflow (#28511)
This allows to maximize the CPU cores when the tests workflow is ran on
a larger runner.
2024-08-23 16:56:09 +08:00
Alan Guo Xiang Tan
b83a2a34a4
DEV: Update app-cache cache key for tests workflow (#28508)
We cannot just key on `runner.os` the number of CPU cores matter as
well. Therefore, we need to key on `runner.name` instead since each
runner has its own unique OS and CPU cores. Technically, two different
runner with different names can have the same `os` and `cpu cores` but
we don't have that problem now.
2024-08-23 11:13:03 +08:00
David Taylor
50c10de459
DEV: Update GitHub Actions runners to ubuntu 22.04 (#28481) 2024-08-22 11:09:39 +01:00
Alan Guo Xiang Tan
f41c4ccfc2
DEV: Switch back to Chrome for running QUnit tests (#28429)
QUnit tests are failing in different ways on Chromium in Debian
bookworm. We have no interest in figuring out why as it is not a good
use of our time and the long term plan is to switch to Chrome for Testing
anyway.
2024-08-20 13:12:33 +08:00
David Taylor
ce3d91f422
DEV: Load @json-editor/json-editor using webpack async import (#27773) 2024-07-10 11:15:42 +01:00
David Taylor
a461eaddc3
DEV: Refactor ace-editor loading and bump to latest version (#27772)
- Delete vendored copy
- Create a JS entrypoint under `static/` which imports all the modes/themes/extensions we need
- Create an async `load-ace-editor` entrypoint
- Update `<AceEditor` component to use the new entrypoint
- De-jquery-ify `<AceEditor`
- Bump `v1.4.13` -> `v1.35.2`
2024-07-09 10:09:30 +01:00
David Taylor
eadda77edf
DEV: Drop diffhtml dependency (#27695)
We switched to morphlex via:

- c5f1fc3a08

- bc561eb332
2024-07-04 12:24:51 +10:00
Jarek Radosz
9adcc4ac91
DEV: Do not run theme QUnit in parallel (#27576)
Running in parallel seems to cause (unexplained so far) timeouts
2024-06-24 01:14:26 +02:00
Jarek Radosz
12661ece97
DEV: Run flake check only on discourse/discourse (#27350)
script/get_github_workflow_run_job_id.rb would fail on forks anyway
2024-06-05 18:30:37 +02:00
Jarek Radosz
0b7563b804
DEV: Fix the order of operations in themes-frontend (#27317)
Previously "themes frontend" CI job would:

1. pull compatible versions of themes that happened to be in the base image
2. clone all official themes (overriding the compatible versions from 1.)
3. run tests
2024-06-04 15:16:44 +02:00
Loïc Guitaut
2a28cda15c DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
Alan Guo Xiang Tan
67a7b28096
DEV: Don't run discourse-ai plugin specs when running against stable (#27095)
`discourse-ai` has custom gems which need to be bumped in order to be
compatible with Ruby 3.3. However, its version is pinned so we can't
pull in the commits in which upgrades the gems to be compatible with
Ruby 3.3. Just avoid running the specs on `stable` branch for now until
we release a new stable.
2024-05-21 12:09:40 +08:00
Alan Guo Xiang Tan
34c527d694
DEV: Pull compatible themes in tests workflow (#27093)
This commit adds a step in our tests workflow on Github actions to update the themes to
use the compatible version when not running aginast the `main` branch.
This is to ensure that we are not running
the tests for themes against an incompatible version of Discourse.
2024-05-21 10:38:41 +08:00
David Taylor
f74983e2e1
DEV: Enable 'cheap source maps' in GitHub CI (#26933)
This seems to save ~7s in core build time. I also tried disabling sourcemaps completely, but it didn't bring any additional benefit.
2024-05-08 10:28:07 +01:00
David Taylor
dcd994a9f1
DEV: Drop workbox dependency (#26735)
This service-worker caching functionality was disabled by default in 1c58395bca, and the setting to re-enable was marked as experimental. Now we are dropping all the related logic.
2024-04-24 10:19:12 +01:00
David Taylor
9b2628e469
DEV: Group workbox updates in dependabot (#26734) 2024-04-24 09:48:47 +01:00
Gerhard Schlager
d286c1d5a1
DEV: Prepare new structure for migrations-tooling (#26631)
* Moves existing files around. All essential scripts are in `migrations/bin`, and non-essential scripts like benchmarks are in `migrations/scripts`
* Dependabot configuration for migrations-tooling (disabled for now)
* Updates test configuration for migrations-tooling
* Shorter configuration for intermediate DB for now. We will add the rest table by table.
* Adds a couple of benchmark scripts
* RSpec setup especially for migrations-tooling and the first tests
* Adds sorting/formatting to the `generate_schema` script
2024-04-15 18:47:40 +02:00