From 1942fbc582e1929013172cda13aa869fc6d5c900 Mon Sep 17 00:00:00 2001 From: Mia Altieri Date: Thu, 12 Oct 2023 07:13:41 +0000 Subject: [PATCH 1/3] bump lib --- lib/charms/mongodb/v0/helpers.py | 4 ++-- lib/charms/mongodb/v0/mongodb.py | 4 ++-- lib/charms/mongodb/v0/mongodb_backups.py | 4 ++-- lib/charms/mongodb/v0/mongodb_provider.py | 4 ++-- lib/charms/mongodb/v0/mongodb_tls.py | 5 ++--- lib/charms/mongodb/v0/mongodb_vm_legacy_provider.py | 4 ++-- lib/charms/mongodb/v0/mongos.py | 4 ++-- lib/charms/mongodb/v0/shards_interface.py | 4 ++-- lib/charms/mongodb/v0/users.py | 4 ++-- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lib/charms/mongodb/v0/helpers.py b/lib/charms/mongodb/v0/helpers.py index b7aa6f1b5..d34d5fc7f 100644 --- a/lib/charms/mongodb/v0/helpers.py +++ b/lib/charms/mongodb/v0/helpers.py @@ -25,11 +25,11 @@ LIBID = "b9a7fe0c38d8486a9d1ce94c27d4758e" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 8 +LIBPATCH = 0 # path to store mongodb ketFile KEY_FILE = "keyFile" diff --git a/lib/charms/mongodb/v0/mongodb.py b/lib/charms/mongodb/v0/mongodb.py index 1ff8bcc8e..730f02301 100644 --- a/lib/charms/mongodb/v0/mongodb.py +++ b/lib/charms/mongodb/v0/mongodb.py @@ -25,11 +25,11 @@ LIBID = "49c69d9977574dd7942eb7b54f43355b" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 7 +LIBPATCH = 0 # path to store mongodb ketFile logger = logging.getLogger(__name__) diff --git a/lib/charms/mongodb/v0/mongodb_backups.py b/lib/charms/mongodb/v0/mongodb_backups.py index d152beb26..b0c19422c 100644 --- a/lib/charms/mongodb/v0/mongodb_backups.py +++ b/lib/charms/mongodb/v0/mongodb_backups.py @@ -36,11 +36,11 @@ LIBID = "18c461132b824ace91af0d7abe85f40e" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 7 +LIBPATCH = 0 logger = logging.getLogger(__name__) diff --git a/lib/charms/mongodb/v0/mongodb_provider.py b/lib/charms/mongodb/v0/mongodb_provider.py index 972f4b6e5..605294ea9 100644 --- a/lib/charms/mongodb/v0/mongodb_provider.py +++ b/lib/charms/mongodb/v0/mongodb_provider.py @@ -25,11 +25,11 @@ LIBID = "4067879ef7dd4261bf6c164bc29d94b1" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 5 +LIBPATCH = 0 logger = logging.getLogger(__name__) REL_NAME = "database" diff --git a/lib/charms/mongodb/v0/mongodb_tls.py b/lib/charms/mongodb/v0/mongodb_tls.py index 243a4b89a..a801294fa 100644 --- a/lib/charms/mongodb/v0/mongodb_tls.py +++ b/lib/charms/mongodb/v0/mongodb_tls.py @@ -35,12 +35,11 @@ LIBID = "e02a50f0795e4dd292f58e93b4f493dd" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 5 -LIBPATCH = 6 +LIBPATCH = 0 logger = logging.getLogger(__name__) diff --git a/lib/charms/mongodb/v0/mongodb_vm_legacy_provider.py b/lib/charms/mongodb/v0/mongodb_vm_legacy_provider.py index ef6db7e12..5235bd274 100644 --- a/lib/charms/mongodb/v0/mongodb_vm_legacy_provider.py +++ b/lib/charms/mongodb/v0/mongodb_vm_legacy_provider.py @@ -17,11 +17,11 @@ LIBID = "896a48bc89b84d30839335bb37170509" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 4 +LIBPATCH = 0 logger = logging.getLogger(__name__) REL_NAME = "database" diff --git a/lib/charms/mongodb/v0/mongos.py b/lib/charms/mongodb/v0/mongos.py index f51ee4097..135207a61 100644 --- a/lib/charms/mongodb/v0/mongos.py +++ b/lib/charms/mongodb/v0/mongos.py @@ -16,11 +16,11 @@ LIBID = "e20d5b19670d4c55a4934a21d3f3b29a" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 2 +LIBPATCH = 0 # path to store mongodb ketFile logger = logging.getLogger(__name__) diff --git a/lib/charms/mongodb/v0/shards_interface.py b/lib/charms/mongodb/v0/shards_interface.py index 868c5b5de..97b7e7822 100644 --- a/lib/charms/mongodb/v0/shards_interface.py +++ b/lib/charms/mongodb/v0/shards_interface.py @@ -38,11 +38,11 @@ LIBID = "55fee8fa73364fb0a2dc16a954b2fd4a" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 3 +LIBPATCH = 0 KEYFILE_KEY = "key-file" HOSTS_KEY = "host" OPERATOR_PASSWORD_KEY = MongoDBUser.get_password_key_name_for_user(OperatorUser.get_username()) diff --git a/lib/charms/mongodb/v0/users.py b/lib/charms/mongodb/v0/users.py index 249fcbaf2..57883d730 100644 --- a/lib/charms/mongodb/v0/users.py +++ b/lib/charms/mongodb/v0/users.py @@ -7,11 +7,11 @@ LIBID = "b74007eda21c453a89e4dcc6382aa2b3" # Increment this major API version when introducing breaking changes -LIBAPI = 0 +LIBAPI = 1 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 1 +LIBPATCH = 0 class MongoDBUser: From 5efd9ea9ce8983d79597961da32d62871cf40692 Mon Sep 17 00:00:00 2001 From: Mia Altieri Date: Thu, 12 Oct 2023 12:34:37 +0000 Subject: [PATCH 2/3] bump lib action --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e657a28d9..9462b1fb5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,7 +61,7 @@ jobs: with: fetch-depth: 0 - name: Check libs - uses: canonical/charming-actions/check-libraries@2.2.2 + uses: canonical/charming-actions/check-libraries@2.4.0 with: credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3bfa97fd3..4312a034c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,7 +27,7 @@ jobs: with: fetch-depth: 0 - name: Release any bumped charm libs - uses: canonical/charming-actions/release-libraries@2.2.2 + uses: canonical/charming-actions/release-libraries@2.4.0 with: credentials: "${{ secrets.CHARMHUB_TOKEN }}" github-token: "${{ secrets.GITHUB_TOKEN }}" From f079460cc405e2918400e4c6f13bd5b5396261aa Mon Sep 17 00:00:00 2001 From: Mia Altieri Date: Thu, 12 Oct 2023 15:05:48 +0000 Subject: [PATCH 3/3] work around for issue in lib workflows --- .github/workflows/ci.yaml | 32 +++++++++++++++++--------------- .github/workflows/release.yaml | 14 +++++++++----- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9462b1fb5..16899407e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,21 +50,23 @@ jobs: run: python3 -m pip install tox - name: Run tests run: tox run -e unit - - lib-check: - name: Check libraries - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Check libs - uses: canonical/charming-actions/check-libraries@2.4.0 - with: - credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 - github-token: "${{ secrets.GITHUB_TOKEN }}" + # current lib check is incompatible with bumped APIs - perform this manually. After merge + + # publish. It should be possible to comment this back in and for the workflow to resume normally. + # see issue: https://github.com/canonical/charming-actions/issues/97 + # lib-check: + # name: Check libraries + # runs-on: ubuntu-latest + # timeout-minutes: 5 + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # fetch-depth: 0 + # - name: Check libs + # uses: canonical/charming-actions/check-libraries@2.4.0 + # with: + # credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 + # github-token: "${{ secrets.GITHUB_TOKEN }}" build: name: Build charms diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4312a034c..f52d24e52 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,11 +26,15 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Release any bumped charm libs - uses: canonical/charming-actions/release-libraries@2.4.0 - with: - credentials: "${{ secrets.CHARMHUB_TOKEN }}" - github-token: "${{ secrets.GITHUB_TOKEN }}" + # current lib publish is incompatible with bumped APIs - perform this manually. After merge + + # publish. It should be possible to comment this back in and for the workflow to resume + # normally. + # see issue: https://github.com/canonical/charming-actions/issues/97 + # - name: Release any bumped charm libs + # uses: canonical/charming-actions/release-libraries@2.4.0 + # with: + # credentials: "${{ secrets.CHARMHUB_TOKEN }}" + # github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Upload charm to charmhub uses: canonical/charming-actions/upload-charm@2.2.2 with: