Commit Graph

55624 Commits

Author SHA1 Message Date
95b09dd777 DEV: Log live slots of Sidekiq jobs (#28600)
Introduce a new log line for Sidekiq jobs that consume more than
`DISCOURSE_LIVE_SLOTS_SIDEKIQ_LIMIT` live slots. This is useful to
track down jobs that may leak memory.

This is enabled only when Sidekiq's job instrumenter is enabled (set
`DISCOURSE_LOG_SIDEKIQ` to `1`).
2024-08-29 12:23:27 +03:00
c760b30190 DEV: Redirect /theme-tests to /theme-qunit (#28617)
The name `/theme-qunit` comes from the days when we served the main qunit tests at `/qunit`. Nowadays, with ember-cli, the core tests are on `/tests`, so `/theme-tests` makes more sense, and might be what people think to try.

Changing the name would be a fairly large refactor. But we can add a redirect very easily.
2024-08-29 09:48:47 +01:00
bfad9a7170 DEV: Gracefully handle an array of IDs passed to Topics#show (#28631)
We're seeing a lot of log noise coming from unhandled exceptions stemming from requests to TopicsController#show where id is passed in as an array.

In the implementation of the method, we assume that if id is present it will be a string. This is because one of the routes to this action uses :id as a URL fragment, and so must be a string. However, there are other routes that go to this endpoint as well. Some of them don't have this URL fragment, so you can pass an arbitrary id query parameter.

Instead of a downstream unhandled exception, we raise a Discourse::InvalidParameters upfront.
2024-08-29 14:22:42 +08:00
0ee68b3583 FIX: Use .login-right-side instead of .has-alt-auth (#28628) 2024-08-29 16:09:02 +10:00
08b60cfd73 DEV: Fix app-cache key not considering number of parallel database (#28629)
This is a follow-up to 8adc484804f67672cbed82dcdf4f2615e8831af9
2024-08-29 13:03:21 +08:00
8adc484804 DEV: Fix app-cache regression in tests workflow (#28626)
This regressed in b83a2a34a4cb303b5b4936a325d93e1c63f5d214 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
1d29c5f06a Build(deps): Bump net-imap from 0.4.14 to 0.4.15 (#28619)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.4.14 to 0.4.15.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.4.14...v0.4.15)

---
updated-dependencies:
- dependency-name: net-imap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:29:51 +08:00
d45d315a26 Build(deps-dev): Bump @swc/core from 1.7.18 to 1.7.21 (#28618)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.18 to 1.7.21.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.7.18...v1.7.21)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:29:15 +08:00
538b91e449 Build(deps): Bump google-protobuf from 4.27.3 to 4.28.0 (#28620)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 4.27.3 to 4.28.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: google-protobuf
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:28:51 +08:00
39413c0ebf Build(deps-dev): Bump selenium-webdriver from 4.23.0 to 4.24.0 (#28621)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.23.0 to 4.24.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.23.0...selenium-4.24.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:28:29 +08:00
6d1b652d38 Build(deps-dev): Bump selenium-devtools from 0.127.0 to 0.128.0 (#28622)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.127.0 to 0.128.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-devtools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:28:16 +08:00
80fd562aff Build(deps): Bump highline from 3.1.0 to 3.1.1 (#28623)
Bumps [highline](https://github.com/JEG2/highline) from 3.1.0 to 3.1.1.
- [Changelog](https://github.com/JEG2/highline/blob/master/Changelog.md)
- [Commits](https://github.com/JEG2/highline/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: highline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:27:36 +08:00
b90b56f953 FIX: do not enforce 2fa when an account is created with OAuth (#28625)
In this PR we introduced a new setting `enforce_second_factor_on_external_auth` which disables enforce 2FA when the user is authenticated with an external provider.

https://github.com/discourse/discourse/pull/27506

However, with the first registration with an external provider, we authenticate the user right after activation. In that case, we need to also keep information that the user was authenticated with an external OAuth provider.
2024-08-29 11:19:04 +10:00
715f49c3fe FEATURE: Post created/edited trigger can skip posts created via email (#28615) 2024-08-28 17:34:35 -03:00
6f91014d64 FIX: correctly filter user bookmarks (#28612)
We were not updating `searchTerm` when changing the input which was making us always send an empty q parameter.

This commit is also adding tests for:
- initial url with q param
- filtering the bookmarks through the input
2024-08-28 15:39:07 -04:00
5df3aa66c8 DEV: Update registerUnbound() to native class syntax (#28613) 2024-08-28 19:06:14 +01:00
efa08658be DEV: Convert badge & preferences controllers to native class syntax (#28608)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 17:18:22 +01:00
7210f36801 DEV: Convert eyeline & posts-with-placeholders to native class syntax (#28609) 2024-08-28 17:06:34 +01:00
a0d2cb052e DEV: Convert raw-views to native class syntax (#28607)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 17:05:24 +01:00
cb883ceb74 DEV: Convert wizard components to native class syntax (#28606)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:48:21 +01:00
8cc6b214dd DEV: Convert core components to native class syntax (batch 9) (#28604)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:25:29 +01:00
2e5502c417 FIX: Restore propertyEqual following native-class conversions (#28605)
I mistakenly replaced these with `@equal`, thinking the behavior was the same. It's not. `@propertyEqual` compares two properties, while `@equal` compares a single property with a constant.
2024-08-28 16:20:16 +01:00
54b281c4a2 DEV: Convert core components to native class syntax (batch 8) (#28602)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:20:04 +01:00
4150ec960e DEV: Convert core components to native class syntax (batch 7) (#28603)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:15:13 +01:00
d26d45540e DEV: Use run_successfully matcher in service specs 2024-08-28 16:30:09 +02:00
0977f9fb47 FIX: correctly render ace editor in FormKit (#28601)
Im not sure when, but hierarchy changed and style were not correctly applied.
2024-08-28 16:24:44 +02:00
c95f9dbf34 FIX: poll ensure ranked choice results can handle options with rich text and links (#28195)
cf. https://meta.discourse.org/t/links-in-ranked-choice-polls-do-not-render-correctly-in-results-view/319098
2024-08-28 15:48:50 +02:00
c4428715b5 DEV: Convert core components to native class syntax (batch 6) (#28598)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:34:02 +01:00
77d4b3304e DEV: Convert core components to native class syntax (batch 5) (#28597)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:32:56 +01:00
935cbbb6a9 DEV: Convert core components to native class syntax (batch 4) (#28595)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:32:41 +01:00
2bc30bd7b8 DEV: Update DiscourseRoute and ApplicationRoute to native class syntax (#28594)
Changes made using the ember-native-class-codemod, plus some manual tweaks

Also ensures our implicit injections applied to the prototype immediately. Without this, they will only be applied on the next `.extend()` call, which is now later than the first native-class extension.
2024-08-28 13:05:06 +01:00
b092ccbdc5 UX: Add progress bar to the registration flow (#27694) 2024-08-28 08:43:39 -03:00
3a04443632 FIX: Sum pageviews with number instead of string (#28596)
When the tooltip items are tooltipItem = [{parsed: {y:12} }, {parsed: {y:10} } ], reducing without a initial value as a number would result in Javascript thinking it is a string. Thanks, Javascript!

There are no tests here yet since this makes use of an external library Chart.js.
2024-08-28 19:24:57 +08:00
480f26a2c2 DEV: Await for ace render in tests (#28586)
Why all the manual setting of `width` and `height`? Without it all ace editors were 0x0, invisible.

Why didn't it affect the tests before? ace-editor tests only confirms that there is an element, theme-settings-editor tests were effectively unit tests before 7317b5a, fk-code test avoids interacting with ace.
2024-08-28 11:24:30 +02:00
80449d39d3 FIX: Flaky flags spec (#28591)
Because of caching, whenever flags are created, they have to be destroyed to not modify the state.
2024-08-28 17:03:43 +10:00
4f0fe92195 UX: Add group link to category permission row (#28560)
Makes it easier to reach the group from the category security
tab, and moves the trash button to the right to avoid misclicks.

Also converts the category permission row to gjs
2024-08-28 16:11:16 +10:00
78e9922a84 FIX: correctly apply translate mod key (#28520)
We were applying it separately on each part of the shortcut when it needs to be applied once on the whole shortcut.
2024-08-28 15:17:40 +10:00
f2121cc437 Build(deps): Bump omniauth-oauth from 1.2.0 to 1.2.1 (#28590)
Bumps [omniauth-oauth](https://github.com/intridea/omniauth-oauth) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/intridea/omniauth-oauth/releases)
- [Commits](https://github.com/intridea/omniauth-oauth/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: omniauth-oauth
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-28 00:26:44 +02:00
ddc29be20b Build(deps): Bump uri from 0.13.0 to 0.13.1 (#28589)
Bumps [uri](https://github.com/ruby/uri) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/ruby/uri/releases)
- [Commits](https://github.com/ruby/uri/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: uri
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-28 00:23:50 +02:00
6136a275dd DEV: Fix an on import deprecation (#28588) 2024-08-27 21:56:04 +02:00
c8f5445030 Revert "DEV: Removal of create_post_for_category_and_tag_changes setting (#28…" (#28587)
This reverts commit fc33826dc55e1e6427eea7adb005e4aed45ccba5.
2024-08-27 16:19:51 -03:00
ade898a7ca UX: fix spacing in topic map views menu (#28583) 2024-08-27 13:23:03 -04:00
7317b5a120 DEV: Update theme-settings-editor tests (#28582)
Convert them to proper integration tests.
2024-08-27 18:47:24 +02:00
ee3b175373 DEV: Ignore invalid tag parameter in TagsController (#28557)
This had no effect in the app, but it was resulting in errors in the logs.
2024-08-27 12:06:54 -04:00
f405c021eb Bump version to v3.4.0.beta2-dev 2024-08-27 10:54:25 -04:00
85abac4230 Bump version to v3.4.0.beta1 v3.4.0.beta1 2024-08-27 10:54:25 -04:00
7bf3727663 DEV: Convert core components to native class syntax (batch 3) (#28517)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-27 15:28:08 +01:00
9b83ae7d55 DEV: Update ace-editor tests, minor tweaks to component (#28579) 2024-08-27 16:27:52 +02:00
66b061a5a8 DEV: Convert core components to native class syntax (batch 2) (#28515)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-27 15:00:46 +01:00
31c0a08f8a DEV: Fix RSpec service matchers when a model is not found
This is a follow-up of d749227e87bfc5df96a5b2fbace7601a83351633.

This patch checks if the key `not_found` is present on the result object
instead of calling `#blank?` on the model, as it can trigger an
`ActiveRecord` relation.
2024-08-27 15:35:40 +02:00