Skip to content

Commit fd7553b

Browse files
author
Yaroslav Leonov
committed
update testenv with protobuf runtime v5.26
1 parent 22c660c commit fd7553b

File tree

6 files changed

+84
-8
lines changed

6 files changed

+84
-8
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
python-version: [3.8]
21-
environment: [py, py-tls, py-proto3, py-tls-proto3]
21+
environment: [py, py-tls, py-proto3, py-tls-proto3, py-proto5, py-tls-proto5]
2222
folder: [ydb, tests]
2323
exclude:
2424
- environment: py-tls
2525
folder: ydb
2626
- environment: py-tls-proto3
2727
folder: ydb
28+
- environment: py-tls-proto5
29+
folder: ydb
2830

2931
steps:
3032
- uses: actions/checkout@v1

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
protobuf: protobuf-3 protobuf-4
2-
1+
protobuf: protobuf-3 protobuf-4 protobuf-5
32
protobuf-3:
43
docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-3 --build-arg GRPCIO_VER=1.39.0 --build-arg PY_PROTOBUF_VER=3.20.3
54
docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-3 python generate_protoc.py --target-version=v3
65

76
protobuf-4:
87
docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-4
98
docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-4 python generate_protoc.py
9+
10+
protobuf-5:
11+
# yandexcloud 0.329.0 depends on grpcio<2 and >=1.64.0
12+
# --build-arg GRPCIO_VER=1.64.0
13+
docker build -f generate-protobuf.Dockerfile . -t ydb-python-sdk-proto-generator-env-5 --build-arg PY_PROTOBUF_VER=5.26.1 --build-arg PROTOC_VER=26.1
14+
docker run --rm -it -v $${PWD}:$${PWD} -w $${PWD} ydb-python-sdk-proto-generator-env-5 python generate_protoc.py --target-version=v5
15+

generate-protobuf.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
python -m pip install grpcio-tools==${GRPCIO_VER} && \
1010
python -m pip install protobuf==${PY_PROTOBUF_VER}
1111

12-
ENV PROTOC_VER=21.8
12+
ARG PROTOC_VER=21.8
1313
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip && \
1414
unzip protoc-*.zip && \
1515
rm -f protoc-*.zip && \

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
grpcio>=1.42.0
22
packaging
3-
protobuf>=3.13.0,<5.0.0
3+
protobuf>=3.13.0,<6.0.0
44
aiohttp<4

test-requirements-proto5.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
attrs==21.2.0
2+
bcrypt==3.2.0
3+
black==22.12.0
4+
cached-property==1.5.2
5+
certifi==2024.7.4
6+
cffi==1.14.6
7+
charset-normalizer==2.0.1
8+
cryptography==41.0.7
9+
distro==1.5.0
10+
docker==5.0.0
11+
docker-compose==1.29.2
12+
dockerpty==0.4.1
13+
docopt==0.6.2
14+
grpcio==1.64.0
15+
idna==3.2
16+
importlib-metadata==4.6.1
17+
iniconfig==1.1.1
18+
jsonschema==3.2.0
19+
packaging==21.0
20+
paramiko==2.10.1
21+
pluggy==0.13.1
22+
protobuf>=5.0.0
23+
py==1.10.0
24+
pycparser==2.20
25+
PyNaCl==1.4.0
26+
pyparsing==2.4.7
27+
pyrsistent==0.18.0
28+
pytest==7.2.2
29+
pytest-asyncio==0.21.0
30+
pytest-docker-compose==3.2.1
31+
python-dotenv==0.18.0
32+
PyYAML==5.3.1
33+
pyjwt==2.8.0
34+
requests==2.32.3
35+
texttable==1.6.4
36+
toml==0.10.2
37+
typing-extensions==4.12.2
38+
urllib3==1.26.6
39+
websocket-client==0.59.0
40+
zipp==3.19.1
41+
aiohttp==3.7.4
42+
pytest-pep8
43+
pytest-flake8
44+
flake8==3.9.2
45+
sqlalchemy==1.4.26
46+
pylint-protobuf
47+
cython
48+
freezegun==1.2.2
49+
pytest-cov
50+
yandexcloud==0.329.0
51+
-e .

tox.ini

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py,py-proto3,py-tls,py-tls-proto3,style,pylint,black,protoc,py-cov
2+
envlist = py,py-proto3,py-proto5,py-tls,py-tls-proto3,py-tls-proto5,style,pylint,black,protoc,py-cov
33
minversion = 4.2.6
44
skipsdist = True
55
ignore_basepython_conflict = true
@@ -21,6 +21,11 @@ deps =
2121
-r{toxinidir}/test-requirements.txt
2222
protobuf<4.0.0
2323

24+
[testenv:dev-proto5]
25+
commands =
26+
deps =
27+
-r{toxinidir}/test-requirements-proto5.txt
28+
2429
[testenv:py]
2530
commands =
2631
pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs}
@@ -38,6 +43,12 @@ deps =
3843
-r{toxinidir}/test-requirements.txt
3944
protobuf<4.0.0
4045

46+
[testenv:py-proto5]
47+
commands =
48+
pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs}
49+
deps =
50+
-r{toxinidir}/test-requirements-proto5.txt
51+
4152
[testenv:py-tls]
4253
commands =
4354
pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs}
@@ -49,15 +60,21 @@ deps =
4960
-r{toxinidir}/test-requirements.txt
5061
protobuf<4.0.0
5162

63+
[testenv:py-tls-proto5]
64+
commands =
65+
pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs}
66+
deps =
67+
-r{toxinidir}/test-requirements-proto5.txt
68+
5269
[testenv:black-format]
5370
skip_install = true
5471
commands =
55-
black ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4"
72+
black ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4|ydb/_grpc/v5"
5673

5774
[testenv:black]
5875
skip_install = true
5976
commands =
60-
black --diff --check ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4"
77+
black --diff --check ydb examples tests --extend-exclude "ydb/_grpc/v3|ydb/_grpc/v4|ydb/_grpc/v5"
6178

6279
[testenv:pylint]
6380
deps = pylint

0 commit comments

Comments
 (0)