Skip to content

Commit 6e14e88

Browse files
committed
Merge remote-tracking branch 'origin/16/edge' into change-storage-mounts
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
2 parents cdeebe7 + 6738b9e commit 6e14e88

File tree

14 files changed

+1007
-229
lines changed

14 files changed

+1007
-229
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
- .github/renovate.json5
1717
- 'docs/**'
1818
- 'terraform/**'
19-
schedule:
20-
- cron: '53 0 * * *' # Daily at 00:53 UTC
21-
# Triggered on push to branch "main" by .github/workflows/release.yaml
19+
# Triggered on schedule by .github/workflows/scheduled_ci_*.yaml on default branch
20+
workflow_dispatch:
21+
# Triggered on push by .github/workflows/release.yaml
2222
workflow_call:
2323
outputs:
2424
artifact-prefix:

.github/workflows/integration_test.yaml

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ jobs:
6666
with open(os.environ["GITHUB_OUTPUT"], "a") as file:
6767
file.write(output)
6868
- name: Generate Allure default test results
69-
if: ${{ github.event_name == 'schedule' && github.run_attempt == '1' }}
69+
if: ${{ github.event_name == 'workflow_dispatch' && github.run_attempt == '1' }}
7070
run: tox run -e integration -- tests/integration --allure-default-dir=allure-default-results
7171
- name: Upload Allure default results
7272
# Default test results in case the integration tests time out or runner set up fails
7373
# (So that Allure report will show "unknown"/"failed" test result, instead of omitting the test)
74-
if: ${{ github.event_name == 'schedule' && github.run_attempt == '1' }}
74+
if: ${{ github.event_name == 'workflow_dispatch' && github.run_attempt == '1' }}
7575
uses: actions/upload-artifact@v6
7676
with:
7777
name: allure-default-results-integration-test
@@ -125,7 +125,7 @@ jobs:
125125
# Only upload results from one spread system & one spread variant
126126
# Allure can only process one result per pytest test ID. If parameterization is done via
127127
# spread instead of pytest, there will be overlapping pytest test IDs.
128-
if: ${{ (success() || (failure() && steps.spread.outcome == 'failure')) && startsWith(matrix.job.spread_job, 'github-ci:ubuntu-24.04:') && endsWith(matrix.job.spread_job, ':juju36') && github.event_name == 'schedule' && github.run_attempt == '1' }}
128+
if: ${{ (success() || (failure() && steps.spread.outcome == 'failure')) && startsWith(matrix.job.spread_job, 'github-ci:ubuntu-24.04:') && endsWith(matrix.job.spread_job, ':juju36') && github.event_name == 'workflow_dispatch' && github.run_attempt == '1' }}
129129
uses: actions/upload-artifact@v6
130130
with:
131131
name: allure-results-integration-test-${{ matrix.job.name_in_artifact }}
@@ -173,14 +173,30 @@ jobs:
173173
run: df --human-readable
174174

