Skip to content

Commit 321d1d8

Browse files
committed
Timeseries insertion filters for close samples (redis#3228)
Support timeseries insertion filters for samples that are close to each other in time and value. Use the documented way to disable compression, i.e. `ENCODING UNCOMPRESSED` instead of `UNCOMPRESSED`. Polish the documentation related to timeseries. Align things needed around CI, to make sure all tests are actually executed. BREAKING CHANGES: 1. Remove the `uncompressed` flag from TS.ALTER, since compression of existing timeseries cannot be changed. This should not have been used, so there should be no real impact. 2. For the TS.ADD command (TimeSeriesCommands.add method): the `duplicate_policy` Python parameter that was mapping to `ON DUPLICATE` was now rewired to map to `DUPLICATE POLICY`. A new Python parameter called `on_duplicate` was added, that maps to `ON DUPLICATE`. The expected impact of this change is low.
1 parent 45ed240 commit 321d1d8

File tree

6 files changed

+981
-483
lines changed

6 files changed

+981
-483
lines changed

.github/workflows/integration.yaml

Lines changed: 82 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -23,90 +23,92 @@ concurrency:
2323
permissions:
2424
contents: read # to fetch code (actions/checkout)
2525

26-
jobs:
26+
env:
27+
REDIS_STACK_IMAGE: redis/redis-stack-server:7.4.0-rc1
2728

28-
dependency-audit:
29-
name: Dependency audit
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@v4
33-
- uses: pypa/[email protected]
34-
with:
35-
inputs: requirements.txt dev_requirements.txt
36-
ignore-vulns: |
37-
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
38-
PYSEC-2024-48 # black vulnerability in 22.3.0, can't upgrade due to python 3.7 support, no impact
29+
jobs:
30+
dependency-audit:
31+
name: Dependency audit
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: pypa/[email protected]
36+
with:
37+
inputs: requirements.txt dev_requirements.txt
38+
ignore-vulns: |
39+
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
40+
PYSEC-2024-48 # black vulnerability in 22.3.0, can't upgrade due to python 3.7 support, no impact
3941
40-
lint:
41-
name: Code linters
42-
runs-on: ubuntu-latest
43-
steps:
44-
- uses: actions/checkout@v4
45-
- uses: actions/setup-python@v5
46-
with:
47-
python-version: 3.9
48-
cache: 'pip'
49-
- name: run code linters
50-
run: |
51-
pip install -r dev_requirements.txt
52-
invoke linters
42+
lint:
43+
name: Code linters
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-python@v5
48+
with:
49+
python-version: 3.9
50+
cache: 'pip'
51+
- name: run code linters
52+
run: |
53+
pip install -r dev_requirements.txt
54+
invoke linters
5355
54-
run-tests:
55-
runs-on: ubuntu-latest
56-
timeout-minutes: 60
57-
strategy:
58-
max-parallel: 15
59-
fail-fast: false
60-
matrix:
61-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
62-
test-type: ['standalone', 'cluster']
63-
connection-type: ['hiredis', 'plain']
64-
env:
65-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
66-
name: Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
67-
steps:
68-
- uses: actions/checkout@v4
69-
- uses: actions/setup-python@v5
70-
with:
71-
python-version: ${{ matrix.python-version }}
72-
cache: 'pip'
73-
- name: run tests
74-
run: |
75-
pip install -U setuptools wheel
76-
pip install -r requirements.txt
77-
pip install -r dev_requirements.txt
78-
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
79-
pip install hiredis
80-
fi
81-
invoke devenv
82-
sleep 10 # time to settle
83-
invoke ${{matrix.test-type}}-tests
56+
run-tests:
57+
runs-on: ubuntu-latest
58+
timeout-minutes: 60
59+
strategy:
60+
max-parallel: 15
61+
fail-fast: false
62+
matrix:
63+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
64+
test-type: ['standalone', 'cluster']
65+
connection-type: ['hiredis', 'plain']
66+
env:
67+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
68+
name: Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
69+
steps:
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-python@v5
72+
with:
73+
python-version: ${{ matrix.python-version }}
74+
cache: 'pip'
75+
- name: run tests
76+
run: |
77+
pip install -U setuptools wheel
78+
pip install -r requirements.txt
79+
pip install -r dev_requirements.txt
80+
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
81+
pip install hiredis
82+
fi
83+
invoke devenv
84+
sleep 10 # time to settle
85+
invoke ${{matrix.test-type}}-tests
8486
85-
- uses: actions/upload-artifact@v4
86-
if: success() || failure()
87-
with:
88-
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
89-
path: '${{matrix.test-type}}*results.xml'
87+
- uses: actions/upload-artifact@v4
88+
if: success() || failure()
89+
with:
90+
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
91+
path: '${{matrix.test-type}}*results.xml'
9092

91-
- name: Upload codecov coverage
92-
uses: codecov/codecov-action@v4
93-
with:
94-
fail_ci_if_error: false
93+
- name: Upload codecov coverage
94+
uses: codecov/codecov-action@v4
95+
with:
96+
fail_ci_if_error: false
9597

96-
- name: View Test Results
97-
uses: dorny/test-reporter@v1
98-
if: success() || failure()
99-
continue-on-error: true
100-
with:
101-
name: Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
102-
path: '*.xml'
103-
reporter: java-junit
104-
list-suites: all
105-
list-tests: all
106-
max-annotations: 10
107-
fail-on-error: 'false'
98+
- name: View Test Results
99+
uses: dorny/test-reporter@v1
100+
if: success() || failure()
101+
continue-on-error: true
102+
with:
103+
name: Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
104+
path: '*.xml'
105+
reporter: java-junit
106+
list-suites: all
107+
list-tests: all
108+
max-annotations: 10
109+
fail-on-error: 'false'
108110

109-
resp3_tests:
111+
resp3_tests:
110112
runs-on: ubuntu-latest
111113
strategy:
112114
fail-fast: false
@@ -116,7 +118,7 @@ jobs:
116118
connection-type: ['hiredis', 'plain']
117119
protocol: ['3']
118120
env:
119-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
121+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
120122
name: RESP3 [${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}]
121123
steps:
122124
- uses: actions/checkout@v4
@@ -137,7 +139,7 @@ jobs:
137139
invoke ${{matrix.test-type}}-tests
138140
invoke ${{matrix.test-type}}-tests --uvloop
139141
140-
build_and_test_package:
142+
build_and_test_package:
141143
name: Validate building and installing the package
142144
runs-on: ubuntu-latest
143145
needs: [run-tests]
@@ -154,7 +156,7 @@ jobs:
154156
run: |
155157
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
156158
157-
install_package_from_commit:
159+
install_package_from_commit:
158160
name: Install package from commit hash
159161
runs-on: ubuntu-latest
160162
strategy:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ services:
105105
- all
106106

107107
redis-stack:
108-
image: redis/redis-stack-server:edge
108+
image: ${REDIS_STACK_IMAGE:-redis/redis-stack-server:edge}
109109
container_name: redis-stack
110110
ports:
111111
- 6479:6379

0 commit comments

Comments
 (0)