Skip to content

Commit 818a1fe

Browse files
authored
Merge pull request #187 from fairagro/feature/couchdb-step2-v3-api
Feature/couchdb step2 v3 api
2 parents 22017c6 + 4b983ba commit 818a1fe

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/pull-request-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
src:
3030
- 'middleware/**'
3131
- 'docker/**'
32+
- 'helmchart/**'
3233
- 'pyproject.toml'
3334
- 'uv.lock'
3435

.github/workflows/python-quality.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,23 @@ jobs:
119119
fi
120120
121121
- name: Fail job on critical findings
122-
if: steps.bandit-review.outputs.FAIL_JOB == 'true'
122+
if: inputs.run_tests == true && steps.bandit-review.outputs.FAIL_JOB == 'true'
123123
run: |
124124
echo "❌ Failing workflow due to HIGH or MEDIUM severity security issues found by bandit."
125125
exit 1
126126
127127
- name: Run unit and integration tests with coverage
128+
if: inputs.run_tests == true
128129
run: |
129130
uv run pytest -m "not system_local and not system_external" --cov=api --cov=api_client --cov=shared --cov-report=xml --cov-report=html --cov-report=term-missing --junitxml=pytest-report.xml
130131
131132
- name: Run system_local tests (testcontainers)
133+
if: inputs.run_tests == true
132134
run: |
133135
uv run pytest -m "system_local" --no-cov
134136
135137
- name: Upload coverage to Codecov
138+
if: inputs.run_tests == true
136139
uses: codecov/codecov-action@v4
137140
with:
138141
file: ./coverage.xml
@@ -142,7 +145,7 @@ jobs:
142145

143146
- name: Upload test results
144147
uses: actions/upload-artifact@v4
145-
if: always()
148+
if: inputs.run_tests == true && always()
146149
with:
147150
name: test-reports-${{ matrix.python-version }}
148151
path: |
@@ -152,7 +155,7 @@ jobs:
152155
bandit-report.json
153156
154157
- name: Create quality summary
155-
if: always()
158+
if: inputs.run_tests == true && always()
156159
run: |
157160
echo "## 📊 Code Quality Summary" >> $GITHUB_STEP_SUMMARY
158161
echo "| Tool | Status | Details |" >> $GITHUB_STEP_SUMMARY

helmchart/fairagro-advanced-middleware-api-chart/templates/couchdb.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ spec:
2828
matchLabels:
2929
{{- include "fairagro-advanced-middleware-api-chart.selectorLabels" . | nindent 6 }}
3030
app.kubernetes.io/component: couchdb
31+
{{- if .Values.couchdb.persistence.enabled }}
32+
strategy:
33+
# The deployment uses a ReadWriteOnce volume, which can only be attached to one pod at a time.
34+
# The Recreate strategy ensures the old pod is terminated before the new one is created, allowing the volume to be re-attached.
35+
type: Recreate
36+
rollingUpdate: null
37+
{{- end }}
3138
template:
3239
metadata:
3340
labels:

0 commit comments

Comments
 (0)