Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
d994d97
Initial commit: completely useless yet
Smyatkin-Maxim Mar 23, 2023
7dd8641
Add .gitignore
Smyatkin-Maxim Mar 23, 2023
57b2904
Simple Executor{Start,Finish} logging
Smyatkin-Maxim Mar 23, 2023
c147d97
Add GRPC into Makefile and some prototype senders
Smyatkin-Maxim Mar 24, 2023
4f55894
Make ExecuteStart and ExecuteFinish work (partially)
Smyatkin-Maxim Mar 25, 2023
f85d173
Implement QueryInfo generation
Smyatkin-Maxim Mar 28, 2023
5aa16ef
Better protobuf filling code
Smyatkin-Maxim Mar 28, 2023
e3dde52
Fix segfault in plan text generator
Smyatkin-Maxim Mar 28, 2023
7211556
Add support of spill info and
Smyatkin-Maxim Mar 29, 2023
b4b2043
Sync with proto changes + generate normalized query and plan texts
Smyatkin-Maxim Mar 30, 2023
490f1b0
Implement the rest of statistics
Smyatkin-Maxim Apr 1, 2023
ebebc79
Use llvm code style
Smyatkin-Maxim Apr 6, 2023
3ebd501
Trace events using query_info_collect_hook
Smyatkin-Maxim Apr 10, 2023
0283406
Fix two segfaults
Smyatkin-Maxim Apr 12, 2023
22c7a2d
Don't call hooks from UTILITY mode and increase grpc timeout
Smyatkin-Maxim Apr 14, 2023
4a9c22e
More improvements to metrics collector
Smyatkin-Maxim May 1, 2023
1b667f6
Add debian package configuration
Smyatkin-Maxim May 1, 2023
804b596
Try older grpcpp headers for bionic builds
Smyatkin-Maxim May 2, 2023
92023f0
Add missing greenplum nodes to pg_stat_statements
Smyatkin-Maxim May 4, 2023
afc3bca
Move query stats reporting to ExecutorEnd hook
Smyatkin-Maxim May 4, 2023
8702297
Change GRPC failure handling
Smyatkin-Maxim May 5, 2023
a321053
Track CDB metrics and track query nesting
Smyatkin-Maxim May 12, 2023
21c658e
Change package name
Smyatkin-Maxim May 15, 2023
c51be23
Skip nested and utility statements
Smyatkin-Maxim May 17, 2023
d68c7c6
Slightly rework query skipping
Smyatkin-Maxim Jun 2, 2023
e401f14
Get resource groups back into query info
Smyatkin-Maxim Jun 2, 2023
b96b5e9
Add some configuration parameters
Smyatkin-Maxim Jun 6, 2023
f96e044
Capture query execution system stats instead of whole process lifetime
Smyatkin-Maxim Jun 7, 2023
c63a680
Don't rethrow errors from metrics collector
Smyatkin-Maxim Jun 9, 2023
bfefe9f
Add forgotten hooks deinitialization
Smyatkin-Maxim Jun 10, 2023
2a21424
Misc: use modern style error messages
Smyatkin-Maxim Jun 13, 2023
43fa27e
Fix EventSender and GrpcConnector in forks
Smyatkin-Maxim Jun 13, 2023
218c636
Set ya-grpc as a dependency
Smyatkin-Maxim Jun 19, 2023
1f5e166
Fix memory leak in analyze code
Smyatkin-Maxim Aug 16, 2023
43fb9c9
Add motion and workfile stats
Smyatkin-Maxim Sep 6, 2023
01f44ac
Mute all PG-related signals in reconnection thread
Smyatkin-Maxim Sep 6, 2023
aaa0d49
Move debian configuration to teamcity
Smyatkin-Maxim Sep 7, 2023
f143460
Move logs from psql to log file
Smyatkin-Maxim Sep 15, 2023
379fa0f
Some hardening around memory
Smyatkin-Maxim Sep 20, 2023
475e101
Remove thread unsafe logging
Smyatkin-Maxim Sep 20, 2023
ac9c548
Dirty hack: make queryid eq planid
Smyatkin-Maxim Sep 21, 2023
5f1a523
Remove dead code and catch thread exception
Smyatkin-Maxim Sep 22, 2023
80cd6d0
Add GUC to filter specific users
Smyatkin-Maxim Sep 21, 2023
0f98cad
Several fixes to user filtering
Smyatkin-Maxim Sep 28, 2023
ef5d362
Minor naming improvement
Smyatkin-Maxim Oct 2, 2023
9db45ad
Add server-side message queueing
Smyatkin-Maxim Oct 2, 2023
d39623f
Pull request #1: YAGP-0.0.1 WIP
Nov 1, 2023
78408d0
Moving to protobuf, part 1: remove GRPC
Smyatkin-Maxim Oct 31, 2023
b1e0ed5
Add clang-format
Smyatkin-Maxim Oct 31, 2023
e68c521
Moving to protobuf, part2: initial implementation
Smyatkin-Maxim Oct 31, 2023
baec27e
Use deprecated protobuf API for bionic compatibility
Smyatkin-Maxim Nov 1, 2023
93d8bd4
Replace message queue with incremental message
Smyatkin-Maxim Nov 1, 2023
bff3829
Fix bug with missing query statuses
Smyatkin-Maxim Nov 2, 2023
680a658
Add runtime statistics on UDS messages
Smyatkin-Maxim Nov 13, 2023
e31f916
Move query msg cleanup to the right place
Smyatkin-Maxim Nov 15, 2023
fd8a3f8
Finalize query msg in DONE hook
Smyatkin-Maxim Nov 16, 2023
052531a
Fix some memory leaks
Smyatkin-Maxim Dec 26, 2023
f0bf05e
Enable honest query_id collection
Smyatkin-Maxim Dec 26, 2023
7331046
Get resource group from current session
Smyatkin-Maxim Apr 24, 2024
0411dd0
Added support for nested queries
Smyatkin-Maxim May 17, 2024
90aa85a
Trim long text fields
Smyatkin-Maxim May 28, 2024
fe766db
Report error messages for failed queries
Smyatkin-Maxim May 28, 2024
cedcb73
Don't track the CANCELLING event
Smyatkin-Maxim May 30, 2024
1fe0b82
Properly send runtime metrics on CANCEL/ERROR
Smyatkin-Maxim Jun 3, 2024
0a866ba
Allow anyone to disable report_nested_queries
Smyatkin-Maxim Jun 3, 2024
861afdc
Diff stats between executor start and end
Smyatkin-Maxim Jun 13, 2024
cbaf857
Fix try/catch block when calling cpp code
Smyatkin-Maxim Aug 7, 2024
bcc0e29
Don't normalize trimmed plans
Smyatkin-Maxim Sep 12, 2024
ef5b2a6
Clean up forgotten text fields
Smyatkin-Maxim Oct 7, 2024
ed07cc7
[MDB-31938] Send nested queries only from master
Smyatkin-Maxim Oct 29, 2024
d6823d5
[MDB-31936] Add slice info
Smyatkin-Maxim Oct 30, 2024
3857695
Send nested queries summary stats from segments
Smyatkin-Maxim Nov 5, 2024
18b981d
[Refactoring] Split EventSender into submodules
Smyatkin-Maxim Nov 7, 2024
a133b57
Ignore EXPLAIN VERBOSE errors
Smyatkin-Maxim Apr 7, 2025
7ee748e
Merge pull request #1 from open-gpdb/max/ignore-explain-errors
leborchuk Apr 7, 2025
402bad2
Add support for per-slice interconnect statistics
Smyatkin-Maxim Apr 18, 2025
592abd4
Don't rely on IC hook for compilation
Smyatkin-Maxim May 6, 2025
bb3afb1
Merge pull request #2 from open-gpdb/max/query_ic_stats
reshke May 13, 2025
e3101f8
fix: propagate ignored users on update
NJrslv Jun 9, 2025
b6bb94f
propagate ignored users only when executor starts
NJrslv Jun 11, 2025
65882d5
fix ub in strcpy
NJrslv Jun 16, 2025
d67dbc7
refactor
NJrslv Jun 16, 2025
5924eaa
Merge pull request #5 from NJrslv/fix-filter-ignored-users-on-upd
NJrslv Jun 16, 2025
8d68883
Merge pull request #6 from NJrslv/fix-ub-strcpy
NJrslv Jun 16, 2025
848c3b0
Add EXPLAIN ANALYZE metrics collection
NJrslv Jun 24, 2025
405d843
parallel makefile & move link flags
NJrslv Jun 27, 2025
fa33aca
parallel makefile & move link flags (#8)
NJrslv Jun 27, 2025
631d73f
correct expand var
NJrslv Jun 27, 2025
19b3dbc
Merge branch 'YAGP-0.0.2-WIP' into fix-makefile
NJrslv Jun 27, 2025
6722ed1
Merge pull request #9 from open-gpdb/fix-makefile
NJrslv Jun 27, 2025
306a5f7
add safe cpp wrappers around pg funcs
NJrslv Jul 4, 2025
193c672
add minimal readme
NJrslv Jul 9, 2025
422cdf9
add nested queries info
NJrslv Jul 10, 2025
4a25ae2
move nested queries to general info
NJrslv Jul 10, 2025
b647e59
add minimal readme
NJrslv Jul 9, 2025
33620b1
add nested queries info
NJrslv Jul 10, 2025
62b0da3
move nested queries to general info
NJrslv Jul 10, 2025
a4a72b8
log actual err msg & templatize code & make free noexcept
NJrslv Jul 11, 2025
22ea107
add tab
NJrslv Jul 11, 2025
96f4628
change namespace name to avoid conflicts with gpos
NJrslv Jul 14, 2025
62a1d55
move template to .cpp
NJrslv Jul 15, 2025
5bd1359
fix mem leak
NJrslv Jul 15, 2025
b70b8e0
Merge pull request #14 from open-gpdb/fix-memleak
NJrslv Jul 15, 2025
9213f4c
Merge pull request #11 from open-gpdb/wrap-pg-calls
NJrslv Jul 16, 2025
20502d8
add trimming gucs to readme
NJrslv Jul 17, 2025
068f7fe
Merge branch 'YAGP-0.0.2-WIP' into minimal-readme
NJrslv Jul 17, 2025
d28f7f5
fix typo
NJrslv Jul 17, 2025
ab509e2
Merge pull request #15 from open-gpdb/minimal-readme
NJrslv Jul 17, 2025
dc309d7
add metrics desc
NJrslv Aug 7, 2025
26bdc53
clear
NJrslv Aug 7, 2025
e98b714
Merge pull request #17 from open-gpdb/metric-doc
NJrslv Aug 8, 2025
2990fe2
Fix missing states (utility statements included) (#16)
NJrslv Aug 13, 2025
4c85135
fix cpp & pg memleak
NJrslv Aug 13, 2025
ee6202f
Merge pull request #18 from open-gpdb/fix-memleak
NJrslv Aug 14, 2025
654381c
report bug queries at the end of extension (#19)
NJrslv Aug 15, 2025
1799aa2
fix defs & trim spaces (#21)
NJrslv Sep 4, 2025
15f9dc5
Add PG alike tests (#20)
NJrslv Sep 9, 2025
7fb6475
send analyze in text & enable it (#22)
NJrslv Sep 10, 2025
8c847d3
clean (#23)
NJrslv Sep 15, 2025
591e8a7
report utility stmt (#24)
NJrslv Sep 29, 2025
ca620e9
Trim utf8 (#25)
NJrslv Dec 3, 2025
08c6941
Backport: Properly NULL-terminate GSS receive buffer on error packet …
reshke Dec 23, 2025
25e0663
Movable DataBase Locales for Cloudberry
usernamedt Feb 13, 2023
d4ca192
Extend multixact SLRU (#3)
reshke Sep 19, 2025
ca117bb
Delete src/test/regress/sql/misc.sql
reshke Sep 19, 2025
29495b4
MDB admin patch & tests (#4)
reshke Sep 19, 2025
5d67501
Role mdb_superuser: feature and regress testsing (#5)
reshke Sep 30, 2025
2f14ac2
Merge branch 'apache:main' into main
leborchuk Dec 29, 2025
6b83b95
Merge branch 'apache:main' into main
leborchuk Dec 30, 2025
efee3a6
mdb locales disabled by default
Dec 30, 2025
e7eae0d
Merge branch 'apache:main' into main
leborchuk Jan 12, 2026
8fb4a8e
Add 'gpcontrib/yagp_hooks_collector/' from commit 'ca620e9f75f5bc7176…
NJrslv Jan 15, 2026
8136297
Movable DataBase Locales for Cloudberry
usernamedt Feb 13, 2023
ae523dd
Extend multixact SLRU (#3)
reshke Sep 19, 2025
5ae3719
Delete src/test/regress/sql/misc.sql
reshke Sep 19, 2025
c722889
MDB admin patch & tests (#4)
reshke Sep 19, 2025
66f1b4c
Role mdb_superuser: feature and regress testsing (#5)
reshke Sep 30, 2025
a3e8a2e
mdb locales disabled by default
Dec 30, 2025
b362823
[yagp_hooks_collector] Port workfile stats from gpdb
NJrslv Jan 19, 2026
af1092e
[yagp_hooks_collector] Port YagpQueryState from gpdb
NJrslv Jan 19, 2026
7c6f24d
[yagp_hooks_collector] Use updated names and func's interfaces
NJrslv Jan 19, 2026
7b0654e
[yagp_hooks_collector] Del redundant funcs
NJrslv Jan 19, 2026
b7f9d2c
[yagp_hooks_collector] Change test functions to SRF
NJrslv Jan 19, 2026
2afca84
[yagp_hooks_collector] Change test out for part tbl
NJrslv Jan 19, 2026
8f0bf5f
[yagp_hooks_collector] Add CI test and with option
NJrslv Jan 19, 2026
9be5f14
[yagp_hooks_collector] Change greenplum_path.sh to cloudberry-env.sh
NJrslv Jan 19, 2026
b0b2e7b
[yagp_hooks_collector] Add comments for func args
NJrslv Jan 19, 2026
7cff09c
[yagp_hooks_collector] Correct tokens from gram.y
NJrslv Jan 19, 2026
f3015f7
[yagp_hooks_collector] Add consistent filtering
NJrslv Jan 20, 2026
7ab24ed
[yagp_hooks_collector] Add submit & done hooks
NJrslv Jan 20, 2026
00dff37
[yagp_hooks_collector] Add test for UDS sending
NJrslv Jan 20, 2026
38dd155
[yagp_hooks_collector] Correct add of bytes sent
NJrslv Jan 20, 2026
90803d1
[yagp_hooks_collector] Refactor
NJrslv Jan 20, 2026
5f0eb82
[yagp_hooks_collector] Make gen of norm plan/query noexcept
NJrslv Jan 21, 2026
1792314
[yagp_hooks_collector] Fix warnings and error them
NJrslv Jan 21, 2026
351edae
[yagp_hooks_collector] Add licence
NJrslv Jan 22, 2026
cc7ebac
Merge branch 'yagp-hooks-collector'
NJrslv Jan 23, 2026
4c26586
Merge branch 'apache:main' into main
leborchuk Jan 27, 2026
a898b43
Yezzey test (#8)
reshke Feb 2, 2026
452ddb9
Merge branch 'apache:main' into main
leborchuk Feb 4, 2026
67a71a0
Merge branch 'apache:main' into main
leborchuk Feb 4, 2026
c4613c1
[yagp_hooks_collector] Fix null edata access (#22)
NJrslv Feb 10, 2026
fa90a19
Merge branch 'apache:main' into main
leborchuk Feb 10, 2026
4ca81f9
Add yezzey as submodule (#23)
reshke Feb 10, 2026
85092f7
Merge branch 'apache:main' into main
leborchuk Feb 12, 2026
a626d46
UseAnonymousAddress
Feb 12, 2026
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
32 changes: 31 additions & 1 deletion .github/workflows/build-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ jobs:
},
"enable_core_check":false
},
{"test":"gpcontrib-yagp-hooks-collector",
"make_configs":["gpcontrib/yagp_hooks_collector:installcheck"],
"extension":"yagp_hooks_collector"
},
{"test":"ic-expandshrink",
"make_configs":["src/test/isolation2:installcheck-expandshrink"]
},
Expand Down Expand Up @@ -530,10 +534,11 @@ jobs:
if: needs.check-skip.outputs.should_skip != 'true'
env:
SRC_DIR: ${{ github.workspace }}
CONFIGURE_EXTRA_OPTS: --with-yagp-hooks-collector
run: |
set -eo pipefail
chmod +x "${SRC_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; then
if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} CONFIGURE_EXTRA_OPTS=${{ env.CONFIGURE_EXTRA_OPTS }} ${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; then
echo "::error::Configure script failed"
exit 1
fi
Expand Down Expand Up @@ -1390,6 +1395,7 @@ jobs:
if: success() && needs.check-skip.outputs.should_skip != 'true'
env:
SRC_DIR: ${{ github.workspace }}
BUILD_DESTINATION: /usr/local/cloudberry-db
shell: bash {0}
run: |
set -o pipefail
Expand Down Expand Up @@ -1419,6 +1425,30 @@ jobs:
PG_OPTS="$PG_OPTS -c optimizer=${{ matrix.pg_settings.optimizer }}"
fi

# Create extension if required
if [[ "${{ matrix.extension != '' }}" == "true" ]]; then
case "${{ matrix.extension }}" in
yagp_hooks_collector)
if ! su - gpadmin -c "source ${BUILD_DESTINATION}/cloudberry-env.sh && \
source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh && \
gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector' && \
gpstop -ra && \
echo 'CREATE EXTENSION IF NOT EXISTS yagp_hooks_collector; \
SHOW shared_preload_libraries; \
TABLE pg_extension;' | \
psql postgres"
then
echo "Error creating yagp_hooks_collector extension"
exit 1
fi
;;
*)
echo "Unknown extension: ${{ matrix.extension }}"
exit 1
;;
esac
fi

if [[ "${{ matrix.pg_settings.default_table_access_method != '' }}" == "true" ]]; then
PG_OPTS="$PG_OPTS -c default_table_access_method=${{ matrix.pg_settings.default_table_access_method }}"
fi
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/yezzey-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Yezzey testing

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build_and_run_yezzey:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Test Yezzey
run: docker compose -f docker/yezzey/docker-compose.yaml run --build --remove-orphans yezzey


3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
path = dependency/yyjson
url = https://github.com/ibireme/yyjson.git

[submodule "gpcontrib/yezzey"]
path = gpcontrib/yezzey
url = https://github.com/open-gpdb/yezzey.git
28 changes: 28 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ with_apr_config
with_libcurl
with_rt
with_zstd
with_yagp_hooks_collector
with_libbz2
LZ4_LIBS
LZ4_CFLAGS
Expand Down Expand Up @@ -942,6 +943,7 @@ with_zlib
with_lz4
with_libbz2
with_zstd
with_yagp_hooks_collector
with_rt
with_libcurl
with_apr_config
Expand Down Expand Up @@ -11150,6 +11152,32 @@ $as_echo "yes" >&6; }
fi
fi

#
# yagp_hooks_collector
#



# Check whether --with-yagp-hooks-collector was given.
if test "${with_yagp_hooks_collector+set}" = set; then :
withval=$with_yagp_hooks_collector;
case $withval in
yes)
:
;;
no)
:
;;
*)
as_fn_error $? "no argument expected for --with-yagp-hooks-collector option" "$LINENO" 5
;;
esac

else
with_yagp_hooks_collector=no

fi

#
# Realtime library
#
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,13 @@ PGAC_ARG_BOOL(with, zstd, yes, [do not build with Zstandard],
AC_MSG_RESULT([$with_zstd])
AC_SUBST(with_zstd)

#
# yagp_hooks_collector
#
PGAC_ARG_BOOL(with, yagp_hooks_collector, no,
[build with YAGP hooks collector extension])
AC_SUBST(with_yagp_hooks_collector)

if test "$with_zstd" = yes; then
dnl zstd_errors.h was renamed from error_public.h in v1.4.0
PKG_CHECK_MODULES([ZSTD], [libzstd >= 1.4.0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#
# Optional Environment Variables:
# LOG_DIR - Directory for logs (defaults to ${SRC_DIR}/build-logs)
# CONFIGURE_EXTRA_OPTS - Args to pass to configure command
# ENABLE_DEBUG - Enable debug build options (true/false, defaults to
# false)
#
Expand Down Expand Up @@ -177,7 +178,8 @@ execute_cmd ./configure --prefix=${BUILD_DESTINATION} \
--with-uuid=e2fs \
${CONFIGURE_MDBLOCALES_OPTS} \
--with-includes=/usr/local/xerces-c/include \
--with-libraries=${BUILD_DESTINATION}/lib || exit 4
--with-libraries=${BUILD_DESTINATION}/lib \
${CONFIGURE_EXTRA_OPTS:-""} || exit 4
log_section_end "Configure"

# Capture version information
Expand Down
2 changes: 2 additions & 0 deletions docker/yezzey/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dockerfile
docker-compose.yaml
131 changes: 131 additions & 0 deletions docker/yezzey/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
FROM ubuntu:focal

ARG accessKeyId
ARG secretAccessKey
ARG bucketName
ARG s3endpoint
ARG yezzeyRef

ENV YEZZEY_REF=${yezzeyRef:-v1.8_opengpdb}

ENV AWS_ACCESS_KEY_ID=${accessKeyId}
ENV AWS_SECRET_ACCESS_KEY=${secretAccessKey}
ENV S3_BUCKET=${bucketName}
ENV WALG_S3_PREFIX=s3://${bucketName}/yezzey-test-files
ENV S3_ENDPOINT=${s3endpoint}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

RUN useradd -rm -d /home/gpadmin -s /bin/bash -g root -G sudo -u 1001 gpadmin

RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo Europe/London > /etc/timezone \
&& apt-get update -o Acquire::AllowInsecureRepositories=true && apt-get install -y --no-install-recommends --allow-unauthenticated \
build-essential libssl-dev gnupg devscripts \
openssl libssl-dev debhelper debootstrap \
make equivs bison ca-certificates-java ca-certificates \
cmake curl cgroup-tools flex gcc-8 g++-8 g++-8-multilib \
git krb5-multidev libapr1-dev libbz2-dev libcurl4-gnutls-dev \
libevent-dev libkrb5-dev libldap2-dev libperl-dev libreadline6-dev \
libssl-dev libxml2-dev libyaml-dev libzstd-dev libaprutil1-dev \
libpam0g-dev libpam0g libcgroup1 libyaml-0-2 libldap-2.4-2 libssl1.1 \
ninja-build python-dev python-setuptools quilt unzip wget zlib1g-dev libuv1-dev \
libgpgme-dev libgpgme11 sudo iproute2 less software-properties-common \
openssh-client openssh-server

COPY yezzey_test/install_yproxy.sh /home/gpadmin

RUN ["/home/gpadmin/install_yproxy.sh"]

RUN apt-get install -y locales \
&& locale-gen "en_US.UTF-8" \
&& update-locale LC_ALL="en_US.UTF-8"

RUN echo 'gpadmin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers

USER gpadmin
WORKDIR /home/gpadmin

COPY yezzey_test/import_gpg_keys.sh /home/gpadmin/
COPY yezzey_test/priv.gpg /home/gpadmin/yezzey_test/priv.gpg
COPY yezzey_test/pub.gpg /home/gpadmin/yezzey_test/pub.gpg

RUN ["/home/gpadmin/import_gpg_keys.sh"]

COPY yezzey_test/generate_ssh_key.sh /home/gpadmin/

RUN ["/home/gpadmin/generate_ssh_key.sh"]


RUN cd /tmp/ \
&& git clone https://github.com/boundary/sigar.git \
&& cd ./sigar/ \
&& mkdir build && cd build && cmake .. && make \
&& sudo make install

COPY . /home/gpadmin

RUN sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
ccache \
cmake \
curl \
flex \
git-core \
gcc \
g++ \
inetutils-ping \
krb5-kdc \
krb5-admin-server \
libapr1-dev \
libbz2-dev \
libcurl4-gnutls-dev \
libevent-dev \
libkrb5-dev \
libpam-dev \
libperl-dev \
libreadline-dev \
libssl-dev \
libxml2-dev \
libyaml-dev \
libzstd-dev \
locales \
net-tools \
ninja-build \
openssh-client \
openssh-server \
openssl \
python3-dev \
python3-pip \
python3-psutil \
python3-pygresql \
python-yaml \
zlib1g-dev \
rsync \
&& sudo apt install -y libhyperic-sigar-java libaprutil1-dev libuv1-dev

RUN sudo mkdir /usr/local/gpdb \
&& sudo chown gpadmin:root /usr/local/gpdb

RUN sudo chown -R gpadmin:root /home/gpadmin \
&& git status

RUN git submodule update --init
RUN rm -fr gpcontrib/yezzey

# Fetch latest yezzey version
RUN git clone https://github.com/open-gpdb/yezzey.git gpcontrib/yezzey && cd gpcontrib/yezzey && git fetch origin $YEZZEY_REF:test_branch && git checkout test_branch && cd /home/gpadmin
RUN sed -i '/^trusted/d' gpcontrib/yezzey/yezzey.control
RUN ./configure --with-perl --with-python --with-libxml --disable-orca --prefix=/usr/local/gpdb \
--enable-depend --enable-cassert --enable-debug --without-mdblocales --without-zstd CFLAGS='-fno-omit-frame-pointer -Wno-implicit-fallthrough -O3 -pthread'
RUN make -j8 && make -j8 install && make -C gpcontrib/yezzey -j8 install


RUN echo ${s3endpoint}

RUN sed -i "s/\$AWS_ACCESS_KEY_ID/${accessKeyId}/g" yezzey_test/yproxy.conf \
&& sed -i "s/\$AWS_SECRET_ACCESS_KEY/${secretAccessKey}/g" yezzey_test/yproxy.conf \
&& sed -i "s/\$AWS_ENDPOINT/${s3endpoint}/g" yezzey_test/yproxy.conf \
&& sed -i "s/\$WALG_S3_PREFIX/${bucketName}\/yezzey-test-files/g" yezzey_test/yproxy.conf && cp yezzey_test/yproxy.conf /tmp/yproxy.yaml

ENTRYPOINT ["./yezzey_test/run_tests.sh"]
45 changes: 45 additions & 0 deletions docker/yezzey/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
minio:
image: quay.io/minio/minio
command: server --console-address ":9001" /data
expose:
- "9000"
- "9001"
environment:
MINIO_ROOT_USER: some_key
MINIO_ROOT_PASSWORD: some_key
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
hostname: minio

setup-minio:
image: quay.io/minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: |
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 some_key some_key
/usr/bin/mc mb myminio/gpyezzey
/usr/bin/mc mb myminio/gpyezzey2
/usr/bin/mc mb myminio/gpyezzey3
"

yezzey:
image: yezzey
build:
context: ../..
dockerfile: docker/yezzey/Dockerfile
args:
accessKeyId: some_key
secretAccessKey: some_key
bucketName: gpyezzey
s3endpoint: "http:\\/\\/minio:9000"
depends_on:
minio:
condition: service_healthy
setup-minio:
condition: service_completed_successfully
3 changes: 3 additions & 0 deletions gpcontrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ else
pg_hint_plan
endif

ifeq "$(with_yagp_hooks_collector)" "yes"
recurse_targets += yagp_hooks_collector
endif
ifeq "$(with_zstd)" "yes"
recurse_targets += zstd
endif
Expand Down
2 changes: 2 additions & 0 deletions gpcontrib/yagp_hooks_collector/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BasedOnStyle: LLVM
SortIncludes: false
5 changes: 5 additions & 0 deletions gpcontrib/yagp_hooks_collector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.o
*.so
src/protos/
.vscode
compile_commands.json
Loading
Loading