Skip to content

Commit

Permalink
[DPE-1770] Minor version upgrades (#129)
Browse files Browse the repository at this point in the history
* Boilerplate

* Fix scheduled tests

* Happy scenario

* Integration tests

* Unit test

* Switch to testing profile

* Tenacity instead of defer

* Tweak unit tests

* Patch version bump

* Fix CI and bump libs

* Bump agent

* Update tox.ini

Co-authored-by: Marcelo Henrique Neppel <[email protected]>

---------

Co-authored-by: Marcelo Henrique Neppel <[email protected]>
  • Loading branch information
dragomirp and marceloneppel authored Oct 20, 2023
1 parent 83b9b36 commit 9848bb8
Show file tree
Hide file tree
Showing 21 changed files with 1,551 additions and 66 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ jobs:
- legacy-client-relation-integration
- legacy-client-relation-integration-admin
- scaling-integration
- upgrade-integration
agent-versions:
- "2.9.45" # renovate: latest juju 2
- "3.1.6" # renovate: latest juju 3
free-disk-space:
- false
include:
- tox-environments: client-relation-integration
agent-versions: "2.9.44" # renovate: latest juju 2
agent-versions: "2.9.45" # renovate: latest juju 2
free-disk-space: true
- tox-environments: client-relation-integration
agent-versions: "3.1.6" # renovate: latest juju 3
Expand Down Expand Up @@ -135,9 +136,9 @@ jobs:
echo "mark_expression=" >> $GITHUB_OUTPUT
else
echo Skipping unstable tests
echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
echo "mark_expression=and not unstable" >> $GITHUB_OUTPUT
fi
- name: Run integration tests
run: tox run -e ${{ matrix.tox-environments }}-${{ env.libjuju }} -- -m 'not not${{ env.libjuju }} and ${{ steps.select-tests.outputs.mark_expression }}'
run: tox run -e ${{ matrix.tox-environments }}-${{ env.libjuju }} -- -m 'not not${{ env.libjuju }} ${{ steps.select-tests.outputs.mark_expression }}' --keep-models
env:
CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}
6 changes: 6 additions & 0 deletions actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.

pre-upgrade-check:
description: Run necessary pre-upgrade checks before executing a charm upgrade.

6 changes: 5 additions & 1 deletion lib/charms/data_platform_libs/v0/data_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _on_topic_requested(self, event: TopicRequestedEvent):

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

PYDEPS = ["ops>=2.0.0"]

Expand Down Expand Up @@ -1674,6 +1674,10 @@ def _assign_relation_alias(self, relation_id: int) -> None:
if relation:
relation.data[self.local_unit].update({"alias": available_aliases[0]})

# We need to set relation alias also on the application level so,
# it will be accessible in show-unit juju command, executed for a consumer application unit
self.update_relation_data(relation_id, {"alias": available_aliases[0]})

def _emit_aliased_event(self, event: RelationChangedEvent, event_name: str) -> None:
"""Emit an aliased event to a particular relation if it has an alias.
Expand Down
Loading

0 comments on commit 9848bb8

Please sign in to comment.