Skip to content

v1.25.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Jul 19:32

FerretDB v1 (SQLite) multi-platform binaries β€” ferretdb.zip. Built by release-all.yml from the wekan/FerretDB fork.

v1.25.0 (2026-07-10)

New Features πŸŽ‰

  • Implement the replSetInitiate command as a compatibility no-op so that tools and drivers that bootstrap a replica set do not hard-fail: the command is accepted with or without a configuration document ({replSetInitiate: 1} or {replSetInitiate: {_id: "rs0", members: [...]}}) and returns {ok: 1}, echoing back the configuration _id (replica set name) when one is supplied. IMPORTANT: this does NOT set up real replication β€” FerretDB v1's oplog is tailing-only and must still be configured manually by creating a capped local.oplog.rs collection and setting the FERRETDB_REPL_SET_NAME environment variable; the command creates no oplog, elects no primary and does not change server topology by @xet7 in ed98fa8 . Thanks to xet7.
  • Implement the logical session and transaction command family as compatibility commands so MongoDB drivers (and Meteor) that rely on sessions and retryable writes work against the SQLite backend: startSession returns a session record with a freshly generated UUID, and commitTransaction, abortTransaction, endSessions, refreshSessions, killSessions, killAllSessions and killAllSessionsByPattern return {ok: 1}. The ordinary write commands (insert, update, delete, findAndModify) now also accept and ignore the retryable-write / session fields autocommit, startTransaction, stmtId and stmtIds in addition to the already-accepted lsid and txnNumber. IMPORTANT: these transaction commands are NO-OP compatibility commands β€” FerretDB v1 with the SQLite backend has no real multi-document transactions, every write auto-commits on its own, and the commands provide no atomicity or isolation across operations (abortTransaction does not roll back writes that already happened); logical sessions are accepted but carry no server-side state by @xet7 in c229095 . Thanks to xet7.
  • Track logical sessions in a real server-side session registry (ported and adapted from FerretDB v2's internal/handler/session package) instead of treating the session commands as pure no-ops: the handler now owns a session.Registry that creates and looks up sessions by lsid, groups them per user, records their created and last-used times, marks sessions as ended and prunes ended/expired sessions after the 30-minute LogicalSessionTimeoutMinutes. startSession registers a fresh session, endSessions marks the referenced sessions ended, refreshSessions bumps their last-used time (creating them implicitly if needed), and killSessions, killAllSessions and killAllSessionsByPattern remove the referenced sessions from the registry β€” all still returning {ok: 1}. The v2 cursor-association tracking is intentionally omitted because v1's cursor registry differs, so the port keeps the session lifecycle only. IMPORTANT: this only tracks session bookkeeping β€” multi-document transactions remain NO-OP compatibility commands, as FerretDB v1 with the SQLite backend auto-commits every write and provides no atomicity or isolation by @xet7 in 166770d . Thanks to xet7.
  • Implement the $setWindowFields aggregation stage together with the window operators $rank, $denseRank, $documentNumber and $shift (rank/position, requiring sortBy) and the window accumulators $sum, $avg, $min, $max, $count, $push, $first, $last, $stdDevPop and $stdDevSamp (over the default full-partition window or an explicit window: {documents: [lower, upper]} with integer offsets and the "unbounded"/"current" keywords). The window operators $derivative, $integral, $expMovingAvg, $covariancePop, $covarianceSamp, $linearFill, $locf, $minN/$maxN and range windows are deferred and return a clear not-implemented error by @xet7 in 540de30 . Thanks to xet7.
  • Implement the $slice, $sort and $position modifiers for the $push update operator (used by WeKan) by @xet7. Thanks to xet7.
  • Implement the $eq, $ne, $or, $ifNull, $anyElementTrue, $objectToArray and $map aggregation expression operators used by WeKan by @xet7. Thanks to xet7.
  • Implement the $cmp, $gt, $gte, $lt, $lte, $and, $not, $cond, $switch and $allElementsTrue aggregation expression operators by @xet7. Thanks to xet7.
  • Implement the arithmetic aggregation expression operators $add, $subtract, $multiply, $divide, $mod, $abs, $ceil, $floor, $trunc, $round, $pow, $sqrt, $exp, $ln, $log, $max, $min and $avg by @xet7. Thanks to xet7.
  • Implement the trigonometric, hyperbolic, angle-conversion and $log10 aggregation expression operators $sin, $cos, $tan, $asin, $acos, $atan, $atan2, $sinh, $cosh, $tanh, $asinh, $acosh, $atanh, $degreesToRadians, $radiansToDegrees and $log10 by @xet7 in 62a683e . Thanks to xet7.
  • Implement the $bsonSize aggregation expression operator, which returns the size in bytes of the BSON encoding of a document (null for a null argument) by @xet7 in 84d798e . Thanks to xet7.
  • Implement the string aggregation expression operators $concat, $toUpper, $toLower, $strLenCP, $strLenBytes, $strcasecmp, $substr, $substrCP, $substrBytes, $split, $trim, $ltrim, $rtrim, $indexOfCP, $indexOfBytes, $replaceOne, $replaceAll and $regexMatch by @xet7. Thanks to xet7.
  • Implement the array aggregation expression operators $size, $arrayElemAt, $concatArrays, $isArray, $in, $reverseArray, $slice, $range, $indexOfArray, $arrayToObject, $filter, $reduce, $sortArray, $setUnion, $setIntersection, $setDifference, $setEquals, $setIsSubset and $zip by @xet7. Thanks to xet7.
  • Implement the type-conversion aggregation expression operators $toString, $toInt, $toLong, $toDouble, $toBool, $toObjectId, $toDate, $convert, $isNumber, $literal, $let, $getField, $setField, $unsetField, $binarySize and $rand by @xet7. Thanks to xet7.
  • Implement the date aggregation expression operators $year, $month, $dayOfMonth, $hour, $minute, $second, $millisecond, $dayOfWeek, $dayOfYear, $week, $isoDayOfWeek, $isoWeek, $isoWeekYear, $dateToString, $dateFromString, $dateToParts, $dateFromParts, $dateAdd, $dateSubtract, $dateDiff and $dateTrunc by @xet7. Thanks to xet7.
  • Implement the $lookup aggregation stage (basic equality-join form) used by WeKan by @xet7. Thanks to xet7.
  • Implement the $replaceRoot, $replaceWith, $sortByCount and $sample aggregation stages by @xet7. Thanks to xet7.
  • Implement the $facet aggregation stage (multi-sub-pipeline) by @xet7. Thanks to xet7.
  • Implement the $unionWith aggregation stage (with optional sub-pipeline) by @xet7. Thanks to xet7.
  • Implement the $bucket and $bucketAuto aggregation stages (the $bucketAuto granularity option is not yet supported) by @xet7. Thanks to xet7.
  • Implement TTL indexes (expireAfterSeconds on createIndexes, reported by listIndexes, with a background reaper that deletes expired documents) by @xet7. Thanks to xet7.
  • Implement the $where query operator, which evaluates a JavaScript expression or function against each document (with this bound to the document) using the embedded pure-Go goja JavaScript engine by @xet7 in dd4dafe . Thanks to xet7.
  • Implement the $function aggregation expression operator ({body, args, lang: "js"}), which runs a user-supplied JavaScript function over the evaluated argument expressions using the embedded pure-Go goja JavaScript engine by @xet7 in dd4dafe . Thanks to xet7.
  • Implement text indexes: createIndexes now accepts the "text" index key value and the weights, default_language, language_override and textIndexVersion options, storing them so the index is created and round-tripped through listIndexes (weights default to 1 per field). Note that this is a pragmatic implementation for compatibility: no real inverted/full-text index is built by @xet7 in 21ed802 . Thanks to xet7.
  • Implement the $text query operator with partial, self-contained semantics: it matches the $search terms directly against a document's string fields (recursing into sub-documents and arrays) and supports multi-term OR, case-insensitive whole-word matching, $caseSensitive, double-quoted phrases and leading - negation; $language and $diacriticSensitive are accepted and ignored. There is no stemming, no relevance scoring and no $meta: "textScore" projection by @xet7 in 21ed802 . Thanks to xet7.
  • Accept the hidden, collation, partialFilterExpression and 2dsphere index options on createIndexes: hidden (bool), collation (document) and partialFilterExpression (document) are stored and round-tripped through listIndexes, and the "2dsphere" index key value together with 2dsphereIndexVersion is accepted and reported (version defaulting to 3). These options are only accepted, stored and reported β€” FerretDB does not hide indexes from the query planner, does not apply locale-aware collation, does not restrict a partial index to matching documents and does not run geospatial queries. The remaining options (storageEngine, bits, min, max, bucketSize, wildcardProjection) still return not-implemented by @xet7 in 13e8f22 . Thanks to xet7.

Other Changes πŸ€–

  • Add a release-all.yml GitHub Actions workflow that does a full FerretDB v1 release: it builds ferretdb.zip for every platform with build.sh, publishes a GitHub Release with it at https://github.com/wekan/FerretDB/releases, and builds + pushes a multi-arch FerretDB Docker image (amd64, arm64, ppc64le, s390x, riscv64) from the source Dockerfile to wekanteam/ferretdb, quay.io/wekan/ferretdb and ghcr.io/wekan/ferretdb β€” using the same DOCKERHUB_AUTH / QUAY_AUTH / GHCR_AUTH base64("user:token") secrets as wekan/wekan by @xet7 in 67262f0 . build.sh gains option 13 / ./build.sh release [version] to push the branch and trigger that workflow via gh, like wekan/wekan's releases/release-all.sh. Thanks to xet7.
  • Add build.sh menu options 11 (SEQUENTIAL) and 12 (PARALLEL) β€” and the non-interactive ./build.sh zip / zip-seq / zip-par commands β€” that cross-compile FerretDB v1 (SQLite backend, CGO_ENABLED=0, no QEMU) for every platform Go and modernc.org/sqlite support into a single ferretdb.zip with the layout ferretdb/<arch>/ferretdb-<arch> (.exe only on Windows, binaries already chmod +x) plus ferretdb/README.md; targets that do not compile are skipped, so the zip holds exactly what builds. The build was run and all 16 targets compiled: amd64, arm64, armhf, armel, i386, ppc64le, s390x, riscv64, loong64, win64, win-arm64, win32, mac-amd64, mac-arm64, freebsd-amd64, freebsd-arm64. Go's build scratch dir (GOTMPDIR) is placed on the repo disk so a parallel build does not fill a small /tmp tmpfs, and .gitignore ignores the produced ferretdb.zip by @xet7 in 05fa6ee . Thanks to xet7.
  • Fix the SQLite backend unit tests after the modernc.org/sqlite bump: the embedded SQLite moved from 3.46.0 to 3.53.2, so update the expected sqlite_version() / BackendVersion (3.46.0 β†’ 3.53.2) and sqlite_source_id() in pool_test.go, registry_test.go and backend_test.go, and run build.sh unit tests with -tags=ferretdb_debug (the tag task test-unit uses) so the debug-only assertions pass β€” e.g. TestCheckError, which asserts debugbuild.Enabled by @xet7 in e566dee . Thanks to xet7.
  • Add an interactive build.sh helper for FerretDB v1 (SQLite): a menu-driven (and non-interactive ./build.sh <command>) script to install dependencies, build the ferretdb binary with the SQLite handler, run FerretDB on the SQLite backend, run the in-process SQLite integration tests (with the required -target-tls flag), run unit tests, vet, build/run the Docker stack, and clean; it self-installs a local Go 1.25 toolchain under ./.goroot when go is not on PATH. Integration tests can be run sequentially (test-seq, -p 1 -parallel 1) or in parallel (test-par [N] / TEST_PARALLEL=N, defaulting to the CPU count) by @xet7 in adc3473d . Thanks to xet7.
  • Add positive and negative integration tests for the $pullAll update operator, used by WeKan (already implemented upstream) by @xet7. Thanks to xet7.
  • Add docker-compose.yml and Dockerfile so docker compose up --build builds FerretDB v1 (SQLite backend) and runs WeKan against it (no oplog, METEOR_REACTIVITY_ORDER=polling, attachments on filesystem); the previous FerretDB development compose is preserved as docker-compose.dev.yml by @xet7 in ed7a4df1 . Thanks to xet7.
  • Update all Go dependencies to their latest releases (grpc, protobuf, OpenTelemetry, golang.org/x/{crypto,net,sys,text}, go.mongodb.org/mongo-driver, testify and procfs) and bump the go directive from 1.24 to 1.25 by @xet7 in 7549f63 . Thanks to xet7.
  • Update the SQLite backend driver modernc.org/sqlite v1.32.0 β†’ v1.53.0 (and modernc.org/libc v1.55.3 β†’ v1.74.0), which requires Go 1.25 by @xet7 in 7549f63 . Thanks to xet7.
  • Keep github.com/FerretDB/wire pinned at v0.0.8, because newer releases change the internal BSON API (GetByIndex, Sections, CheckNaNs) used by this v1.24.2 codebase by @xet7 in 7549f63 . Thanks to xet7.