[pull] master from mattermost:master#646
Merged
pull[bot] merged 3 commits intocode:masterfrom Apr 21, 2026
Merged
Conversation
* ci: move FIPS and binary params tests to weekly schedule Move low-regression-risk test suites out of the per-push/PR Server CI workflow into a new weekly scheduled workflow (Monday 1am EST / 5am UTC): - Postgres with binary parameters (1x 8-core runner) - Postgres FIPS sharded tests (4x 8-core runners + merge job) - mmctl FIPS tests (1x 8-core runner) This reduces the per-push 8-core runner demand from 14 concurrent jobs to 5 (4 Postgres shards + 1 ES), which should significantly reduce queue times that currently reach 90+ minutes during peak hours. The weekly workflow also supports workflow_dispatch for manual triggering when urgent FIPS or binary parameter verification is needed. #### Release Note ```release-note NONE ``` Co-authored-by: Claude <claude@anthropic.com> * ci: move coverage shards to 2-core runners Add a 'runner' input to server-test-template.yml (defaults to ubuntu-latest-8-cores for backward compatibility) and set coverage shards to ubuntu-22.04 (2-core). Coverage is non-blocking (allow-failure: true) so longer runtime doesn't impact PR feedback. Estimated ~20-30 min per shard on 2-core vs ~7-9 min on 8-core, but frees 4 more 8-core slots per push. Combined with the FIPS/binary-params weekly move, per-push 8-core demand drops from 14 → 4 (just the Postgres test shards + ES v8). Co-authored-by: Claude <claude@anthropic.com> * ci: decouple race detector from binary params, add nightly race job The race detector was accidentally bundled with binary params via the fullyparallel=false → RACE_MODE coupling in the test template. These test different things: - Binary params: Postgres driver binary encoding mode - Race detector: Go data race detection Changes: - Add explicit 'race-enabled' input to server-test-template.yml - Remove implicit fullyparallel→race coupling from template - Binary params now runs with fullyparallel: true (default) - New server-ci-nightly-race.yml runs -race nightly at 2am EST on ubuntu-22.04 (2-core) to avoid 8-core contention Co-authored-by: Claude <claude@anthropic.com> * ci: add push trigger for release-* branches to weekly workflow FIPS and binary params validation must run automatically on release branch pushes, not just on the weekly schedule. Without this trigger, release branches would lose FIPS/binary coverage entirely. Co-authored-by: Claude <claude@anthropic.com> * ci: use ET instead of EST in schedule comments Cron runs at fixed UTC times regardless of DST. Use ~ET to avoid implying exact EST/EDT correspondence. Co-authored-by: Claude <claude@anthropic.com> * ci: restore conditional FIPS on per-push, unshard weekly FIPS Per review feedback from @lieut-data: 1. Restore FIPS jobs in server-ci.yml with conditional execution: run on all pushes (master/release) and on PRs when go.mod changed or branch name contains 'fips'. This ensures Go upgrades and explicit FIPS work get immediate feedback. 2. Remove sharding from weekly FIPS — no speed pressure on a weekly schedule, so a single unsharded job is simpler (eliminates the 4-shard matrix + merge job). 3. Restore gomod-changed detection step in the go job. Both per-push (conditional, unsharded) and weekly (unconditional, unsharded) FIPS runs use single jobs now, reducing complexity. Co-authored-by: Claude <claude@anthropic.com> * ci: restore FIPS sharding for PR runs, remove from push events FIPS tests in server-ci.yml now only trigger on PRs where the branch name contains 'fips' or go.mod changed. Sharding (4 shards + merge) restored for fast iteration on FIPS-related PRs. Regular FIPS coverage provided by the weekly workflow (unsharded). This addresses lieut-data's review feedback to restore sharding where it matters most: during active PR iteration. Co-authored-by: Claude <claude@anthropic.com> * ci: add explicit permissions to weekly and nightly workflows Set minimum required permissions (contents: read) on both new workflow files per review feedback. Reusable workflows called via 'uses' inherit the caller's permissions. Co-authored-by: Claude <claude@anthropic.com> * ci: keep coverage shards on 8-core runners Comment out the 2-core runner override for coverage shards per Eva's feedback. Coverage stays on the default 8-core runners. Co-authored-by: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
* fix(tests): widen ChannelMemberHistory time windows (MM-67041, MM-67037) The 100ms query window (GetMillis()-100 to GetMillis()+100) is too tight under CI load — DB writes can lag >100ms, causing the history record to fall outside the window. Widen to ±10s and capture start time before the operation. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): use require.Eventually for DND status restore (MM-63533) Replace time.Sleep(3s) + instant assert with require.Eventually polling (15s timeout, 500ms interval). The recurring task runs every 1s but can lag under CI load, making the fixed sleep unreliable. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): fix PostReminder timing and increase WS timeout (MM-60329) Set target time 1s in the future instead of now, giving the reminder processor a clear tick to pick it up. Increase WebSocket wait from 5s to 15s for CI load tolerance. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): add error checks and poll for file infos (MM-46902) File info association with posts can be async. Replace instant assertion with require.Eventually polling. Also add proper error checking on UploadFile and CreatePost calls. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): fix thread membership race and WS timeout (MM-41285) Replace instant GetUserThread assertion with require.Eventually polling (10s timeout) since mention counts may not propagate immediately after AddChannelMemberWithRootId. Increase WebSocket timeout from 2s to 15s. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): use far-future timestamps in GetUptoNSizeFileTime (MM-53905) PermanentDeleteBatch only cleans up to current time, and parallel tests can create file infos that interfere with the cumulative size calc. Extend the delete window and use timestamps 1 hour in the future to ensure these test files are always 'most recent'. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): use far-future timestamps in GetNthRecentPostTime (MM-64438) GetNthRecentPostTime queries by global position across all posts. Parallel tests creating posts shift the Nth position. Using timestamps 1 hour in the future ensures these test posts are always most recent. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): space reply timestamps for unread count test (MM-41797) makeSomePosts creates all posts without explicit CreateAt, so they can share the same millisecond. MarkAsRead(rootPost.CreateAt) then marks replies as read too, returning 0 instead of 2. Fix by overwriting reply timestamps to be 1s after the root post. Co-authored-by: Claude <claude@anthropic.com> * test: re-enable MM-62895 and MM-61041 to probe for failures Remove t.Skip for two long-dormant flaky tests to collect actual failure data over 1-2 weeks of rebasing. Based on fullyparallel branch so these run with every CI pass. - MM-62895: TestUpdateOAuthApp (14mo, empty Jira, unknown root cause) - MM-61041: TestAutocompleteUsersInChannel (17mo, fragile integration test) Co-authored-by: Claude <claude@anthropic.com> * test: add MM-64687 shared channel tests to probe Remove t.Skip("MM-64687") from 5 shared channel sync tests to collect failure data. The underlying sync mechanism was completely rewritten in #35619 (ChannelMemberHistory cursor-based sync), so the original race condition may no longer exist. Probing for 1-2 weeks before deciding whether to permanently re-enable in #35762. Tests: - api4/shared_channel_metadata_test.go (4 subtests) - app/shared_channel_membership_sync_self_referential_test.go (1 subtest) Co-authored-by: Claude <claude@anthropic.com> * test: re-enable TestResetPassword (stale skip from old build server) The skip comment says 'should be investigated' — the test uses the same inbucket mail pattern as other working tests (e.g. TestInviteUsersToTeam). The 'old build server changes' it references are long resolved. Co-authored-by: Claude <claude@anthropic.com> * fix(tests): clean up far-future posts in GetNthRecentPostTime Per review feedback from mgdelacroix: defer PermanentDelete for all far-future posts so they don't leak into other tests that query GetNthRecentPostTime. The file_info_store test (GetUptoNSizeFileTime) already had cleanup via defer PermanentDelete. Co-authored-by: Claude <claude@anthropic.com> * ci: TEMPORARY enable race detector for PR testing (revert after) Co-authored-by: Claude <claude@anthropic.com> * fix(tests): add mutex to fix data race in shared channel sync test The -race detector caught a data race in Test_4 (Sync failure and recovery): the OnBatchSync/OnIndividualSync callbacks write to successfulSyncs from the HTTP handler goroutine while assert.Eventually reads it from the test goroutine. Add sync.Mutex to protect all accesses to the shared slice. Co-authored-by: Claude <claude@anthropic.com> * fix(test): add mutex to TestSharedChannelPostMetadataSync for race safety The syncedPosts/syncedPostsServerA/syncedPostsServerB slices are written by OnPostSync callbacks running on HTTP server goroutines and read by require.Eventually + assertions on the test goroutine. Without synchronization, the race detector flags concurrent access. Add sync.Mutex per subtest to protect all slice reads and writes, matching the pattern used in TestSharedChannelMembershipSyncSelfReferential. Co-authored-by: Claude <claude@anthropic.com> * Revert "ci: TEMPORARY enable race detector for PR testing (revert after)" This reverts commit b9af0e9. * fix: address review feedback from wiggin77 - Remove eager-evaluated len(infos) from require.Eventually message (was always 0 since infos is nil at call time) - Log errors from PermanentDelete in test cleanup Co-authored-by: Claude <claude@anthropic.com> * fix: rename shadowed err variable in test cleanup Use delErr to avoid shadowing the outer err variable, which triggers govet's shadow checker in CI. Co-authored-by: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
* ci: add yamllint workflow to detect duplicate YAML keys Add a yamllint check for workflow files to catch duplicate keys that YAML parsers silently accept but GitHub Actions rejects on the default branch. Release Note NONE Co-authored-by: Claude <claude@anthropic.com> * ci: address review feedback on yamllint workflow - Add permissions: contents: read (least privilege) - Bump checkout to v6.0.2 with persist-credentials: false - Remove pip install step (yamllint is pre-installed on ubuntu-22.04) Co-authored-by: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )