Skip to content

Commit 1bb674a

Browse files
authored
Update Clickhouse to the latest version (#7268)
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> The main reason for this is to update the Helm chart, because the current one conflicts with the Redis chart I want to add (in #7245). But also the version we have is quite old and out of support, so it's due for an update anyway. The change in `objects.py` is due to the fact that with the new version of Clickhouse, the value of `date` somehow became a timezone-aware datetime object, so the output of `isoparse` now includes a UTC offset, and appending a "Z" now creates a malformed date. I chose to replace this with a custom format string, which is consistent with other date formatting code in the `analytics_report` app. ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> I manually tried both the Helm chart and the Compose file, making sure that the analytics are still recorded and displayed. I also checked that a database created with the previous Clickhouse version can be loaded with the new version (it can). ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - ~~[ ] I have updated the documentation accordingly~~ - ~~[ ] I have added tests to cover my changes~~ - [x] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - ~~[ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))~~ ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
1 parent 3520645 commit 1bb674a

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Changed
2+
3+
- \[Compose, Helm\] Updated Clickhouse to version 23.11.*
4+
(<https://github.com/opencv/cvat/pull/7268>)

cvat/apps/analytics_report/report/primary_metrics/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def calculate(self):
4848
objects_statistics[f"{action}d"].append(
4949
{
5050
"value": sum(statistics[action][t].get(date, 0) for t in obj_types),
51-
"datetime": date.isoformat() + "Z",
51+
"datetime": date.strftime("%Y-%m-%dT%H:%M:%SZ"),
5252
}
5353
)
5454

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ services:
281281

282282
cvat_clickhouse:
283283
container_name: cvat_clickhouse
284-
image: clickhouse/clickhouse-server:22.3-alpine
284+
image: clickhouse/clickhouse-server:23.11-alpine
285285
restart: always
286286
environment:
287287
- CLICKHOUSE_DB=cvat

helm-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.11.1
19+
version: 0.11.2
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
@@ -42,7 +42,7 @@ dependencies:
4242
condition: analytics.enabled
4343

4444
- name: clickhouse
45-
version: "3.0.*"
45+
version: "4.1.*"
4646
repository: https://charts.bitnami.com/bitnami
4747
condition: analytics.enabled
4848

0 commit comments

Comments
 (0)