Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dpe-4412-use-tls-ca-c…
Browse files Browse the repository at this point in the history
…hain-for-backups

Signed-off-by: Marcelo Henrique Neppel <[email protected]>
  • Loading branch information
marceloneppel committed Jun 13, 2024
2 parents 38b8770 + 4fb533b commit 11de968
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 17 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v14.0.0

unit-test:
name: Unit test charm
Expand All @@ -42,7 +42,7 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v14.0.0
with:
cache: true

Expand All @@ -58,12 +58,17 @@ jobs:
allure_on_amd64: true
architecture:
- amd64
include:
- juju:
agent: 3.1.8 # renovate: latest juju 3
allure_on_amd64: true
architecture: arm64
name: Integration test charm | ${{ matrix.juju.agent }} | ${{ matrix.architecture }}
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v14.0.0
with:
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
architecture: ${{ matrix.architecture }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v14.0.0

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v14.0.0
with:
channel: 14/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_issue_to_jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
sync:
name: Sync GitHub issue to Jira
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v13.2.0
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v14.0.0
with:
jira-base-url: https://warthogs.atlassian.net
jira-project-key: DPE
Expand Down
13 changes: 12 additions & 1 deletion lib/charms/data_platform_libs/v0/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def restart(self, event) -> None:

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 16
LIBPATCH = 17

PYDEPS = ["pydantic>=1.10,<2", "poetry-core"]

Expand Down Expand Up @@ -907,6 +907,17 @@ def _on_upgrade_charm(self, event: UpgradeCharmEvent) -> None:
logger.error(e)
self.set_unit_failed()
return
top_unit_id = self.upgrade_stack[-1]
top_unit = self.charm.model.get_unit(f"{self.charm.app.name}/{top_unit_id}")
if (
top_unit == self.charm.unit
and self.peer_relation.data[self.charm.unit].get("state") == "recovery"
):
# While in a rollback and the Juju leader unit is the top unit in the upgrade stack, emit the event
# for this unit to start the rollback.
self.peer_relation.data[self.charm.unit].update({"state": "ready"})
self.on_upgrade_changed(event)
return
self.charm.unit.status = WaitingStatus("other units upgrading first...")
self.peer_relation.data[self.charm.unit].update({"state": "ready"})

Expand Down
34 changes: 27 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ optional = true

[tool.poetry.group.integration.dependencies]
pytest = "^8.2.0"
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v13.2.0", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v14.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-operator = "^0.35.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v13.2.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v13.2.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v14.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v14.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
# renovate caret doesn't work: https://github.com/renovatebot/renovate/issues/26940
juju = "<=3.4.0.0"
boto3 = "*"
Expand All @@ -78,6 +78,7 @@ landscape-api-py3 = "^0.9.0"
mailmanclient = "^3.3.5"
psycopg2-binary = "^2.9.9"
allure-pytest = "^2.13.5"
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v14.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}

# Testing tools configuration
[tool.coverage.run]
Expand Down

0 comments on commit 11de968

Please sign in to comment.