175175
allure-report:
176-
# TODO future improvement: use concurrency group for job
177176
name: Publish Allure report
178-
if: ${{ !cancelled() && github.event_name == 'schedule' && github.run_attempt == '1' }}
177+
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' && github.run_attempt == '1' }}
178+
concurrency:
179+
group: github-pages
180+
cancel-in-progress: false
179181
needs:
180182
- integration-test
181183
runs-on: ubuntu-latest
182184
timeout-minutes: 5
183185
steps:
186+
- name: Parse branch name
187+
id: branch
188+
shell: python
189+
run: |
190+
import os
191+
192+
if not "${{ github.ref }}".startswith("refs/heads/"):
193+
raise Exception(
194+
"Allure Report generation assumes `workflow_dispatch` is triggered on a branch"
195+
)
196+
output = f"branch={'${{ github.ref_name }}'.replace('/', '_')}"
197+
print(output)
198+
with open(os.environ["GITHUB_OUTPUT"], "a") as file:
199+
file.write(output)
184200
- name: Download Allure
185201
# Following instructions from https://allurereport.org/docs/install-for-linux/#install-from-a-deb-package
186202
run: gh release download --repo allure-framework/allure2 --pattern 'allure_*.deb'
@@ -260,10 +276,11 @@ jobs:
260276
default_result.path.rename(actual_results / default_result.path.name)
261277
- name: Load test report history
262278
run: |
263-
if [[ -d repo/_latest/history/ ]]
279+
mkdir -p repo/${{ steps.branch.outputs.branch }}/
280+
if [[ -d repo/${{ steps.branch.outputs.branch }}/_latest/history/ ]]
264281
then
265282
echo 'Loading history'
266-
cp -r repo/_latest/history/ allure-results/
283+
cp -r repo/${{ steps.branch.outputs.branch }}/_latest/history/ allure-results/
267284
fi
268285
- name: Create executor.json
269286
shell: python
@@ -283,25 +300,56 @@ jobs:
283300
json.dump(DATA, file)
284301
- name: Generate Allure report
285302
run: allure generate
286-
- name: Create index.html
303+
- name: Create top-level index.html
287304
shell: python
288305
run: |
289-
DATA = f"""<!DOCTYPE html>
306+
DATA = """<!DOCTYPE html>
307+
<meta charset="utf-8">
308+
<ul id="branches"></ul>
309+
<style>
310+
ul {
311+
font-size: 2rem;
312+
}
313+
</style>
314+
<script type="module">
315+
const response = await fetch("https://api.github.com/repos/${{ github.repository }}/contents?ref=gh-pages-beta", {
316+
headers: {
317+
"Accept": "application/vnd.github.object+json",
318+
"X-GitHub-Api-Version": "2022-11-28",
319+
}
320+
});
321+
const result = await response.json();
322+
let branches = "";
323+
for (const entry of result["entries"]) {
324+
if (entry["type"] !== "dir") {
325+
continue;
326+
}
327+
branches += `<li><a href="${entry["path"]}/">${entry["path"]}</a></li>`;
328+
}
329+
document.getElementById("branches").innerHTML = branches;
330+
</script>
331+
"""
332+
with open("repo/index.html", "w") as file:
333+
file.write(DATA)
334+
- name: Create branch index.html
335+
shell: python
336+
run: |
337+
DATA = """<!DOCTYPE html>
290338
<meta charset="utf-8">
291339
<meta http-equiv="cache-control" content="no-cache">
292340
<meta http-equiv="refresh" content="0; url=${{ github.run_number }}">
293341
"""
294-
with open("repo/index.html", "w") as file:
342+
with open("repo/${{ steps.branch.outputs.branch }}/index.html", "w") as file:
295343
file.write(DATA)
296344
- name: Update GitHub pages branch
297-
working-directory: repo/
345+
working-directory: repo/${{ steps.branch.outputs.branch }}/
298346
# TODO future improvement: commit message
299347
run: |
300348
mkdir '${{ github.run_number }}'
301349
rm -f _latest
302350
ln -s '${{ github.run_number }}' _latest
303-
cp -r ../allure-report/. _latest/
304-
git add .
351+
cp -r ../../allure-report/. _latest/
352+
git add ..
305353
git config user.name "GitHub Actions"
306354
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
307355
git commit -m "Allure report ${{ github.run_number }}"

charmcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parts:
2727
PIP_BREAK_SYSTEM_PACKAGES=true python3 -m pip install --user --upgrade pip==25.3 # renovate: charmcraft-pip-latest
2828
2929
# Use uv to install poetry so that a newer version of Python can be installed if needed by poetry
30-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.9.18/uv-installer.sh | sh # renovate: charmcraft-uv-latest
30+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.9.24/uv-installer.sh | sh # renovate: charmcraft-uv-latest
3131
# poetry 2.0.0 requires Python >=3.9
3232
if ! "$HOME/.local/bin/uv" python find '>=3.9'
3333
then

config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,57 @@ options:
2525
Controls whether Gather and Gather Merge also run subplans.
2626
type: boolean
2727
default: true
28+
cpu-max-logical-replication-workers:
29+
description: |
30+
Sets the maximum number of logical replication workers. Should be either "auto"
31+
or a positive integer value. Restart is required when changed.
32+
auto = max-worker-processes.
33+
type: string
34+
default: "auto"
35+
cpu-max-parallel-apply-workers-per-subscription:
36+
description: |
37+
Sets the maximum number of parallel apply workers per subscription.
38+
Should be either "auto" or a positive integer value.
39+
auto = max-worker-processes.
40+
type: string
41+
default: "auto"
42+
cpu-max-parallel-maintenance-workers:
43+
description: |
44+
Sets the maximum number of workers that can be used for parallel maintenance operations
45+
like CREATE INDEX. Should be either "auto" or a positive integer value.
46+
Cannot exceed max-parallel-workers.
47+
auto = max-worker-processes.
48+
type: string
49+
default: "auto"
50+
cpu-max-parallel-workers:
51+
description: |
52+
Sets the maximum number of workers that can be used for parallel operations.
53+
Should be either "auto" or a positive integer value. Cannot exceed max_worker_processes.
54+
auto = max-worker-processes.
55+
type: string
56+
default: "auto"
57+
cpu-max-sync-workers-per-subscription:
58+
description: |
59+
Sets the maximum number of synchronization workers per subscription.
60+
Should be either "auto" or a positive integer value.
61+
auto = max-worker-processes.
62+
type: string
63+
default: "auto"
64+
cpu-max-worker-processes:
65+
description: |
66+
Sets the maximum number of background processes that the system can support.
67+
Should be either "auto" or a positive integer value.
68+
auto = minimum(8, 2 * vCores). Value will be capped at 10 * vCores if exceeded.
69+
Restart is required when changed.
70+
type: string
71+
default: "auto"
72+
cpu-wal-compression:
73+
description: |
74+
Enable compression of full-page writes written in WAL. Compression reduces
75+
the I/O needed for local storage and replication.
76+
Default is on (true).
77+
type: boolean
78+
default: true
2879
durability-synchronous-commit:
2980
description: |
3081
Sets the current transactions synchronization level. This charm allows only the

0 commit comments

Comments
 (0)