Skip to content

Commit c284523

Browse files
Merge branch '16/edge' into alutay/tls_1stable_pg16
2 parents 6a4dcb8 + 6bb4c2b commit c284523

File tree

67 files changed

+3545
-5510
lines changed

Some content is hidden

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

67 files changed

+3545
-5510
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- '**.md'
1616
- .github/renovate.json5
1717
- 'docs/**'
18+
- 'terraform/**'
1819
schedule:
1920
- cron: '53 0 * * *' # Daily at 00:53 UTC
2021
# Triggered on push to branch "main" by .github/workflows/release.yaml

.github/workflows/promote.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424

2525
jobs:
2626
promote:
27-
name: Promote charm
28-
uses: canonical/data-platform-workflows/.github/workflows/_promote_charm.yaml@v35.0.2
27+
name: Promote charms
28+
uses: canonical/data-platform-workflows/.github/workflows/_promote_charms.yaml@v39.1.0
2929
with:
3030
track: '16'
3131
from-risk: ${{ inputs.from-risk }}

.github/workflows/release.yaml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright 2023 Canonical Ltd.
22
# See LICENSE file for licensing details.
3-
name: Release to Charmhub
3+
name: Release to Charmhub edge
44

55
on:
66
push:
77
branches:
8-
- '16/edge'
8+
- '*/edge'
99
paths-ignore:
1010
- 'tests/**'
1111
- 'docs/**'
@@ -16,37 +16,31 @@ on:
1616
- '.github/workflows/sync_docs.yaml'
1717

1818
jobs:
19+
tag:
20+
name: Create charm refresh compatibility version git tag
21+
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
22+
with:
23+
track: '16'
24+
permissions:
25+
contents: write # Needed to create git tag
26+
1927
ci-tests:
2028
name: Tests
29+
needs:
30+
- tag
2131
uses: ./.github/workflows/ci.yaml
2232
secrets: inherit
2333
permissions:
2434
contents: write # Needed for Allure Report
2535

26-
release-libraries:
27-
name: Release libraries
28-
needs:
29-
- ci-tests
30-
runs-on: ubuntu-latest
31-
timeout-minutes: 60
32-
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v5
35-
with:
36-
fetch-depth: 0
37-
- name: Release charm libraries
38-
uses: canonical/charming-actions/[email protected]
39-
with:
40-
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
41-
github-token: "${{ secrets.GITHUB_TOKEN }}"
42-
4336
release:
4437
name: Release charm
4538
needs:
39+
- tag
4640
- ci-tests
4741
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
4842
with:
49-
track: 16
43+
track: ${{ needs.tag.outputs.track }}
5044
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
5145
secrets:
5246
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88
*.py[cod]
99
./requirements.txt
1010
requirements-last-build.txt
11+
.last_refresh_unit_status.json
1112

1213
# PyCharm project folder.
1314
.idea/

actions.yaml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,43 @@ create-replication:
1818
type: string
1919
description: The name of the replication (defaults to 'default').
2020
default: default
21+
force-refresh-start:
22+
description: |
23+
Potential of data loss and downtime
24+
25+
Force refresh of first unit
26+
27+
Must run with at least one of the parameters `=false`
28+
params:
29+
check-compatibility:
30+
type: boolean
31+
default: true
32+
description: |
33+
Potential of data loss and downtime
34+
35+
If `false`, force refresh if new version of PostgreSQL and/or charm is not compatible with previous version
36+
run-pre-refresh-checks:
37+
type: boolean
38+
default: true
39+
description: |
40+
Potential of data loss and downtime
41+
42+
If `false`, force refresh if app is unhealthy or not ready to refresh (and unit status shows "Pre-refresh check failed")
43+
check-workload-container:
44+
type: boolean
45+
default: true
46+
description: |
47+
Potential of data loss and downtime during and after refresh
48+
49+
If `false`, allow refresh to PostgreSQL container version that has not been validated to work with the charm revision
50+
additionalProperties: false
2151
get-primary:
2252
description: Get the unit with is the primary/leader in the replication.
2353
list-backups:
2454
description: Lists backups in s3 storage in AWS.
25-
pre-upgrade-check:
26-
description: Run necessary pre-upgrade checks and preparations before executing a charm refresh.
55+
pre-refresh-check:
56+
description: Check if charm is ready to refresh
57+
additionalProperties: false
2758
promote-to-primary:
2859
description: Promotes the cluster of choice to a primary cluster. Must be ran against the leader unit when promoting a cluster
2960
or against the unit to be promoted within the cluster.
@@ -44,5 +75,27 @@ restore:
4475
restore-to-time:
4576
type: string
4677
description: Point-in-time-recovery target in PSQL format.
78+
resume-refresh:
79+
description: |
80+
Refresh next unit(s) (after you have manually verified that refreshed units are healthy)
81+
82+
If the `pause-after-unit-refresh` config is set to `all`, this action will refresh the next unit.
83+
84+
If `pause-after-unit-refresh` is set to `first`, this action will refresh all remaining units.
85+
Exception: if automatic health checks fail after a unit has refreshed, the refresh will pause.
86+
87+
If `pause-after-unit-refresh` is set to `none`, this action will have no effect unless it is called with `check-health-of-refreshed-units` as `false`.
88+
params:
89+
check-health-of-refreshed-units:
90+
type: boolean
91+
default: true
92+
description: |
93+
Potential of data loss and downtime
94+
95+
If `false`, force refresh (of next unit) if 1 or more refreshed units are unhealthy
96+
97+
Warning: if first unit to refresh is unhealthy, consider running `force-refresh-start` action on that unit instead of using this parameter.
98+
If first unit to refresh is unhealthy because compatibility checks, pre-refresh checks, or workload container checks are failing, this parameter is more destructive than the `force-refresh-start` action.
99+
additionalProperties: false
47100
resume-upgrade:
48101
description: Resume a rolling upgrade after asserting successful upgrade of a new revision.

charmcraft.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,22 @@ parts:
8484
files:
8585
plugin: dump
8686
source: .
87+
after:
88+
- poetry-deps # Ensure poetry is installed
89+
build-packages:
90+
- git
91+
override-build: |
92+
# Set `charm_version` in refresh_versions.toml from git tag
93+
# Create venv in `..` so that git working tree is not dirty
94+
python3 -m venv ../refresh-version-venv
95+
source ../refresh-version-venv/bin/activate
96+
poetry install --only build-refresh-version
97+
write-charm-version
98+
99+
craftctl default
87100
stage:
88101
- LICENSE
102+
- refresh_versions.toml
89103
- scripts
90104
- templates
91105
libpq:

config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,13 @@ options:
390390
Allowed values are: from 0 to 1.80E+308.
391391
type: float
392392
default: 0.1
393+
pause-after-unit-refresh:
394+
description: |
395+
Wait for manual confirmation to resume refresh after these units refresh
396+
397+
Allowed values: "all", "first", "none"
398+
type: string
399+
default: first
393400
plugin_address_standardizer_data_us_enable:
394401
default: false
395402
type: boolean

0 commit comments

Comments
 (0)