Skip to content

[pull] master from mattermost:master#707

Merged
pull[bot] merged 3 commits into
code:masterfrom
mattermost:master
May 15, 2026
Merged

[pull] master from mattermost:master#707
pull[bot] merged 3 commits into
code:masterfrom
mattermost:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 15, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

vish9812 and others added 3 commits May 15, 2026 16:33
* MM-67771 Update Report a Problem to email flow for licensed servers

Change the default "Report a Problem" behavior for licensed servers to
open a mailto link to reportaproblem@mattermost.com with pre-filled
metadata instead of redirecting to the support portal. Unlicensed servers
continue to redirect to the troubleshooting forums. Admin console help
text is now license-aware with separate descriptions for each plan type.

* Add isFreeEdition check for Report a Problem flow

Treat both unlicensed servers and licensed servers with entry SKU as
free edition. This affects the Report a Problem default behavior
(forum redirect vs mailto) and the admin console help text shown.

- Add isFreeEdition to general.ts selectors and admin_definition_helpers
- Add SKUEntry constant to general constants
- Reuse isFreeEdition in product_menu.tsx
- Add entry SKU test case for report_a_problem

* Add the link to forums for free edition

* Add permission and restricted-mode guards to ReportAProblemType dropdown

The ReportAProblemType dropdown was missing the write-permission check
and RestrictSystemAdmin guard that all other fields in the section have.
* Remove QueryRowx (no-timeout) from sqlxDBWrapper; migrate caller to QueryRowX

QueryRowx forwarded to context.Background() with no timeout, while QueryRowX
(uppercase) already enforces the wrapper timeout. Removing the no-timeout
variant eliminates an accidental footgun and migrates the one sqlstore caller
(plugin_store) to the timeout-enforcing method.

* sqlxRow, with timeout cancel after Scan

Introduce sqlxRow, which pairs *sqlx.Row with its context cancel function.
QueryRowX (on both sqlxDBWrapper and sqlxTxWrapper) now returns *sqlxRow;
Scan calls cancel immediately after the row is consumed, releasing the
timeout context as soon as possible rather than waiting for the timer.

* sqlxRows, with timeout cancel on Close

Introduce sqlxRows, which embeds *sqlx.Rows and holds the timeout context's
cancel function. Close() cancels the context immediately after the rows are
done, releasing timeout resources as soon as iteration completes rather than
waiting for the timer to fire.

Introduce rowScanner interface (Next/Scan/Err) so the internal helpers
scanRowsIntoMap and scanRetentionIdsForDeletion accept any row iterator
rather than the concrete *sql.Rows, accommodating the new return types
without threading *sqlxRows through every caller.

* abolish the X suffix altogether

* delete unused NamedQuery

* add timeout tests for Query and QueryRow on db and tx wrappers

* fix tx/timeout tests: handle pq driver.ErrBadConn on killed connection

* fixup! fix tx/timeout tests: handle pq driver.ErrBadConn on killed connection

* override Next() on sqlxRows to cancel on EOF

* rm redundant row.Err(), handled by Scan

* apply timeout to context unless deadline set

* rebind consistently

* address review feedback: rename, trace, and QueryContext fix

- Rename withQueryTimeout → ensureQueryTimeout to better convey that it
  respects existing deadlines rather than overriding them.
- Add missing w.trace blocks to QueryRowContext and ExecContext.
- Change QueryContext to use ensureQueryTimeout and return *sqlxRows
  (instead of *sql.Rows) so the cancel is deferred to Close/Next
  rather than released prematurely.

* fix Beginx → Begin after master merge

* fix golangci-lint inline warning in sqlx_wrapper_test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
@pull pull Bot locked and limited conversation to collaborators May 15, 2026
@pull pull Bot added the ⤵️ pull label May 15, 2026
@pull pull Bot merged commit fa1255f into code:master May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants