Skip to content

Commit

Permalink
Merge master to stable (#717)
Browse files Browse the repository at this point in the history
Pre release 0.96.0
  • Loading branch information
Zhaars authored Sep 9, 2024
1 parent 56d9b1c commit 1da3a60
Show file tree
Hide file tree
Showing 165 changed files with 9,615 additions and 5,845 deletions.
3 changes: 2 additions & 1 deletion .circleci/check_mysql_connection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ NUM_PINGS="${NUM_PINGS:-15}"
DELAY="${DELAY:-1}"

for try in $(seq $NUM_PINGS); do
mysqladmin ping \
mariadb-admin ping \
--host="$TEST_DB_HOST" \
--port="$TEST_DB_PORT" \
--user="$TEST_DB_USER" \
--password="$TEST_DB_USER_PASSWORD" \
--protocol=TCP \
--ssl=False \
&& exit 0 || sleep $DELAY
done

Expand Down
96 changes: 53 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ version: 2
jobs:
build_binaries:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
environment:
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
steps:
# prepare
- checkout
- run:
command: python3 tests/generate_random_data.py
environment:
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
- run:
command: ".circleci/build_binaries.sh"
environment:
OUTPUT_FOLDER: /tmp/acra-binaries
- save_cache:
# cache only for one commit, don't cache between commits because binaries should be changed
# but it's okay to cache them for same commit because it will avoid re-building on re-run commands
key: integration_tests_preparements_.{{ .Revision }}
paths:
- /tmp/test_data
- /tmp/acra-binaries
# prepare
- checkout
- run:
command: python3 tests/generate_random_data.py
environment:
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
- run:
command: ".circleci/build_binaries.sh"
environment:
OUTPUT_FOLDER: /tmp/acra-binaries
- save_cache:
# cache only for one commit, don't cache between commits because binaries should be changed
# but it's okay to cache them for same commit because it will avoid re-building on re-run commands
key: integration_tests_preparements_.{{ .Revision }}
paths:
- /tmp/test_data
- /tmp/acra-binaries

general_validation:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: cossacklabs/vault-ssl:1.6.2
command: server -dev -dev-root-token-id="root_token"
environment:
Expand All @@ -37,12 +37,12 @@ jobs:
- image: redis:6.0.16-alpine
# run one more redis container with tls support on 6380 port
- image: cossacklabs/redis-ssl:7.0-alpine
command: ['--tls-cert-file /tmp.ssl/redis.crt', '--tls-key-file /tmp.ssl/redis.key',
'--tls-ca-cert-file /tmp.ssl/ca.crt', '--tls-auth-clients yes',
'--port 0', '--tls-port 6380']
command: [ '--tls-cert-file /tmp.ssl/redis.crt', '--tls-key-file /tmp.ssl/redis.key',
'--tls-ca-cert-file /tmp.ssl/ca.crt', '--tls-auth-clients yes',
'--port 0', '--tls-port 6380' ]
environment:
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_DB_PORT: "5432"
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "on"
Expand Down Expand Up @@ -74,12 +74,12 @@ jobs:
environment:
- TEST_BUILD_TAGS: "integration,boltdb,redis,vault"
- TEST_EXTRA_BUILD_FLAGS: "-race"
- GO_VERSIONS: 1.19
- GO_VERSIONS: 1.21.0
# run tests with redis + tls using separate redis' container with tls
- run:
command: .circleci/check_gotest.sh
environment:
- GO_VERSIONS: 1.19
- GO_VERSIONS: 1.21.0
- TEST_REDIS_HOSTPORT: "localhost:6380"
- TEST_BUILD_TAGS: "integration,redis,tls"
# check python wrapper
Expand All @@ -92,7 +92,7 @@ jobs:

postgresql-ssl:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: cossacklabs/postgresql-ssl:11-1
environment:
POSTGRES_PASSWORD: test
Expand All @@ -105,7 +105,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "5432"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "on"
TEST_REDIS: "on"
Expand All @@ -126,7 +126,7 @@ jobs:
command: .circleci/check_gotest.sh
environment:
- TEST_BUILD_TAGS: "integration,postgresql"
- GO_VERSIONS: 1.19
- GO_VERSIONS: 1.21.0
# each iteration pass to test different ports for forks to avoid problems with TCP TIME WAIT between tests
- run:
name: Integration tests (keystore v1)
Expand All @@ -149,7 +149,7 @@ jobs:

postgresql:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: postgres:11-alpine
environment:
POSTGRES_PASSWORD: test
Expand All @@ -162,7 +162,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "5432"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "off"
TEST_REDIS: "on"
Expand All @@ -180,7 +180,7 @@ jobs:
command: .circleci/check_gotest.sh
environment:
- TEST_BUILD_TAGS: "integration,postgresql"
- GO_VERSIONS: 1.19
- GO_VERSIONS: 1.21.0
# testing
# generate test data for integration tests
- run: python3 tests/generate_random_data.py
Expand All @@ -206,7 +206,7 @@ jobs:

postgresql-integrations:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: nsmithuk/local-kms:3.11.2
- image: consul:1.13
- image: cossacklabs/postgresql-ssl:11-1
Expand All @@ -225,7 +225,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "5432"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "on"
TEST_WITH_VAULT: "on"
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:

postgresql-integrations-ssl:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: cossacklabs/postgresql-ssl:11-1
environment:
POSTGRES_PASSWORD: test
Expand All @@ -285,7 +285,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "5432"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "on"
TEST_WITH_VAULT: "on"
Expand Down Expand Up @@ -326,7 +326,7 @@ jobs:

mariadb-ssl:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
# use the same credentials for mysql db as for postgresql (which support was added first)
# has latest tag on 2018.03.29
- image: cossacklabs/mariadb-ssl:10.7.1
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:

mariadb:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
# use the same credentials for mysql db as for postgresql (which support was added first)
# has latest tag on 2018.03.29
- image: mariadb:latest
Expand All @@ -398,7 +398,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "3306"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_MYSQL: "true"
TEST_MARIADB: "true"
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
Expand All @@ -414,6 +414,11 @@ jobs:
# database in neighbor container need some time to start
# wait for the DB to be reachable, up to 15 pings with 1 second interval
- run: NUM_PINGS=15 DELAY=1 .circleci/check_mysql_connection.sh
- run:
command: .circleci/check_gotest.sh
environment:
- TEST_BUILD_TAGS: "integration,mysql"
- GO_VERSIONS: 1.21.0
# testing
# generate test data for integration tests
- run: python3 tests/generate_random_data.py
Expand All @@ -439,7 +444,7 @@ jobs:

mysql-ssl:
docker:
- image: cossacklabs/ci-py-go-themis:0.94.1
- image: cossacklabs/ci-py-go-themis:0.95.2
# use the same credentials for mysql db as for postgresql (which support was added first)
# has latest tag on 2018.03.29
- image: cossacklabs/mysql-ssl:5.7.31-1
Expand Down Expand Up @@ -494,7 +499,7 @@ jobs:

mysql:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
- image: mysql:5.7.25
environment:
MYSQL_DATABASE: test
Expand All @@ -508,7 +513,7 @@ jobs:
TEST_DB_NAME: test
TEST_DB_PORT: "3306"
FILEPATH_ERROR_FLAG: /tmp/test_fail
GO_VERSIONS: 1.19
GO_VERSIONS: 1.21.0
TEST_MYSQL: "true"
TEST_RANDOM_DATA_FOLDER: /tmp/test_data
TEST_TLS: "off"
Expand All @@ -523,6 +528,11 @@ jobs:
# database in neighbor container need some time to start
# wait for the DB to be reachable, up to 15 pings with 1 second interval
- run: NUM_PINGS=15 DELAY=1 .circleci/check_mysql_connection.sh
- run:
command: .circleci/check_gotest.sh
environment:
- TEST_BUILD_TAGS: "integration,mysql"
- GO_VERSIONS: 1.21.0
# testing
# generate test data for integration tests
- run: python3 tests/generate_random_data.py
Expand All @@ -548,7 +558,7 @@ jobs:

build_image:
docker:
- image: cossacklabs/ci-py-go-themis:0.93.0
- image: cossacklabs/ci-py-go-themis:0.95.2
steps:
# prepare
- checkout
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Acra ChangeLog

## [0.96.0](https://github.com/cossacklabs/acra/releases/tag/0.96.0), September 9th 2024

_Core_:

- **AcraServer**:
- Fixed panic with simultaneous signals handling [#707](https://github.com/cossacklabs/acra/pull/707)
- Improved encryptor config parsing logic [#676](https://github.com/cossacklabs/acra/pull/676), [#715](https://github.com/cossacklabs/acra/pull/665)
- Added support of Prepared Statements through text protocol in MySQL [#665](https://github.com/cossacklabs/acra/pull/665)
- Improved unicode characters support for PostgreSQL [#663](https://github.com/cossacklabs/acra/pull/663)
- Improved MariaDB protocol handling [#662](https://github.com/cossacklabs/acra/pull/662)
- Fixed panic with handling multi-statement queries: Acra still doesn`t support MS queries, but will log a warning about potential usage of it [#661](https://github.com/cossacklabs/acra/pull/661)
- Fixed bug with processing null values for `MySQL` PreparedStatements [#658](https://github.com/cossacklabs/acra/pull/658)

- **AcraBackup**:
- Marked `acra-backup` tool as deprecated in favour of `acra-keys` tool, in the **0.97.0** `acra-backup` will be removed [#674](https://github.com/cossacklabs/acra/pull/674)

- **AcraKeyMaker, AcraKeys, AcraPoisonRecordMaker, AcraTokens**:
- Added base TLS flags for tools [#678](https://github.com/cossacklabs/acra/pull/678)

- **AcraServer, AcraTranslator, AcraKeymaker, AcraKeys, AcraRotate, AcraPoisonRecordMaker, AcraTokens, AcraRollback**:
- Change tools arguments parsing approach in the appropriate priority: `CLI`-> `Config`-> `General CLI` -> `General Config` -> `CLI Default` [#678](https://github.com/cossacklabs/acra/pull/678)

## [0.95.0](https://github.com/cossacklabs/acra/releases/tag/0.95.0), March 3rd 2023

_Core_:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG_DEV.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 0.96.0 - 2024-09-09
- Updated encryptor configuration to support `response_on_fail` with `searchable: true` option, without requiring `data_type`.

# 0.96.0 - 2024-06-21
- Use QueryResponseHandler by default after Prepare response to mitigate flaky behaviour with MariaDB and -1
statement_id in Execute packet.

# 0.96.0 - 2023-09-20
- Deprecate acra-backup in favour of [acra-keys](https://docs.cossacklabs.com/acra/configuring-maintaining/general-configuration/acra-keys/).

# 0.96.0 - 2023-07-26
- Improve unicode support;

# 0.96.0 - 2023-03-06
- Added support of PreparedStatement from SQL for PostgreSQL;

# 0.95.0 - 2023-02-14
- Extend `acra-keys` `destroy` with destroying specific rotated keys for V1/V2;

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ install_dev_deps:
go install golang.org/x/tools/cmd/goyacc
go install github.com/swaggo/swag/cmd/swag@latest
go install github.com/tinylib/msgp@latest
go install github.com/vektra/mockery/v2@v2.16.0
go install github.com/vektra/mockery/v2@v2.33.0

##---- Docker ------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/config/acra-server.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.95.0
version: 0.96.0
encryptor_config_file: /config/encryptor_config.yaml
tls_ca: /ssl.ca/example.cossacklabs.com.crt
tls_cert: /ssl.server/acra-server.crt
Expand Down
Loading

0 comments on commit 1da3a60

Please sign in to comment.