Skip to content

Commit e2f4445

Browse files
Maffoochcneill
andauthored
Remove MySQL and RabbitMQ (#10661)
* Remove MySQL and RabbitMQ * Add release notes for breaking change * Update other tests that use `--profile` * Update settings sha * Fix db name mistake * Allow tests to fail * Update some tests * Try adding NOSONARE rule * Remove NoSonar rules * Update docs/content/en/getting_started/upgrading/2.37.md Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Update helm/defectdojo/values.yaml Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Update dc-up.sh Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Update dc-unittest.sh Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Update dc-up-d.sh Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Update docs/content/en/getting_started/architecture.md Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com> * Further removals * Update notice * Found some other maria's * Correct some tests * Further corrections * Correct ruff errors --------- Co-authored-by: Charles Neill <1749665+cneill@users.noreply.github.com>
1 parent d5f5e79 commit e2f4445

File tree

66 files changed

+374
-1285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+374
-1285
lines changed

.github/renovate.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
"baseBranches": ["dev"],
88
"rebaseWhen": "conflicted",
99
"ignorePaths": ["requirements.txt", "requirements-lint.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
10-
"ignoreDeps": [
11-
"mysql",
12-
"rabbitmq"
13-
],
10+
"ignoreDeps": [],
1411
"packageRules": [{
1512
"packagePatterns": ["*"],
1613
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",

.github/workflows/fetch-oas.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
docker images
3434
3535
- name: Start Dojo
36-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps -d postgres nginx uwsgi
36+
run: docker compose up --no-deps -d postgres nginx uwsgi
3737
env:
3838
DJANGO_VERSION: ${{ env.release_version }}-alpine
3939
NGINX_VERSION: ${{ env.release_version }}-alpine
@@ -44,11 +44,11 @@ jobs:
4444
4545
- name: Logs
4646
if: always()
47-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env logs --tail="2500"
47+
run: docker compose logs --tail="2500"
4848

4949
- name: Shutdown
5050
if: always()
51-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env down
51+
run: docker compose down
5252

5353
- name: Upload oas.${{ matrix.file-type }} as artifact
5454
uses: actions/upload-artifact@v3

.github/workflows/integration-tests.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
"tests/tool_config.py",
3737
"openapi-validatator",
3838
]
39-
profile: ["postgres-rabbitmq", "postgres-redis"]
4039
os: [alpine, debian]
4140
fail-fast: false
4241

@@ -59,39 +58,30 @@ jobs:
5958
- name: Set integration-test mode
6059
run: ln -s docker-compose.override.integration_tests.yml docker-compose.override.yml
6160

62-
# phased startup with PostgreSQL and RabbitMQ so we can use the exit code from integrationtest container
63-
- name: Start Dojo PostgreSQL + RabbitMQ
64-
if: matrix.profile == 'postgres-rabbitmq'
65-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi rabbitmq
66-
env:
67-
DJANGO_VERSION: ${{ matrix.os }}
68-
NGINX_VERSION: ${{ matrix.os }}
69-
70-
- name: Start Dojo PostgreSQL + Redis
71-
if: matrix.profile == 'postgres-redis'
72-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
61+
- name: Start Dojo
62+
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
7363
env:
7464
DJANGO_VERSION: ${{ matrix.os }}
7565
NGINX_VERSION: ${{ matrix.os }}
7666

7767
- name: Initialize
7868
timeout-minutes: 10
79-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps --exit-code-from initializer initializer
69+
run: docker compose up --no-deps --exit-code-from initializer initializer
8070
env:
8171
DJANGO_VERSION: ${{ matrix.os }}
8272
NGINX_VERSION: ${{ matrix.os }}
8373

8474
- name: Integration tests
8575
timeout-minutes: 10
86-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps --exit-code-from integration-tests integration-tests
76+
run: docker compose up --no-deps --exit-code-from integration-tests integration-tests
8777
env:
8878
DD_INTEGRATION_TEST_FILENAME: ${{ matrix.test-case }}
8979
INTEGRATION_TESTS_VERSION: debian
9080

9181
- name: Logs
9282
if: always()
93-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env logs --tail="2500"
83+
run: docker compose logs --tail="2500"
9484

9585
- name: Shutdown
9686
if: always()
97-
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env down
87+
run: docker compose down

.github/workflows/k8s-tests.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,14 @@ on:
55

66
env:
77
DD_HOSTNAME: defectdojo.default.minikube.local
8-
HELM_RABBIT_BROKER_SETTINGS: " \
9-
--set redis.enabled=false \
10-
--set rabbitmq.enabled=true \
11-
--set celery.broker=rabbitmq \
12-
--set createRabbitMqSecret=true \
13-
"
148
HELM_REDIS_BROKER_SETTINGS: " \
159
--set redis.enabled=true \
16-
--set rabbitmq.enabled=false \
1710
--set celery.broker=redis \
1811
--set createRedisSecret=true \
1912
"
20-
HELM_MYSQL_DATABASE_SETTINGS: " \
21-
--set database=mysql \
22-
--set postgresql.enabled=false \
23-
--set mysql.enabled=true \
24-
--set createMysqlSecret=true \
25-
"
2613
HELM_PG_DATABASE_SETTINGS: " \
2714
--set database=postgresql \
2815
--set postgresql.enabled=true \
29-
--set mysql.enabled=false \
3016
--set createPostgresqlSecret=true \
3117
"
3218
jobs:
@@ -44,23 +30,6 @@ jobs:
4430
brokers: redis
4531
k8s: 'v1.26.11'
4632
os: debian
47-
- databases: mysql
48-
brokers: rabbit
49-
k8s: 'v1.26.11'
50-
os: debian
51-
- databases: pgsql
52-
brokers: rabbit
53-
k8s: 'v1.29.2'
54-
os: debian
55-
- databases: mysql
56-
brokers: redis
57-
k8s: 'v1.29.2'
58-
os: debian
59-
- databases: pgsql
60-
brokers: rabbit
61-
k8s: 'v1.29.2'
62-
os: alpine
63-
6433
steps:
6534
- name: Checkout
6635
uses: actions/checkout@v4
@@ -99,9 +68,7 @@ jobs:
9968
id: set
10069
run: |-
10170
echo "pgsql=${{ env.HELM_PG_DATABASE_SETTINGS }}" >> $GITHUB_ENV
102-
echo "mysql=${{ env.HELM_MYSQL_DATABASE_SETTINGS }}" >> $GITHUB_ENV
10371
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
104-
echo "rabbit=${{ env.HELM_RABBIT_BROKER_SETTINGS }}" >> $GITHUB_ENV
10572
10673
- name: Deploying Djano application with ${{ matrix.databases }} ${{ matrix.brokers }}
10774
timeout-minutes: 10

.github/workflows/rest-framework-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ jobs:
3535

3636
# phased startup so we can use the exit code from unit test container
3737
- name: Start Postgres
38-
run: docker compose --env-file ./docker/environments/postgres-redis.env up -d postgres
38+
run: docker compose up -d postgres
3939

4040
# no celery or initializer needed for unit tests
4141
- name: Unit tests
4242
timeout-minutes: 10
43-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps --exit-code-from uwsgi uwsgi
43+
run: docker compose up --no-deps --exit-code-from uwsgi uwsgi
4444
env:
4545
DJANGO_VERSION: ${{ matrix.os }}
4646

4747
- name: Logs
4848
if: failure()
49-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env logs --tail="2500" uwsgi
49+
run: docker compose logs --tail="2500" uwsgi
5050

5151
- name: Shutdown
5252
if: always()
53-
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env down
53+
run: docker compose down

Dockerfile.django-alpine

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ RUN \
1414
gcc \
1515
build-base \
1616
bind-tools \
17-
mysql-client \
18-
mariadb-dev \
1917
postgresql16-client \
2018
xmlsec \
2119
git \
@@ -46,8 +44,6 @@ RUN \
4644
jpeg \
4745
tiff \
4846
bind-tools \
49-
mysql-client \
50-
mariadb-dev \
5147
xmlsec \
5248
git \
5349
util-linux \

Dockerfile.django-debian

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ RUN \
1414
gcc \
1515
build-essential \
1616
dnsutils \
17-
default-mysql-client \
18-
libmariadb-dev-compat \
1917
libpq-dev \
2018
postgresql-client \
2119
xmlsec1 \
@@ -48,8 +46,6 @@ RUN \
4846
libjpeg62 \
4947
libtiff6 \
5048
dnsutils \
51-
default-mysql-client \
52-
libmariadb3 \
5349
xmlsec1 \
5450
git \
5551
uuid-runtime \

Dockerfile.nginx-alpine

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ RUN \
1414
gcc \
1515
build-base \
1616
bind-tools \
17-
mysql-client \
18-
mariadb-dev \
1917
postgresql16-client \
2018
xmlsec \
2119
git \

Dockerfile.nginx-debian

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ RUN \
1414
gcc \
1515
build-essential \
1616
dnsutils \
17-
default-mysql-client \
18-
libmariadb-dev-compat \
1917
libpq-dev \
2018
postgresql-client \
2119
xmlsec1 \

0 commit comments

Comments
 (0)