Merge lp:~silverdrake11/landscape-charm/update_ppa into lp:~mitchburton/landscape-charm/op-framework

Proposed by Kevin Nasto
Status: Merged
Approved by: Mitch Burton
Approved revision: 436
Merge reported by: Mitch Burton
Merged at revision: not available
Proposed branch: lp:~silverdrake11/landscape-charm/update_ppa
Merge into: lp:~mitchburton/landscape-charm/op-framework
Diff against target: 73 lines (+10/-6)
4 files modified
config.yaml (+1/-1)
src/charm.py (+6/-3)
src/settings_files.py (+1/-1)
tests/test_charm.py (+2/-1)
To merge this branch: bzr merge lp:~silverdrake11/landscape-charm/update_ppa
Reviewer Review Type Date Requested Status
Mitch Burton Approve
Review via email: mp+438064@code.launchpad.net

Commit message

Updated ppa to point to stable

To post a comment you must log in.
435. By Kevin Nasto

Added bootstrap account back in since it was missing, added landscape-hashids package

436. By Kevin Nasto

Added hashids to upgrade constant

Revision history for this message
Mitch Burton (mitchburton) wrote :

+1 LGTM. Tested with juju deployment locally.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2023-02-16 23:44:57 +0000
+++ config.yaml 2023-02-28 23:34:07 +0000
@@ -4,7 +4,7 @@
4options:4options:
5 landscape_ppa:5 landscape_ppa:
6 type: string6 type: string
7 default: "ppa:landscape/self-hosted-beta"7 default: "ppa:landscape/self-hosted-23.03"
8 description: The PPA from which Landscape Server will be installed.8 description: The PPA from which Landscape Server will be installed.
9 worker_counts:9 worker_counts:
10 type: int10 type: int
1111
=== modified file 'src/charm.py'
--- src/charm.py 2023-02-16 23:44:57 +0000
+++ src/charm.py 2023-02-28 23:34:07 +0000
@@ -55,6 +55,7 @@
55 "landscape-server",55 "landscape-server",
56 "landscape-client",56 "landscape-client",
57 "landscape-common",57 "landscape-common",
58 "landscape-hashids"
58)59)
5960
60DEFAULT_SERVICES = (61DEFAULT_SERVICES = (
@@ -188,6 +189,8 @@
188 "package-upload": {"root-url": root_url},189 "package-upload": {"root-url": root_url},
189 })190 })
190191
192 self._bootstrap_account()
193
191 config_host = self.model.config.get("db_host")194 config_host = self.model.config.get("db_host")
192 config_password = self.model.config.get("db_password")195 config_password = self.model.config.get("db_password")
193 config_port = self.model.config.get("db_port")196 config_port = self.model.config.get("db_port")
@@ -221,11 +224,11 @@
221 landscape_ppa = self.model.config["landscape_ppa"]224 landscape_ppa = self.model.config["landscape_ppa"]
222225
223 try:226 try:
224 # Add the Landscape Server beta PPA and install via apt.227 # Add the Landscape Server PPA and install via apt.
225 check_call(["add-apt-repository", "-y", landscape_ppa])228 check_call(["add-apt-repository", "-y", landscape_ppa])
226 apt.add_package("landscape-server")229 apt.add_package(["landscape-server", "landscape-hashids"])
227 except PackageNotFoundError:230 except PackageNotFoundError:
228 logger.error("landscape-server package not found in package cache "231 logger.error("Landscape package not found in package cache "
229 "or on system")232 "or on system")
230 self.unit.status = BlockedStatus("Failed to install packages")233 self.unit.status = BlockedStatus("Failed to install packages")
231 return234 return
232235
=== modified file 'src/settings_files.py'
--- src/settings_files.py 2023-02-03 20:24:46 +0000
+++ src/settings_files.py 2023-02-28 23:34:07 +0000
@@ -146,4 +146,4 @@
146 if user:146 if user:
147 to_update["schema"]["store_user"] = user147 to_update["schema"]["store_user"] = user
148 if to_update:148 if to_update:
149 update_service_conf(to_update)
150\ No newline at end of file149\ No newline at end of file
150 update_service_conf(to_update)
151151
=== modified file 'tests/test_charm.py'
--- tests/test_charm.py 2023-02-16 23:44:57 +0000
+++ tests/test_charm.py 2023-02-28 23:34:07 +0000
@@ -73,7 +73,8 @@
7373
74 mocks["check_call"].assert_called_once_with(74 mocks["check_call"].assert_called_once_with(
75 ["add-apt-repository", "-y", ppa])75 ["add-apt-repository", "-y", ppa])
76 mocks["apt"].add_package.assert_called_once_with("landscape-server")76 mocks["apt"].add_package.assert_called_once_with(["landscape-server",
77 "landscape-hashids"])
77 status = harness.charm.unit.status78 status = harness.charm.unit.status
78 self.assertIsInstance(status, WaitingStatus)79 self.assertIsInstance(status, WaitingStatus)
79 self.assertEqual(status.message,80 self.assertEqual(status.message,

Subscribers

People subscribed via source and target branches

to all changes: