Skip to content

Commit bcb38ed

Browse files
author
Wiktor Maj
authored
Merge branch 'master' into fix/92-swarm-overlay-encryption
2 parents abe1eae + 4b52a3d commit bcb38ed

15 files changed

Lines changed: 81 additions & 24 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
contents: "read"
1616
packages: "write"
1717
strategy:
18+
fail-fast: false
1819
matrix:
1920
include:
2021
- image: "ghcr.io/szachovy/superset-cluster-mysql-server"

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
* CI workflow to build and push service images to GitHub Container Registry on master merge. (#97)
1717
* Pull-first with local build fallback for container images during deployment. (#97)
1818
* Swarm overlay network encryption via IPsec and explicit data path port. (#92)
19+
* MySQL slow query log for queries exceeding 10 seconds or not using indexes. (#76)
20+
* Strengthen MySQL superset password: secrets module, expanded charset, 24 chars. (#89)
21+
* SQL Lab query row limits, timeout caps, and validation timeout. (#81)
22+
* Superset metastore and explore form data caching via Redis. (#79)
1923

2024
### Changed
2125

2226
* Completed [ARCHITECTURE.md](./docs/ARCHITECTURE.md) (#93)
2327
* Migrated CI from self-hosted to GitHub-hosted runners with Docker-in-Docker test infrastructure. (#94)
2428
* Test workflow always builds service images locally for reproducibility. (#97)
29+
* Enabled parallel replication applier threads on secondary MySQL nodes. (#75)
30+
* Clean up temporary `.pyc` files on remote nodes after execution. (#51)
31+
* Set `innodb_flush_method=O_DIRECT` to eliminate double caching in containers. (#74)
32+
* Reduced InnoDB change buffer size for read-heavy BI workload. (#72)
33+
* Set InnoDB buffer pool size to 1G for improved query performance. (#71)
34+
* Relaxed Terraform version constraint to accept any 1.x release. (#40)
35+
36+
### Removed
37+
38+
* Removed personal contact section from README. (#159)
2539

2640
### Fixed
2741

42+
* Upload `.py` source instead of `.pyc` bytecode to decouple host Python version. (#38, #41)
2843
* Fixed `run_mysql_server()` not instantiating `MySQLServer` class. (#94)
2944
* Disabled MD060 markdownlint rule to fix table column style false positives in documentation. (#94)
45+
* Made `create_directory()` idempotent to support deployment re-runs. (#35)
46+
* Added default inventory directive to `ansible.cfg`. (#42)
47+
* Fixed Publish workflow `write_package` permission denied by adding OCI source labels for GHCR repository linking. (#99)
3048

3149
## 1.0 - 2024-10-13
3250

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Follow [ARCHITECTURE.md](docs/ARCHITECTURE.md) for more.
3232

3333
The following software needs to be installed on the user's host:
3434

35-
* `python v3.10.12` with the following third party packages:
35+
* `python >= 3.10` with the following third party packages:
3636
* `paramiko v3.5.0`
3737

3838
The following software needs to be installed on the external nodes:
@@ -104,10 +104,6 @@ If you notice anything missing, spot a bug, or have an enhancement proposal,
104104
feel free to open an issue with the appropriate label.
105105
Pull requests are welcome. Please ensure that the tests are updated as necessary.
106106

107-
## Personal contact information
108-
109-
In case of any inquiries, please write an email to: _wjmaj98@gmail.com_
110-
111107
## Additional resources
112108

113109
* [What is Apache Superset?](https://superset.apache.org/docs/intro)

docs/ARCHITECTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ The controller runs on the user's workstation and communicates with cluster node
114114
[Paramiko](https://www.paramiko.org/). The `RemoteConnection` class provides:
115115

116116
* **SSH/SFTP connections**: connects as the `superset` user, either directly or through `~/.ssh/config`.
117-
* **Python bytecode execution**: `container.py` source is compiled to `.pyc`, uploaded to the remote node,
118-
and executed via `python3 /opt/<nonce>.pyc`. This allows running Docker API commands on remote nodes
119-
without installing additional management software.
117+
* **Python source execution**: `container.py` source is uploaded to the remote node along with the
118+
command to execute, and run via `python3 /opt/<nonce>.py`. This allows running Docker API commands on
119+
remote nodes without installing additional management software.
120120
* **Directory and file uploads**: recursive SFTP-based uploads of service directories, certificates,
121121
and passwords.
122122

docs/PERFORMANCE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ The MySQL server is configured for cluster workloads with the following performa
3939
| `binlog_transaction_dependency_tracking` | `WRITESET` | Enables parallel replication on secondaries |
4040
| `max_connections` | `50` | Limits concurrent connections per MySQL node |
4141
| `max_connect_errors` | `50` | Blocks hosts after 50 failed connection attempts |
42+
| `slow_query_log` | `ON` | Logs queries exceeding `long_query_time` or not using indexes |
43+
| `long_query_time` | `10` | Threshold in seconds for slow query classification |
4244

4345
## Nginx Tuning
4446

@@ -67,3 +69,5 @@ The following tools and endpoints are available for cluster monitoring and diagn
6769
- **Celery monitoring**: `celery inspect ping` and `celery inspect stats` provide worker status. See
6870
[Celery Async Queries](https://superset.apache.org/docs/configuration/async-queries-celery/).
6971
- **Keepalived logs**: available at `/opt/default/mysql_router/log/keepalived.log` on management nodes.
72+
- **MySQL slow query log**: available at `/var/log/mysql/slow-queries.log` on each MySQL node. Captures queries
73+
exceeding 10 seconds and queries not using indexes.

services/mysql-mgmt/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG BUILDPLATFORM="amd64"
22
FROM --platform=${BUILDPLATFORM} ubuntu:22.04
33

4-
LABEL version="1.0"
4+
LABEL version="1.0" \
5+
org.opencontainers.image.source="https://github.com/szachovy/superset-cluster"
56

67
ARG MYSQL_SHELL_VERSION="mysql-shell-8.3.0-linux-glibc2.28-x86-64bit" \
78
MYSQL_SHELL_MD5_CHECKSUM="c71280416014b9340b34b90160f42e23" \

services/mysql-server/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG BUILDPLATFORM="amd64"
22
FROM --platform=${BUILDPLATFORM} mysql:8.0-debian
33

4-
LABEL version="1.0"
4+
LABEL version="1.0" \
5+
org.opencontainers.image.source="https://github.com/szachovy/superset-cluster"
56

67
ENV LANG="C.UTF-8" \
78
LC_ALL="C.UTF-8"

services/mysql-server/mysql_config.cnf.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ ssl-key = "/etc/mysql/ssl/mysql_server_key.pem"
1414
require_secure_transport = "ON"
1515
max_connections = "50"
1616
max_connect_errors = "50"
17+
slow_query_log = "ON"
18+
long_query_time = "10"
19+
log_queries_not_using_indexes = "ON"
20+
slow_query_log_file = "/var/log/mysql/slow-queries.log"
21+
replica_parallel_workers = "4"
22+
replica_parallel_type = "LOGICAL_CLOCK"
23+
replica_preserve_commit_order = "ON"
24+
innodb_flush_method = "O_DIRECT"
25+
innodb_change_buffer_max_size = "10"
26+
innodb_buffer_pool_size = "1G"
27+
innodb_buffer_pool_instances = "1"

services/superset/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG BUILDPLATFORM="amd64"
22
FROM --platform=${BUILDPLATFORM} apache/superset:4.0.2
33

4-
LABEL version="1.0"
4+
LABEL version="1.0" \
5+
org.opencontainers.image.source="https://github.com/szachovy/superset-cluster"
56

67
COPY --chown=superset:superset "." "/app/"
78

services/superset/superset_config.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,28 @@ class CeleryConfig: # pylint: disable=too-few-public-methods
4343

4444
CELERY_CONFIG = CeleryConfig # pylint: disable=invalid-name
4545
RESULTS_BACKEND = flask_caching.backends.rediscache.RedisCache(host="redis", port=6379, key_prefix="superset_results")
46+
SQL_MAX_ROW = 10000
47+
DEFAULT_SQLLAB_LIMIT = 1000
48+
SQLLAB_TIMEOUT = 300
49+
SQLLAB_VALIDATION_TIMEOUT = 60
50+
SQLLAB_DEFAULT_DBID = 1
51+
SQL_QUERY_MUTATOR = None
52+
4653
FILTER_STATE_CACHE_CONFIG = {
4754
"CACHE_TYPE": "RedisCache",
4855
"CACHE_DEFAULT_TIMEOUT": 86400,
4956
"CACHE_KEY_PREFIX": "superset_filter_cache",
5057
"CACHE_REDIS_URL": "redis://redis:6379/0"
5158
}
59+
DATA_CACHE_CONFIG = {
60+
"CACHE_TYPE": "RedisCache",
61+
"CACHE_DEFAULT_TIMEOUT": 3600,
62+
"CACHE_KEY_PREFIX": "superset_data_cache",
63+
"CACHE_REDIS_URL": "redis://redis:6379/0"
64+
}
65+
EXPLORE_FORM_DATA_CACHE_CONFIG = {
66+
"CACHE_TYPE": "RedisCache",
67+
"CACHE_DEFAULT_TIMEOUT": 86400,
68+
"CACHE_KEY_PREFIX": "superset_explore_cache",
69+
"CACHE_REDIS_URL": "redis://redis:6379/0"
70+
}

0 commit comments

Comments
 (0)