Skip to content

Commit ab160f3

Browse files
committed
merge canonical/main
2 parents 0a0486f + 32a647e commit ab160f3

File tree

22 files changed

+1643
-1532
lines changed

22 files changed

+1643
-1532
lines changed

.github/renovate.json5

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["github>canonical/data-platform//renovate_presets/charm.json5"],
4-
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"],
4+
"reviewers": ["dragomirp", "lucasgameiroborges", "marceloneppel", "taurus-forever"],
55
"packageRules": [
66
// Later rules override earlier rules
77
{
@@ -10,6 +10,66 @@
1010
}, {
1111
"matchPackageNames": ["python"],
1212
"allowedVersions": "<3.11"
13+
},
14+
{
15+
"matchDepNames": ["Juju 2"],
16+
"matchPackageNames": ["juju/juju"],
17+
"allowedVersions": "<3.0.0",
18+
"extractVersion": "^v(?<version>.*)$",
19+
"groupName": "Juju 2"
20+
},
21+
{
22+
"matchDepNames": ["Juju 3"],
23+
"matchPackageNames": ["juju/juju"],
24+
"allowedVersions": "<3.2.0",
25+
"extractVersion": "^v(?<version>.*)$",
26+
"groupName": "Juju 3"
27+
},
28+
{
29+
"matchDepNames": ["libjuju 2"],
30+
"matchPackageNames": ["juju"],
31+
"matchManagers": ["regex"],
32+
"matchDatasources": ["pypi"],
33+
"versioning": "loose",
34+
"allowedVersions": "<3",
35+
"groupName": "Juju 2"
36+
}
37+
],
38+
"regexManagers": [
39+
{
40+
"customType": "regex",
41+
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
42+
"matchStrings": [
43+
"(- agent: )(?<currentValue>.*?) +# renovate: latest juju 2"
44+
],
45+
"depNameTemplate": "Juju 2",
46+
"packageNameTemplate": "juju/juju",
47+
"datasourceTemplate": "github-releases",
48+
"versioningTemplate": "loose",
49+
"extractVersionTemplate": "Juju release"
50+
},
51+
{
52+
"customType": "regex",
53+
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
54+
"matchStrings": [
55+
"(- agent: )(?<currentValue>.*?) +# renovate: latest juju 3"
56+
],
57+
"depNameTemplate": "Juju 3",
58+
"packageNameTemplate": "juju/juju",
59+
"datasourceTemplate": "github-releases",
60+
"versioningTemplate": "loose",
61+
"extractVersionTemplate": "Juju release"
62+
},
63+
{
64+
"customType": "regex",
65+
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
66+
"matchStrings": [
67+
"(libjuju: )==(?<currentValue>.*?) +# renovate: latest libjuju 2"
68+
],
69+
"depNameTemplate": "libjuju 2",
70+
"packageNameTemplate": "juju",
71+
"datasourceTemplate": "pypi",
72+
"versioningTemplate": "loose"
1373
}
1474
]
1575
}

.github/workflows/ci.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
lint:
2424
name: Lint
25-
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v12.6.2
25+
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v13.1.1
2626

2727
unit-test:
2828
name: Unit test charm
@@ -42,7 +42,7 @@ jobs:
4242

4343
build:
4444
name: Build charm
45-
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v12.6.2
45+
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.1
4646
with:
4747
cache: true
4848

@@ -51,17 +51,17 @@ jobs:
5151
fail-fast: false
5252
matrix:
5353
juju:
54-
- agent: 2.9.46
55-
libjuju: ^2
54+
- agent: 2.9.49 # renovate: latest juju 2
55+
libjuju: ==2.9.46.1 # renovate: latest libjuju 2
5656
allure: false
57-
- agent: 3.1.7
57+
- agent: 3.1.8 # renovate: latest juju 3
5858
allure: true
5959
name: Integration test charm | ${{ matrix.juju.agent }}
6060
needs:
6161
- lint
6262
- unit-test
6363
- build
64-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v12.6.2
64+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v13.1.1
6565
with:
6666
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
6767
cloud: lxd
@@ -75,6 +75,9 @@ jobs:
7575
"AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}",
7676
"GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}",
7777
"GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}",
78+
"UBUNTU_PRO_TOKEN" : "${{ secrets.UBUNTU_PRO_TOKEN }}",
79+
"LANDSCAPE_ACCOUNT_NAME": "${{ secrets.LANDSCAPE_ACCOUNT_NAME }}",
80+
"LANDSCAPE_REGISTRATION_KEY": "${{ secrets.LANDSCAPE_REGISTRATION_KEY }}",
7881
}
7982
permissions:
8083
contents: write # Needed for Allure Report beta

.github/workflows/release.yaml

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

2525
build:
2626
name: Build charm
27-
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v12.6.2
27+
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.1
2828

2929
release:
3030
name: Release charm
3131
needs:
3232
- ci-tests
3333
- build
34-
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v12.6.2
34+
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v13.1.1
3535
with:
3636
channel: 14/edge
3737
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}

.github/workflows/sync_issue_to_jira.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
sync:
1111
name: Sync GitHub issue to Jira
12-
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v12.6.2
12+
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v13.1.1
1313
with:
1414
jira-base-url: https://warthogs.atlassian.net
1515
jira-project-key: DPE

lib/charms/operator_libs_linux/v2/snap.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
# Increment this PATCH version before using `charmcraft publish-lib` or reset
8585
# to 0 if you are raising the major API version
86-
LIBPATCH = 4
86+
LIBPATCH = 5
8787

8888

8989
# Regex to locate 7-bit C1 ANSI sequences
@@ -580,10 +580,17 @@ def ensure(
580580
# We are installing or refreshing a snap.
581581
if self._state not in (SnapState.Present, SnapState.Latest):
582582
# The snap is not installed, so we install it.
583+
logger.info(
584+
"Installing snap %s, revision %s, tracking %s", self._name, revision, channel
585+
)
583586
self._install(channel, cohort, revision)
584587
else:
585588
# The snap is installed, but we are changing it (e.g., switching channels).
589+
logger.info(
590+
"Refreshing snap %s, revision %s, tracking %s", self._name, revision, channel
591+
)
586592
self._refresh(channel=channel, cohort=cohort, revision=revision, devmode=devmode)
593+
logger.info("The snap installation completed successfully")
587594

588595
self._update_snap_apps()
589596
self._state = state

0 commit comments

Comments
 (0)