Skip to content

Commit 7df4500

Browse files
authored
Merge upstream (#83)
2 parents 2e4bd56 + 601ec8a commit 7df4500

File tree

62 files changed

+4197
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4197
-155
lines changed

.github/containers/Build-Ubuntu/Dockerfile_prebuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ RUN useradd -ms /bin/bash documentdb -G sudo
5353
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/no-pass-ask
5454

5555
USER documentdb
56+
ENV PG_VERSION_USED=${POSTGRES_VERSION}
5657

5758
ENTRYPOINT ["/bin/bash", "-c", "/scripts/start_oss_server.sh \"$@\" & tail -f /dev/null", "--"]

.github/workflows/build_packages.yml

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build deb packages
1+
name: Build deb packages and prebuild images
22
concurrency:
33
group: build-packages-${{ github.event.pull_request.number || github.ref }}
44
cancel-in-progress: true
@@ -7,10 +7,15 @@ on:
77
workflow_dispatch:
88
push:
99
branches:
10-
- 'main'
10+
- "main"
1111
paths-ignore:
12-
- '.devcontainer/**'
13-
- '*.md'
12+
- ".devcontainer/**"
13+
- "*.md"
14+
15+
permissions:
16+
packages: write
17+
contents: read
18+
id-token: write
1419

1520
jobs:
1621
build-deb-packages:
@@ -54,3 +59,75 @@ jobs:
5459
retention-days: 7
5560
if-no-files-found: error
5661
compression-level: 0
62+
63+
- name: Login to GHCR
64+
uses: docker/login-action@v3
65+
with:
66+
registry: ghcr.io
67+
username: ${{ github.actor }}
68+
password: ${{ secrets.GITHUB_TOKEN }}
69+
70+
- name: Set up QEMU
71+
uses: docker/setup-qemu-action@v3
72+
73+
- name: Set up Docker Buildx
74+
uses: docker/setup-buildx-action@v3
75+
76+
- name: Extract image build metadata
77+
id: image_metadata
78+
run: |
79+
PACKAGE_NAME=$(ls packaging/*.deb | grep -v dbgsym | head -n1)
80+
echo "PACKAGE NAME: $PACKAGE_NAME"
81+
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
82+
83+
case ${{ matrix.os }} in
84+
deb11)
85+
BASE_IMAGE="debian:bullseye"
86+
;;
87+
deb12)
88+
BASE_IMAGE="debian:bookworm"
89+
;;
90+
ubuntu22.04)
91+
BASE_IMAGE="ubuntu:22.04"
92+
;;
93+
ubuntu24.04)
94+
BASE_IMAGE="ubuntu:24.04"
95+
;;
96+
esac
97+
echo "BASE_IMAGE NAME: $BASE_IMAGE"
98+
echo "BASE_IMAGE=$BASE_IMAGE" >> $GITHUB_ENV
99+
100+
- name: Build and Push Docker Image
101+
uses: docker/[email protected]
102+
env:
103+
DOCKER_BUILD_SUMMARY: false
104+
with:
105+
provenance: false # Disable provenance to avoid unknown/unknown
106+
sbom: false # Disable provenance to avoid unknown/unknown
107+
context: .
108+
push: true
109+
platforms: linux/${{ matrix.arch }}
110+
file: .github/containers/Build-Ubuntu/Dockerfile_prebuild
111+
tags: ghcr.io/${{ github.repository }}/documentdb-oss:${{ matrix.os }}-PG${{ matrix.pg_version }}-${{ matrix.arch }}-${{ env.DOCUMENTDB_VERSION }}
112+
build-args: |
113+
BASE_IMAGE=${{ env.BASE_IMAGE }}
114+
POSTGRES_VERSION=${{ matrix.pg_version }}
115+
DEB_PACKAGE_REL_PATH=${{ env.PACKAGE_NAME }}
116+
labels: |
117+
org.opencontainers.image.source=https://github.com/microsoft/documentdb
118+
org.opencontainers.image.description=Documentdb prebuild image
119+
org.opencontainers.image.licenses=MIT
120+
121+
- name: Install cosign
122+
uses: sigstore/cosign-installer@main
123+
124+
- name: Sign manifest (keyless)
125+
run: |
126+
cosign sign ghcr.io/${{ github.repository }}/documentdb-oss:${{ matrix.os }}-PG${{ matrix.pg_version }}-${{ matrix.arch }}-${{ env.DOCUMENTDB_VERSION }} -y
127+
128+
- name: Verify manifest signature (keyless)
129+
run: |
130+
cosign verify \
131+
--certificate-identity-regexp "https://github.com/${{ github.repository }}/.github/workflows/build_packages.yml@refs/heads/${{ github.ref_name }}" \
132+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
133+
ghcr.io/${{ github.repository }}/documentdb-oss:${{ matrix.os }}-PG${{ matrix.pg_version }}-${{ matrix.arch }}-${{ env.DOCUMENTDB_VERSION }}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### documentdb v0.105-0 (Unreleased) ###
2+
* Support `$bucketAuto` aggregation stage, with granularity types: `POWERSOF2`, `1-2-5`, `R5`, `R10`, `R20`, `R40`, `R80`, `E6`, `E12`, `E24`, `E48`, `E96`, `E192` *[Feature]*
3+
14
### DocumentDB v0.104.0-ferretdb-2.3.0 (Jun 10, 2025) ###
25

36
This version works best with FerretDB v2.3.0 and v2.3.1.

documentdb_errors.csv

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,4 +511,16 @@ OrdinalPosition,ErrorName
511511
510,Location3041704
512512
511,Location4341107
513513
512,InsufficientPrivilege
514-
513,NotWritablePrimary
514+
513,NotWritablePrimary
515+
514,Location40239
516+
515,Location40240
517+
516,Location40241
518+
517,Location40242
519+
518,Location40243
520+
519,Location40244
521+
520,Location40245
522+
521,Location40246
523+
522,Location40257
524+
523,Location40258
525+
524,Location40260
526+
525,Location40261

error_mappings.csv

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,18 @@ ErrorMapping,ErrorName
289289
40236,Location40236
290290
40237,Location40237
291291
40238,Location40238
292+
40239,Location40239
293+
40240,Location40240
294+
40241,Location40241
295+
40242,Location40242
296+
40243,Location40243
297+
40244,Location40244
298+
40245,Location40245
299+
40246,Location40246
300+
40257,Location40257
301+
40258,Location40258
302+
40260,Location40260
303+
40261,Location40261
292304
40272,Location40272
293305
40319,Location40319
294306
40321,Location40321

internal/pg_documentdb_distributed/documentdb_distributed.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
comment = 'Multi-Node API surface for DocumentDB'
2-
default_version = '0.104-0'
2+
default_version = '0.105-0'
33
module_pathname = '$libdir/pg_documentdb_distributed'
44
relocatable = false
55
superuser = true

internal/pg_documentdb_distributed/sql/documentdb_distributed--0.104-0--0.105-0.sql

Whitespace-only changes.

internal/pg_documentdb_distributed/src/test/regress/basic_schedule_core

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ test: bson_dollar_ops_json_schema_build_tree_tests bson_dollar_ops_json_schema_q
5656

5757
test: bson_aggregation_stage_out_tests_2 bson_aggregation_pipeline_stage_densify bson_query_operator_error_tests
5858
test: bson_aggregation_pipeline_tests_top_bottom_group bson_aggregation_pipeline_tests_maxnminn_group bson_aggregation_pipeline_stage_fill
59+
test: bson_aggregation_pipeline_tests_bucket_auto
5960

6061
test: bson_aggregation_array_operators_tests bson_aggregation_bitwise_operators_tests bson_aggregation_boolean_operators_tests bson_aggregation_comparison_operators_tests
6162
test: bson_aggregation_conditional_operators_tests bson_aggregation_data_size_operators_tests bson_aggregation_date_operators_tests bson_aggregation_miscellaneous_operators_tests

0 commit comments

Comments
 (0)