Merge ~paride/autopkgtest-cloud:pre-commit-misc into autopkgtest-cloud:master

Proposed by Paride Legovini
Status: Merged
Approved by: Tim Andersson
Approved revision: d92226e5ac57548c78fc75d9de8d8b1b852a8950
Merged at revision: f21e861069e3d02966c3c6213998598ba3827b66
Proposed branch: ~paride/autopkgtest-cloud:pre-commit-misc
Merge into: autopkgtest-cloud:master
Diff against target: 115 lines (+18/-15)
8 files modified
.pre-commit-config.yaml (+11/-0)
.yamllint (+3/-0)
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh (+2/-2)
charms/focal/autopkgtest-cloud-worker/tests/10-deploy (+1/-1)
charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer (+0/-1)
charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer (+0/-1)
charms/focal/autopkgtest-web/webcontrol/update-github-jobs (+0/-1)
ci/lint_test (+1/-9)
Reviewer Review Type Date Requested Status
Tim Andersson Approve
Review via email: mp+445541@code.launchpad.net

Commit message

More pre-commit checks.

To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index eb05b79..3ad872e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,5 +1,16 @@
1repos:1repos:
2 - repo: https://github.com/pre-commit/pre-commit-hooks
3 rev: v4.4.0
4 hooks:
5 - id: end-of-file-fixer
6 - id: trailing-whitespace
7 - id: check-yaml
2 - repo: https://github.com/shellcheck-py/shellcheck-py8 - repo: https://github.com/shellcheck-py/shellcheck-py
3 rev: v0.9.0.59 rev: v0.9.0.5
4 hooks:10 hooks:
5 - id: shellcheck11 - id: shellcheck
12 - repo: https://github.com/adrienverge/yamllint.git
13 rev: v1.29.0
14 hooks:
15 - id: yamllint
16 args: [--strict]
diff --git a/.yamllint b/.yamllint
6new file mode 10064417new file mode 100644
index 0000000..f53eec5
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,3 @@
1extends: default
2rules:
3 document-start: disable
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
index 7cd94c8..04c1b34 100644
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
@@ -9,13 +9,13 @@ RELEASE=$(lsb_release --codename --short 2>/dev/null)
99
10# Make the installed package versions match what is available from the configured10# Make the installed package versions match what is available from the configured
11# repositories, even if a downgrade is required.11# repositories, even if a downgrade is required.
12# 12#
13# We may end up with images with packages newer than those available from the13# We may end up with images with packages newer than those available from the
14# repositories when opening a new release (images are created using the14# repositories when opening a new release (images are created using the
15# previous release dailies as a base, which may include 0-day SRUs, or15# previous release dailies as a base, which may include 0-day SRUs, or
16# Launchpad may fail to copy packages, see openssl 3.0.8-1ubuntu2), or when16# Launchpad may fail to copy packages, see openssl 3.0.8-1ubuntu2), or when
17# package versions are pulled from the archive.17# package versions are pulled from the archive.
18# 18#
19# Note: 'release a=' matches the Suite field in the repository Release file.19# Note: 'release a=' matches the Suite field in the repository Release file.
20cat >/etc/apt/preferences.d/force-downgrade-to-release.pref <<EOF20cat >/etc/apt/preferences.d/force-downgrade-to-release.pref <<EOF
21Package: *21Package: *
diff --git a/charms/focal/autopkgtest-cloud-worker/tests/10-deploy b/charms/focal/autopkgtest-cloud-worker/tests/10-deploy
index 2cd32f6..06cac38 100755
--- a/charms/focal/autopkgtest-cloud-worker/tests/10-deploy
+++ b/charms/focal/autopkgtest-cloud-worker/tests/10-deploy
@@ -30,6 +30,6 @@ class TestCharm(unittest.TestCase):
30 # - .directory_contents(PATH) - List files and folders in PATH on that unit30 # - .directory_contents(PATH) - List files and folders in PATH on that unit
31 # - .relation(relation, service:rel) - Get relation data from return service31 # - .relation(relation, service:rel) - Get relation data from return service
3232
33 33
34if __name__ == '__main__':34if __name__ == '__main__':
35 unittest.main()35 unittest.main()
diff --git a/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer b/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer
index a1a53ae..2bc5d9c 100644
--- a/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer
+++ b/charms/focal/autopkgtest-cloud-worker/units/cloud-worker-maintenance.timer
@@ -7,4 +7,3 @@ OnUnitInactiveSec=1h
77
8[Install]8[Install]
9WantedBy=autopkgtest.target9WantedBy=autopkgtest.target
10
diff --git a/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer b/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer
index 381c936..6049a18 100644
--- a/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer
+++ b/charms/focal/autopkgtest-cloud-worker/units/filter-amqp-dupes-upstream.timer
@@ -6,4 +6,3 @@ OnCalendar=minutely
66
7[Install]7[Install]
8WantedBy=autopkgtest.target8WantedBy=autopkgtest.target
9
diff --git a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
index f2bb430..a0119ec 100755
--- a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
+++ b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
@@ -156,4 +156,3 @@ if __name__ == '__main__':
156156
157 for job in jobs:157 for job in jobs:
158 process_job(os.path.join(PENDING_DIR, job))158 process_job(os.path.join(PENDING_DIR, job))
159
diff --git a/ci/lint_test b/ci/lint_test
index 15fc01d..1742fb2 100755
--- a/ci/lint_test
+++ b/ci/lint_test
@@ -94,14 +94,6 @@ if __name__=="__main__":
94 "output": "",94 "output": "",
95 "code": 095 "code": 0
96 },96 },
97 'yamllint': {
98 "files": ["../"],
99 "extensions": None,
100 "shebangs": None,
101 "args": "--no-warnings",
102 "output": "",
103 "code": 0
104 }
105 }97 }
10698
107 for key, item in data.items():99 for key, item in data.items():
@@ -129,4 +121,4 @@ if __name__=="__main__":
129 if key == "yamllint" and item["code"] != 0:121 if key == "yamllint" and item["code"] != 0:
130 sys.exit(1)122 sys.exit(1)
131 sys.exit(0)123 sys.exit(0)
132 sys.exit(0)
133\ No newline at end of file124\ No newline at end of file
125 sys.exit(0)

Subscribers

People subscribed via source and target branches