Skip to content
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
d6794c9
Update CODEOWNERS (#4)
AlekSi Feb 19, 2025
fc8f917
Add versioning tool (#3)
chilagrow Feb 19, 2025
8a85bdd
Add basic repository and Mergify configuration (#6)
AlekSi Feb 20, 2025
dfb4bdb
Build `.deb` packages on CI (#2)
chilagrow Feb 20, 2025
3cfbfa1
Set better artifact name (#7)
AlekSi Feb 21, 2025
04821c5
Install python3 for test installation image (#8)
AlekSi Feb 21, 2025
299aa44
Add release checklist (#9)
chilagrow Feb 24, 2025
aa9b69f
Merge branch 'main' into ferretdb
AlekSi Feb 24, 2025
9e6fe15
Update release checklist (#10)
AlekSi Feb 24, 2025
39ec23d
Update CHANGELOG.md
AlekSi Feb 24, 2025
ee54dd9
Update CHANGELOG (#14)
AlekSi Feb 25, 2025
64e4625
Merge branch 'main' into merge-upstream
AlekSi Feb 26, 2025
d468b9b
Merge pull request #15 from FerretDB/merge-upstream
AlekSi Feb 26, 2025
f7539ee
Merge branch 'main' into ferretdb
AlekSi Feb 27, 2025
9bca0e3
Make `.deb` package names unique (#12)
chilagrow Feb 27, 2025
8fe5219
Small tweaks (#17)
AlekSi Feb 27, 2025
d682564
Merge pull request #19 from FerretDB/main
AlekSi Feb 27, 2025
4063590
Build packages for PostgreSQL 17 (#11)
AlekSi Feb 27, 2025
c9c13d6
Define Docker build tags (#16)
chilagrow Mar 3, 2025
46b3f5a
Add and use `trust` label (#22)
AlekSi Mar 3, 2025
99efe6b
Update `defineversion` logic (#23)
AlekSi Mar 3, 2025
8d0e808
Update workflow (#24)
AlekSi Mar 3, 2025
92eb372
Prepare Docker images builds (#25)
AlekSi Mar 3, 2025
9e96940
Minor tweaks (#26)
AlekSi Mar 3, 2025
6b1b7c3
Fix Docker images building (#27)
AlekSi Mar 3, 2025
e19f7d7
Fix quay.io login
AlekSi Mar 3, 2025
bf0ebfa
Enable other registries (#28)
AlekSi Mar 3, 2025
aa5e310
Add more Docker tags (#30)
AlekSi Mar 4, 2025
a69b743
Merge pull request #31 from microsoft/main
AlekSi Mar 4, 2025
6092471
Remove `branch` from Debian package versions (#32)
AlekSi Mar 4, 2025
696c433
Prepare release (#33)
AlekSi Mar 4, 2025
f7c318c
Prepare v0.102.0-ferretdb-2.0.0 (GA) release (#37)
AlekSi Mar 5, 2025
8366073
Merge debian and docker version code (#35)
chilagrow Mar 6, 2025
b5ed892
Check control file default version (#36)
chilagrow Mar 7, 2025
4aa45ff
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Mar 19, 2025
b8cd669
Merge pull request #40 from FerretDB/merge-into-ferretdb
AlekSi Mar 25, 2025
9129ad5
Fix handling of explicit `maxTimeMS` zero values (#41)
AlekSi Mar 25, 2025
34064ee
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Mar 26, 2025
2cd740b
Merge upstream (#42)
AlekSi Mar 26, 2025
9c521eb
Fix `listDatabases` and related commands
AlekSi Mar 26, 2025
80462f5
Prepare v0.102.0-ferretdb-2.1.0 release (#44)
AlekSi Apr 2, 2025
48cf934
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Apr 7, 2025
6106bc9
Install `sudo`
AlekSi Apr 7, 2025
0122a0a
Merge upstream (#45)
AlekSi Apr 7, 2025
ce33455
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Apr 11, 2025
e4c2258
Merge upstream (#48)
AlekSi Apr 11, 2025
5ce0666
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Apr 14, 2025
da61790
Merge upstream (#49)
AlekSi Apr 14, 2025
c1a5115
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Apr 17, 2025
c501656
Merge upstream (#50)
AlekSi Apr 17, 2025
ac578a4
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Apr 23, 2025
445037d
Merge upstream (#54)
AlekSi Apr 23, 2025
7486bb9
Enable more feature toggles (#51)
AlekSi Apr 24, 2025
73c2395
Remove label that does nothing
AlekSi Apr 24, 2025
d89f70b
Normalize whitespace in build scripts
AlekSi Apr 28, 2025
9efcabf
Normalize whitespace in build scripts (#59)
AlekSi Apr 28, 2025
b66a82b
Unify `debian_files`
AlekSi Apr 29, 2025
71802fc
Unify `debian_files` (#60)
AlekSi Apr 29, 2025
bfc0b31
Unify test packages
AlekSi Apr 29, 2025
8a9e2d4
Unify test packages (#61)
AlekSi Apr 29, 2025
80c8861
Unify more packaging files
AlekSi Apr 29, 2025
149841b
Unify more packaging files (#62)
AlekSi Apr 29, 2025
0e64853
Unify build script
AlekSi Apr 29, 2025
ab79acf
Tweak help
AlekSi Apr 29, 2025
f838c59
Unify build script (#63)
AlekSi Apr 29, 2025
d4de5a3
Move packaging files (#64)
AlekSi May 2, 2025
2b0e6f9
Build arm64 .deb packages (#67)
AlekSi May 2, 2025
9492778
Fix arm64 builds, part 1 (#68)
AlekSi May 6, 2025
d321a1c
Fix arm64 builds, part 2 (#69)
AlekSi May 6, 2025
fa129dc
Bump Go (#70)
AlekSi May 9, 2025
dc41469
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi May 9, 2025
859432a
Merge upstream (#71)
AlekSi May 9, 2025
7514232
Prepare v0.103.0-ferretdb-2.2.0 release (#73)
AlekSi May 9, 2025
c45681d
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi May 9, 2025
560b14b
Merge upstream (#74)
AlekSi May 9, 2025
aa58f47
Add `barman-cli-cloud` for backups (#75)
josmo May 28, 2025
9b65832
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi May 29, 2025
4de83a0
Merge upstream (#76)
AlekSi May 29, 2025
c2757ae
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jun 9, 2025
26da990
Merge upstream (#77)
AlekSi Jun 10, 2025
2045d0e
Prepare v0.104.0-ferretdb-2.3.0 release (#78)
AlekSi Jun 10, 2025
1190e10
Provide production build docker images for branch builds (#79)
chilagrow Jun 11, 2025
21016ff
Unify production and development Dockerfiles
AlekSi Jun 11, 2025
2e4bd56
Add version annotation to Docker images (#82)
AlekSi Jun 12, 2025
601ec8a
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jun 12, 2025
7df4500
Merge upstream (#83)
AlekSi Jun 12, 2025
166d11e
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jun 16, 2025
e6a46da
Merge upstream (#84)
AlekSi Jun 16, 2025
c243168
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jun 19, 2025
53525fc
Merge upstream (#85)
AlekSi Jun 20, 2025
58193fc
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jul 15, 2025
973fd0a
Merge upstream (#86)
AlekSi Jul 15, 2025
ec5b9cc
Prepare v0.105.0-ferretdb-2.4.0 release
AlekSi Jul 15, 2025
8453d93
Prepare v0.105.0-ferretdb-2.4.0 release (#87)
AlekSi Jul 15, 2025
c0a348b
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jul 15, 2025
05182b5
Merge upstream (#88)
AlekSi Jul 16, 2025
9ccd074
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Jul 28, 2025
5b5cb57
Merge upstream (#90)
AlekSi Jul 28, 2025
09ef059
Merge CodeQL changes from upstream
AlekSi Jul 28, 2025
61e3e55
Abbreviate SHA hashes to at least 10 characters
AlekSi Jul 30, 2025
04a0257
Build RPM packages (#96)
AlekSi Aug 1, 2025
30b4da0
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Aug 11, 2025
b33e3aa
Merge upstream (#98)
AlekSi Aug 11, 2025
beb9d25
Prepare v0.106.0-ferretdb-2.5.0 release (#99)
AlekSi Aug 12, 2025
a81c65b
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Aug 13, 2025
18bd81e
Merge upstream (#100)
AlekSi Aug 13, 2025
1531831
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Aug 13, 2025
e1d37b6
Merge upstream (#101)
AlekSi Aug 13, 2025
27cb619
Use Debian 12 Bookwork as base image
AlekSi Aug 14, 2025
349130a
Use Debian 12 Bookworm as base image (#102)
AlekSi Aug 14, 2025
3f80da9
Add TODO comment about Debian 13 Trixie
AlekSi Aug 21, 2025
7eded64
Merge branch 'ferretdb' into merge-into-ferretdb
AlekSi Oct 22, 2025
2fdd5d8
Merge upstream (#104)
AlekSi Oct 22, 2025
e638354
Prepare v0.107.0-ferretdb-2.7.0 release
AlekSi Nov 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# FerretDB's DocumentDB Release Checklist

## Preparation

1. Create draft release on GitHub to see a list of merged PRs.
2. Update CHANGELOG.md manually.
3. Push changes.

## Git tag

1. Make a signed tag `vX.Y.Z-ferretdb-A.B.C(-p)` (like `v0.102.0-ferretdb-2.0.0-rc.2`),
where `X.Y.Z` is the SemVar formatted version of DocumentDB (like `0.102.0`),
and `A.B.C(-p)` is the compatible FerretDB version (like `2.0.0-rc.2`).
2. Check `git status` output.
3. Push it!

## Release

1. Find [Packages CI build](https://github.com/FerretDB/documentdb/actions/workflows/ferretdb_packages.yml?query=event%3Apush)
for the tag to release.
2. Upload `.deb` packages to the draft release.
3. Update release notes with the list of changes from CHANGELOG.md.
4. Publish release on GitHub.
4 changes: 2 additions & 2 deletions .github/containers/Build-Ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 mcr.microsoft.com/mirror/docker/library/ubuntu:20.04
FROM --platform=linux/amd64 mcr.microsoft.com/mirror/docker/library/ubuntu:22.04

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -qy \
Expand Down Expand Up @@ -62,4 +62,4 @@ USER runner

LABEL org.opencontainers.image.source=https://github.com/microsoft/documentdb
LABEL org.opencontainers.image.description="DocumentDB ubuntu build image"
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.licenses=MIT
27 changes: 27 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# see https://docs.mergify.com/

pull_request_rules:
- name: "Assign PRs"
conditions:
- "-closed"
- "#assignee = 0"
actions:
assign:
add_users: ["{{ author }}"]

- name: "Add label on conflicts"
conditions:
- "conflict"
actions:
comment:
message: "@{{author}} this pull request has merge conflicts."
label:
add: [conflict]

- name: "Remove label when conflicts were resolved"
conditions:
- "-conflict"
actions:
label:
remove: [conflict]
34 changes: 34 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# https://github.com/repository-settings/app

repository:
allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: false
allow_auto_merge: true
allow_update_branch: true
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

# https://docs.github.com/en/rest/issues/labels
labels:
- name: conflict
color: "#FF0000"
description: PRs that have merge conflicts

- name: deps
color: "#D4C5F9"
description: PRs that update dependencies

- name: do not merge
color: "#0052CC"
description: PRs that should not be merged

- name: not ready
color: "#000000"
description: Issues that are not ready to be worked on; PRs that should skip CI

- name: packages
color: "#9B022C"
description: PRs that should build packages
5 changes: 2 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
postgresql-15-cron \
postgresql-15-pgvector \
postgresql-15-postgis-3 \
postgresql-15-rum
postgresql-15-rum
export CLEAN_SETUP=1
export INSTALL_DEPENDENCIES_ROOT=/tmp/install_setup
mkdir -p /tmp/install_setup
Expand All @@ -71,4 +71,3 @@ jobs:

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

59 changes: 59 additions & 0 deletions .github/workflows/ferretdb_go_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Go
on:
pull_request:
types:
- unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild
- opened
- reopened
- synchronize
push:
branches:
- ferretdb
tags:
- "*"
schedule:
- cron: "12 0 * * *"

env:
GOPATH: /home/runner/go
GOCACHE: /home/runner/go/cache
GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org
GOTOOLCHAIN: local

jobs:
test:
name: Test
runs-on: ubuntu-24.04
timeout-minutes: 15

# Do not run this job in parallel for any PR change or branch push.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'not ready')

steps:
# TODO https://github.com/FerretDB/github-actions/issues/211
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: FerretDB/github-actions/setup-go@main
Comment thread Fixed

- name: Run tests
run: |
cd ferretdb_packaging
go mod tidy
go mod verify
go test ./...

- name: Check dirty
if: always()
run: |
git status --untracked-files --ignored
git status
git diff --exit-code
Comment thread Fixed
Comment on lines +28 to +59

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 9 months ago

To fix the problem, explicitly set the permissions key to restrict the GITHUB_TOKEN to the least privilege required. Since the workflow appears to only check out code, set up Go, and run tests (all read-only operations), the minimal required permission is contents: read. This can be set at the workflow level (applies to all jobs) or at the job level (applies only to the test job). The best practice is to set it at the workflow level unless a job requires different permissions. To implement the fix, add the following block near the top of the workflow file, after the name and before on or after on (either is valid YAML):

permissions:
  contents: read

No additional methods, imports, or definitions are needed.


Suggested changeset 1
.github/workflows/ferretdb_go_tests.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ferretdb_go_tests.yml b/.github/workflows/ferretdb_go_tests.yml
--- a/.github/workflows/ferretdb_go_tests.yml
+++ b/.github/workflows/ferretdb_go_tests.yml
@@ -2,2 +2,4 @@
 name: Go
+permissions:
+  contents: read
 on:
EOF
@@ -2,2 +2,4 @@
name: Go
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
124 changes: 124 additions & 0 deletions .github/workflows/ferretdb_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
name: Packages
on:
pull_request:
types:
- unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild
- opened
- reopened
- synchronize
push:
branches:
- ferretdb
tags:
- "*"
schedule:
- cron: "10 8 * * 1"

env:
GOPATH: /home/runner/go
GOCACHE: /home/runner/go/cache
GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org
GOTOOLCHAIN: local

# Do not run this workflow in parallel for any PR change or branch/tag push
# to save some resources.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false

jobs:
deb:
name: Build .debs (${{ matrix.os }}, Pg${{ matrix.pg }})
runs-on: ubuntu-24.04
timeout-minutes: 40

if: >
github.event_name != 'pull_request' ||
(
!contains(github.event.pull_request.labels.*.name, 'not ready') &&
contains(github.event.pull_request.labels.*.name, 'packages')
)

strategy:
fail-fast: false
matrix:
os: [deb11, deb12, ubuntu22.04, ubuntu24.04]
pg: [15, 16, 17]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: FerretDB/github-actions/setup-go@main
Comment thread Fixed

- name: Define Debian package version
id: version
run: |
cd ferretdb_packaging
go mod tidy
go mod verify
go run ./defineversion --command deb-version --control-file ../pg_documentdb_core/documentdb_core.control

- name: Build ${{ steps.version.outputs.version }}
if: steps.version.outputs.version != ''
run: ./ferretdb_packaging/build_packages.sh --os ${{ matrix.os }} --pg ${{ matrix.pg }} --version ${{ steps.version.outputs.version }} --test-clean-install

- name: Upload
Comment thread Fixed
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.pg }}-${{ steps.version.outputs.version }}
path: packaging/*.deb
retention-days: 1
if-no-files-found: error
compression-level: 0
overwrite: false

- name: Check dirty
run: |
git status
git diff --exit-code

docker:
Comment thread Fixed
name: Build Docker (Pg${{ matrix.pg }})
runs-on: ubuntu-24.04
timeout-minutes: 40

if: >
github.event_name != 'pull_request' ||
(
!contains(github.event.pull_request.labels.*.name, 'not ready') &&
contains(github.event.pull_request.labels.*.name, 'packages')
)

strategy:
fail-fast: false
matrix:
pg: [15.12, 16.8, 17.4]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: FerretDB/github-actions/setup-go@main

- name: Define Docker tags
id: tag
run: |
cd ferretdb_packaging
go mod tidy
go mod verify
go run ./defineversion --command docker-tags
env:
INPUT_PG_VERSION: ${{ matrix.pg }}

# Build and push Docker images

- name: Check dirty
Comment on lines +281 to +291

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
run: |
git status
git diff --exit-code
Comment thread Fixed
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
*.idb
*.pdb

# FerretDB packaging
*.deb

# Kernel Module Compile Results
*.mod*
*.cmd
Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### DocumentDB v0.102.0-ferretdb-2.0.0-rc.2 (February 24, 2025) ###

This version works best with [FerretDB v2.0.0-rc.2](https://github.com/FerretDB/FerretDB/releases/tag/v2.0.0-rc.2).

Debian and Ubuntu `.deb` packages are now [provided](https://github.com/FerretDB/documentdb/releases/tag/v0.102.0-ferretdb-2.0.0-rc.2).
Docker images are available [here](https://github.com/FerretDB/FerretDB/pkgs/container/postgres-documentdb).

### documentdb v0.102-0 (Unreleased) ###
* Support index pushdown for vector search queries *[Bugfix]*
* Support exact search for vector search queries *[Feature]*
Expand All @@ -12,8 +19,8 @@
* Build pg_documentdb for PostgreSQL 17 *[Infra]* (#13)
* Enable support of currentOp aggregation stage, along with collstats, dbstats, and indexStats *[Commands]* (#52)
* Allow inlining $unwind with $lookup with `preserveNullAndEmptyArrays` *[Perf]*
* Skip loading documents if group expression is constant *[Perf]*
* Skip loading documents if group expression is constant *[Perf]*
* Fix Merge stage not outputing to target collection *[Bugfix]* (#20)

### documentdb v0.100-0 (January 23rd, 2025) ###
Initial Release
Initial Release
4 changes: 3 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
Make* @microsoft/documentdb-engine-reviewers
/internal/ @microsoft/documentdb-engine-reviewers
/pg_documentdb/ @microsoft/documentdb-engine-reviewers
/pg_documentdb_core/ @microsoft/documentdb-engine-reviewers
/pg_documentdb_core/ @microsoft/documentdb-engine-reviewers

* @AlekSi
2 changes: 2 additions & 0 deletions ferretdb_packaging/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# FerretDB packaging
!*go.mod
Loading