[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:dateutil.tz into launchpad:master

2023-06-14 Thread Colin Watson
Colin Watson has proposed merging ~cjwatson/launchpad:dateutil.tz into 
launchpad:master.

Commit message:
Remove direct dependencies on pytz

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/444821

`dateutil.tz` is a better fit for Python's modern timezone provider interface, 
and has fewer footguns as a result.

The only significant downside is that we have to reimplement something similar 
to `pytz.common_timezones` for use by our timezone vocabulary.  Fortunately 
this isn't too difficult.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:dateutil.tz into launchpad:master.
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index 0e0b0e5..44781e8 100644
--- a/lib/lp/app/browser/tales.py
+++ b/lib/lp/app/browser/tales.py
@@ -12,7 +12,7 @@ from email.utils import formatdate, mktime_tz
 from textwrap import dedent
 from urllib.parse import quote
 
-import pytz
+from dateutil import tz
 from lazr.restful.utils import get_current_browser_request
 from lazr.uri import URI
 from zope.browserpage import ViewPageTemplateFile
@@ -1293,7 +1293,7 @@ class PersonFormatterAPI(ObjectFormatterAPI):
 def local_time(self):
 """Return the local time for this person."""
 time_zone = self._context.time_zone
-dt = datetime.now(pytz.timezone(time_zone))
+dt = datetime.now(tz.gettz(time_zone))
 return "%s %s" % (dt.strftime("%T"), tzname(dt))
 
 def url(self, view_name=None, rootsite="mainsite"):
diff --git a/lib/lp/app/widgets/date.py b/lib/lp/app/widgets/date.py
index e024dfa..83eb950 100644
--- a/lib/lp/app/widgets/date.py
+++ b/lib/lp/app/widgets/date.py
@@ -19,7 +19,7 @@ __all__ = [
 
 from datetime import datetime, timezone, tzinfo
 
-import pytz
+from dateutil import tz
 from zope.browserpage import ViewPageTemplateFile
 from zope.component import getUtility
 from zope.datetime import DateTimeError, parse
@@ -217,14 +217,14 @@ class DateTimeWidget(TextWidget):
   >>> widget.required_time_zone_name = "Africa/Maseru"
   >>> print(widget.time_zone_name)
   Africa/Maseru
-  >>> print(widget.time_zone)
-  Africa/Maseru
+  >>> print(widget.time_zone)  # doctest: +ELLIPSIS
+  tzfile('.../Africa/Maseru')
 
 """
 if self.time_zone_name == "UTC":
 return timezone.utc
 else:
-return pytz.timezone(self.time_zone_name)
+return tz.gettz(self.time_zone_name)
 
 def _align_date_constraints_with_time_zone(self):
 """Ensure that from_date and to_date use the widget time zone."""
@@ -232,22 +232,14 @@ class DateTimeWidget(TextWidget):
 if self.from_date.tzinfo is None:
 # Timezone-naive constraint is interpreted as being in the
 # widget time zone.
-if hasattr(self.time_zone, "localize"):  # pytz
-self.from_date = self.time_zone.localize(self.from_date)
-else:
-self.from_date = self.from_date.replace(
-tzinfo=self.time_zone
-)
+self.from_date = self.from_date.replace(tzinfo=self.time_zone)
 else:
 self.from_date = self.from_date.astimezone(self.time_zone)
 if isinstance(self.to_date, datetime):
 if self.to_date.tzinfo is None:
 # Timezone-naive constraint is interpreted as being in the
 # widget time zone.
-if hasattr(self.time_zone, "localize"):  # pytz
-self.to_date = self.time_zone.localize(self.to_date)
-else:
-self.to_date = self.to_date.replace(tzinfo=self.time_zone)
+self.to_date = self.to_date.replace(tzinfo=self.time_zone)
 else:
 self.to_date = self.to_date.astimezone(self.time_zone)
 
@@ -426,10 +418,7 @@ class DateTimeWidget(TextWidget):
 dt = datetime(year, month, day, hour, minute, int(second), micro)
 except (DateTimeError, ValueError, IndexError) as v:
 raise ConversionError("Invalid date value", v)
-if hasattr(self.time_zone, "localize"):  # pytz
-return self.time_zone.localize(dt)
-else:
-return dt.replace(tzinfo=self.time_zone)
+return dt.replace(tzinfo=self.time_zone)
 
 def _toFormValue(self, value):
 """Convert a date to its string representation.
diff --git a/lib/lp/blueprints/browser/sprint.py b/lib/lp/blueprints/browser/sprint.py
index 41148c0..debe896 100644
--- a/lib/lp/blueprints/browser/sprint.py
+++ b/lib/lp/blueprints/browser/sprint.py
@@ -27,7 +27,7 @@ import io
 from collections import defaultdict
 from typing import List
 
-import pytz
+from dateutil import tz
 from lazr.restful.utils import s

[Launchpad-reviewers] [Merge] ~cjwatson/launchpad/+git/security:suppress-orm-addresses into launchpad:master

2023-06-14 Thread Colin Watson
Colin Watson has proposed merging 
~cjwatson/launchpad/+git/security:suppress-orm-addresses into launchpad:master.

Commit message:
Avoid showing memory addresses in API errors

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/security/+merge/444818

The `__repr__` for a number of Launchpad objects included their memory 
addresses.  I've never found this useful for debugging, and, since these 
sometimes show up in error messages on the webservice API, they could 
potentially allow bypassing ASLR in attacks on the appserver.  Remove memory 
addresses from `__repr__` throughout.

Reported by halfdog.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad/+git/security:suppress-orm-addresses into launchpad:master.
diff --git a/lib/lp/answers/browser/tests/views.rst b/lib/lp/answers/browser/tests/views.rst
index 5f58b10..e2458ac 100644
--- a/lib/lp/answers/browser/tests/views.rst
+++ b/lib/lp/answers/browser/tests/views.rst
@@ -17,7 +17,7 @@ Several views are used to handle the various operations on a question.
 
 >>> login("t...@canonical.com")
 >>> firefox_question.subscribe(firefox_question.owner)
-
+
 
 
 QuestionSubscriptionView
diff --git a/lib/lp/answers/doc/expiration.rst b/lib/lp/answers/doc/expiration.rst
index 3ef2ab2..18b467e 100644
--- a/lib/lp/answers/doc/expiration.rst
+++ b/lib/lp/answers/doc/expiration.rst
@@ -75,14 +75,14 @@ somebody are subject to expiration.
 >>> recent_open_question.giveInfo(
 ... "SVG works better now, but is still broken"
 ... )
-
+
 
 # This one was put in the NEEDSINFO state recently.
 >>> recent_needsinfo_question = questionset.get(4)
 >>> recent_needsinfo_question.requestInfo(
 ... no_priv, "What URL were you visiting?"
 ... )
-
+
 
 # Old open questions.
 >>> old_open_question = questionset.get(5)
@@ -91,7 +91,7 @@ somebody are subject to expiration.
 # to make sure that DB permissions are correct.
 >>> admin_team = getUtility(IPersonSet).getByName("admins")
 >>> old_open_question.subscribe(admin_team)
-
+
 >>> salgado = getUtility(IPersonSet).getByName("salgado")
 >>> old_open_question.target.addAnswerContact(salgado, salgado)
 True
diff --git a/lib/lp/answers/doc/notifications.rst b/lib/lp/answers/doc/notifications.rst
index de7700f..eab5b4a 100644
--- a/lib/lp/answers/doc/notifications.rst
+++ b/lib/lp/answers/doc/notifications.rst
@@ -326,7 +326,7 @@ giveInfo() transitions, let's see the other ones.
 # sent.
 
 >>> ubuntu_question.subscribe(sample_person)
-
+
 
 
 Notifications for expireQuestion()
@@ -746,7 +746,7 @@ the notifications.
 >>> pt_BR_question.giveInfo(
 ... "Veja o screenshot: http://tinyurl.com/y8jq8z";
 ... )
-
+
 
 >>> ignore = pop_questionemailjobs()
 
diff --git a/lib/lp/answers/doc/person.rst b/lib/lp/answers/doc/person.rst
index 3045fc4..1aa49cd 100644
--- a/lib/lp/answers/doc/person.rst
+++ b/lib/lp/answers/doc/person.rst
@@ -251,7 +251,7 @@ subscribed to...
 >>> pt_BR_question = getUtility(IQuestionSet).get(13)
 >>> login("foo@canonical.com")
 >>> pt_BR_question.subscribe(foo_bar_raw)
-
+
 
 >>> print(
 ... ", ".join(
@@ -267,7 +267,7 @@ subscribed to...
 
 >>> es_question = getUtility(IQuestionSet).get(12)
 >>> es_question.reject(foo_bar_raw, "Reject question.")
-
+
 
 >>> print(
 ... ", ".join(
@@ -297,7 +297,7 @@ subscribed to...
 >>> en_question = getUtility(IQuestionSet).get(1)
 >>> login("car...@canonical.com")
 >>> en_question.addComment(carlos_raw, "A simple comment.")
-
+
 
 >>> print(
 ... ", ".join(
diff --git a/lib/lp/answers/doc/question.rst b/lib/lp/answers/doc/question.rst
index 8f4e28c..825c8e3 100644
--- a/lib/lp/answers/doc/question.rst
+++ b/lib/lp/answers/doc/question.rst
@@ -89,7 +89,7 @@ Questions are manipulated through the IQuestion interface.
 The person who submitted the question is available in the owner field.
 
 >>> firefox_question.owner
-
+
 
 When the question is created, the owner is added to the question's
 subscribers.
diff --git a/lib/lp/answers/doc/questionsets.rst b/lib/lp/answers/doc/questionsets.rst
index d2eb057..5431d84 100644
--- a/lib/lp/answers/doc/questionsets.rst
+++ b/lib/lp/answers/doc/questionsets.rst
@@ -304,7 +304,7 @@ It returns the number of open questions for each given package.
 >>> closed_question.setStatus(
 ... closed_question.owner, QuestionStatus.SOLVED, "no comment"
 ... )
-
+
 
 >>> packages = (
 ... ubuntu_evolution,
diff --git a/lib/lp/answers/doc/workflow.rst b/lib/lp/answers/doc/workflow.rst
index 770d60b..bf4d134 100644
--- a/lib/lp/answers/doc/workflow.rst
+++ b/lib/lp/answers/doc/workflow.rst
@@ -618,7 +618,7 @@ Users without launchpa

[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:update-pkgcache-binary-race into launchpad:master

2023-06-14 Thread Colin Watson
Colin Watson has proposed merging 
~cjwatson/launchpad:update-pkgcache-binary-race into launchpad:master.

Commit message:
Fix update-pkgcache crash due to binary deletion

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #2023698 in Launchpad itself: "update-pkgcache crashing with OOPS"
  https://bugs.launchpad.net/launchpad/+bug/2023698

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/444768

The `update-pkgcache` script started crashing on production about a week ago, 
and mysteriously started working again today without us changing anything.  
Based on code inspection, the only way I can see for this particular crash to 
happen is if a binary was deleted between 
`DistroSeriesPackageCache.findCurrentBinaryPackageNames` and 
`DistroSeriesPackageCache._update` (`update-pkgcache` is slow enough that it 
makes many commits along the way, so this is possible), and simulating that in 
a test reproduces the same crash.

It seems safe to skip the affected binary in such cases, since 
`DistroSeriesPackageCache.removeOld` will eventually clean up its cache entries.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:update-pkgcache-binary-race into launchpad:master.
diff --git a/lib/lp/soyuz/model/distroseriespackagecache.py b/lib/lp/soyuz/model/distroseriespackagecache.py
index bedc2fd..93d3b3e 100644
--- a/lib/lp/soyuz/model/distroseriespackagecache.py
+++ b/lib/lp/soyuz/model/distroseriespackagecache.py
@@ -77,6 +77,10 @@ class DistroSeriesPackageCache(StormBase):
 ),
 )
 .config(distinct=True)
+# Not necessary for correctness, but useful for testability; and
+# at the time of writing the sort only adds perhaps 10-20 ms to
+# the query time on staging.
+.order_by(BinaryPackagePublishingHistory.binarypackagenameID)
 )
 return bulk.load(BinaryPackageName, bpn_ids)
 
@@ -204,6 +208,14 @@ class DistroSeriesPackageCache(StormBase):
 )
 
 for bpn in binarypackagenames:
+if bpn not in details_map:
+log.debug(
+"No active publishing details found for %s; perhaps "
+"removed in parallel with update-pkgcache?  Skipping.",
+bpn.name,
+)
+continue
+
 cache = cache_map[bpn]
 details = details_map[bpn]
 # make sure the cached name, summary and description are correct
diff --git a/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py b/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
index 875e956..5560b57 100644
--- a/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
+++ b/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
@@ -6,8 +6,11 @@
 import transaction
 
 from lp.services.log.logger import BufferLogger
+from lp.soyuz.enums import PackagePublishingStatus
+from lp.soyuz.model.distroseriespackagecache import DistroSeriesPackageCache
 from lp.soyuz.scripts.update_pkgcache import PackageCacheUpdater
 from lp.testing import TestCaseWithFactory
+from lp.testing.dbuser import dbuser
 from lp.testing.layers import ZopelessDatabaseLayer
 
 
@@ -34,10 +37,61 @@ class TestPackageCacheUpdater(TestCaseWithFactory):
 self.assertEqual(0, archive.sources_cached)
 self.factory.makeSourcePackagePublishingHistory(archive=archive)
 script = self.makeScript()
-script.updateDistributionCache(distribution, archives[0])
-archives[0].updateArchiveCache()
+with dbuser(self.dbuser):
+script.updateDistributionCache(distribution, archives[0])
+archives[0].updateArchiveCache()
 self.assertEqual(1, archives[0].sources_cached)
 archives[1].disable()
-script.updateDistributionCache(distribution, archives[1])
-archives[1].updateArchiveCache()
+with dbuser(self.dbuser):
+script.updateDistributionCache(distribution, archives[1])
+archives[1].updateArchiveCache()
 self.assertEqual(0, archives[1].sources_cached)
+
+def test_binary_deleted_during_run(self):
+distroseries = self.factory.makeDistroSeries()
+das = self.factory.makeDistroArchSeries(distroseries=distroseries)
+archive = self.factory.makeArchive(
+distribution=distroseries.distribution
+)
+bpns = [self.factory.makeBinaryPackageName() for _ in range(4)]
+bpphs = [
+self.factory.makeBinaryPackagePublishingHistory(
+binarypackagename=bpn,
+distroarchseries=das,
+status=PackagePublishingStatus.PUBLISHED,
+archive=archive,
+)
+for bpn in bpns
+]
+
+class InstrumentedTransaction:
+def commit(self):
+transaction.commit()
+# 

[Launchpad-reviewers] [Merge] ~cjwatson/launchpad-buildd:readthedocs-config into launchpad-buildd:master

2023-06-14 Thread Colin Watson
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:readthedocs-config 
into launchpad-buildd:master.

Commit message:
Refine readthedocs configuration

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/444743

This applies some post-merge review suggestions from 
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/444726.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad-buildd:readthedocs-config into launchpad-buildd:master.
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index faed046..a95166c 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -3,7 +3,8 @@ version: 2
 build:
   os: ubuntu-22.04
   tools:
-python: "3.11"
+python: "3"
 
 sphinx:
   configuration: docs/conf.py
+  fail_on_warning: true
___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread mp+444719
The proposal to merge 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444719
-- 
Your team Launchpad code reviewers is subscribed to branch 
lp:lp-production-crontabs.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Colin Misare
Review: Approve

LGTM
-- 
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444719
Your team Launchpad code reviewers is subscribed to branch 
lp:lp-production-crontabs.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] ~cjwatson/launchpad-buildd:readthedocs-config into launchpad-buildd:master

2023-06-14 Thread Colin Watson
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:readthedocs-config 
into launchpad-buildd:master.

Commit message:
Add .readthedocs.yaml

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/444726

See: https://blog.readthedocs.com/migrate-configuration-v2/

I got an email today telling us we need to do this for a bunch of our projects, 
so I thought I'd try it out with a simple case first to see what happens.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad-buildd:readthedocs-config into launchpad-buildd:master.
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 000..faed046
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,9 @@
+version: 2
+
+build:
+  os: ubuntu-22.04
+  tools:
+python: "3.11"
+
+sphinx:
+  configuration: docs/conf.py
___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] ~pelpsi/launchpad-layers:launchpad-publisher-parts into launchpad-layers:main

2023-06-14 Thread Simone Pelosi
Simone Pelosi has proposed merging 
~pelpsi/launchpad-layers:launchpad-publisher-parts into launchpad-layers:main.

Commit message:
Added launchpad-publisher-parts layer

Added a new layer that will be used by the publisher charm to call run-parts 
algorithm on a given repository with a given revision number



Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pelpsi/launchpad-layers/+git/launchpad-layers/+merge/444721
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~pelpsi/launchpad-layers:launchpad-publisher-parts into launchpad-layers:main.
diff --git a/launchpad-publisher-parts/config.yaml b/launchpad-publisher-parts/config.yaml
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/launchpad-publisher-parts/config.yaml
diff --git a/launchpad-publisher-parts/icon.svg b/launchpad-publisher-parts/icon.svg
new file mode 100644
index 000..b2889cc
--- /dev/null
+++ b/launchpad-publisher-parts/icon.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg"; viewBox="0 0 165.39062 165.39062">.cls-1{fill:#e9500e;}.cls-2{fill:#fff;}
\ No newline at end of file
diff --git a/launchpad-publisher-parts/layer.yaml b/launchpad-publisher-parts/layer.yaml
new file mode 100644
index 000..69f7ca7
--- /dev/null
+++ b/launchpad-publisher-parts/layer.yaml
@@ -0,0 +1,7 @@
+includes:
+  - layer:basic
+options:
+  launchpad-publisher-parts:
+repository: lp:ubuntu-archive-publishing
+revision: 123
+repo: https://git.launchpad.net/launchpad-layers
diff --git a/launchpad-publisher-parts/lib/charms/launchpad/parts.py b/launchpad-publisher-parts/lib/charms/launchpad/parts.py
new file mode 100644
index 000..e09e6b3
--- /dev/null
+++ b/launchpad-publisher-parts/lib/charms/launchpad/parts.py
@@ -0,0 +1,28 @@
+# Copyright 2022 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+import os.path
+import subprocess
+
+from charmhelpers.core import hookenv
+
+
+# Get bzr branch at given revision
+def get_bzr_repository(repository, revision=-1):
+hookenv.log("Getting " + repository + " -r " + str(revision))
+
+bzr_cmd = "bzr branch " + repository
+rev_arg = ""
+if revision:
+rev_arg = " -r " + str(revision)
+bzr_cmd += rev_arg
+
+subprocess.check_call(bzr_cmd, shell=True)
+
+
+# Call run-parts algorithm on a given folder
+def run_parts_on_folder(wd="."):
+hookenv.log("Calling run-parts in folder " + wd)
+
+if os.path.isdir(wd):
+subprocess.check_call(["sudo", "run-parts", wd])
diff --git a/launchpad-publisher-parts/reactive/launchpad-publisher-parts.py b/launchpad-publisher-parts/reactive/launchpad-publisher-parts.py
new file mode 100644
index 000..c779655
--- /dev/null
+++ b/launchpad-publisher-parts/reactive/launchpad-publisher-parts.py
@@ -0,0 +1,26 @@
+# Copyright 2022 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+from charms.launchpad.parts import get_bzr_repository, run_parts_on_folder
+from charms.layer import options
+from charms.reactive import set_flag, when_not
+
+
+def run_parts_on_repository():
+repository = (
+options().get("launchpad-publisher-parts", {}).get("repository", "")
+)
+revision = (
+options().get("launchpad-publisher-parts", {}).get("revision", "")
+)
+
+# Expecting a bzr repository lp:repo-name
+folder = repository.split(":")[1]
+get_bzr_repository(repository, revision)
+run_parts_on_folder(folder)
+
+
+@when_not("launchpad.publisher-parts.configured")
+def configure():
+run_parts_on_repository()
+set_flag("launchpad.publisher-parts.configured")
diff --git a/launchpad-publisher-parts/templates/macros.j2 b/launchpad-publisher-parts/templates/macros.j2
new file mode 100644
index 000..8cddb14
--- /dev/null
+++ b/launchpad-publisher-parts/templates/macros.j2
@@ -0,0 +1,6 @@
+{#- An optional configuration entry. #}
+{%- macro opt(name, value) %}
+{%-   if value is defined and value is not none %}
+{{ name }}: {{ value }}
+{%-   endif %}
+{%- endmacro %}
___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Ines Almeida
Updated the time for mantic lang export
-- 
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444719
Your team Launchpad code reviewers is subscribed to branch 
lp:lp-production-crontabs.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Colin Watson
Review: Approve



Diff comments:

> === modified file 'scripts.lp.internal-launchpad'
> --- scripts.lp.internal-launchpad 2023-05-31 18:01:50 +
> +++ scripts.lp.internal-launchpad 2023-06-14 09:46:40 +
> @@ -26,9 +26,7 @@
>  30 10 * * 2 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu focal --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
>  30 10 * * 3 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu trusty --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
>  30 10 * * 4 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu bionic --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
> -30 10 * * 5 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu lunar --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
> -30 10 * * 6 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu kinetic --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
> -30 12 * * 0 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu mantic --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
> +30 12 * * 5 nice -16 $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py 
> ubuntu mantic --force-utf8-encoding -q 
> --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log

This could go back to `30 10 * * 5` (i.e. matching the same hour as all the 
other jobs) now that we no longer need to deal with having more exports than we 
have days in the week.

>  
>  # Archive package cache updater
>  19 7 * * * $LP_PY 
> /srv/launchpad.net/production/launchpad/cronscripts/update-pkgcache.py -q 
> --log-file=/srv/launchpad.net/production-logs/update-pkgcache.log


-- 
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444719
Your team Launchpad code reviewers is subscribed to branch 
lp:lp-production-crontabs.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Ines Almeida
Ines Almeida has proposed merging 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs.

Commit message:
Remove kinetic and lunar lang pack exports

Update mantic lang export date

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444719

Updated the Mantic export date so it runs on a different day from xenial
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs.
=== modified file 'scripts.lp.internal-launchpad'
--- scripts.lp.internal-launchpad	2023-05-31 18:01:50 +
+++ scripts.lp.internal-launchpad	2023-06-14 09:46:40 +
@@ -26,9 +26,7 @@
 30 10 * * 2 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu focal --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 10 * * 3 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu trusty --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 10 * * 4 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu bionic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
-30 10 * * 5 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu lunar --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
-30 10 * * 6 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu kinetic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
-30 12 * * 0 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu mantic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
+30 12 * * 5 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu mantic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 
 # Archive package cache updater
 19 7 * * * $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/update-pkgcache.py -q --log-file=/srv/launchpad.net/production-logs/update-pkgcache.log

___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] ~petermakowski/launchpad:update-description-font-size into launchpad:master

2023-06-14 Thread Otto Co-Pilot
The proposal to merge ~petermakowski/launchpad:update-description-font-size 
into launchpad:master has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~petermakowski/launchpad/+git/launchpad/+merge/444647
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~petermakowski/launchpad:update-description-font-size into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~petermakowski/launchpad/+git/launchpad:update-description-font-size into ~launchpad/launchpad/+git/launchpad:master

2023-06-14 Thread Otto Co-Pilot
Voting criteria not met
https://jenkins.ols.canonical.com/online-services/job/launchpad/3266/
-- 
https://code.launchpad.net/~petermakowski/launchpad/+git/launchpad/+merge/444647
Your team Launchpad code reviewers is requested to review the proposed merge of 
~petermakowski/launchpad:update-description-font-size into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] ~petermakowski/launchpad:update-description-font-size into launchpad:master

2023-06-14 Thread Colin Watson
The proposal to merge ~petermakowski/launchpad:update-description-font-size 
into launchpad:master has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~petermakowski/launchpad/+git/launchpad/+merge/444647
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~petermakowski/launchpad:update-description-font-size into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~petermakowski/launchpad:update-description-font-size into launchpad:master

2023-06-14 Thread Colin Watson
Review: Approve

It may be worth grepping for font-family - there are a few other places that 
look similar.  But this change looks fine, and addresses the most glaring 
mismatch I've noticed.  Thanks!
-- 
https://code.launchpad.net/~petermakowski/launchpad/+git/launchpad/+merge/444647
Your team Launchpad code reviewers is requested to review the proposed merge of 
~petermakowski/launchpad:update-description-font-size into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Ines Almeida
The proposal to merge 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs has been updated.

Status: Needs review => Work in progress

For more details, see:
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444717
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into lp:lp-production-crontabs

2023-06-14 Thread Ines Almeida
Ines Almeida has proposed merging 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs.

Commit message:
Remove kinetic and lunar lang export crontabs

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/lp-production-crontabs/update-lang-pack-exports/+merge/444717
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~ines-almeida/lp-production-crontabs/update-lang-pack-exports into 
lp:lp-production-crontabs.
=== modified file 'scripts.lp.internal-launchpad'
--- scripts.lp.internal-launchpad	2023-05-31 18:01:50 +
+++ scripts.lp.internal-launchpad	2023-06-14 09:36:13 +
@@ -26,9 +26,12 @@
 30 10 * * 2 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu focal --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 10 * * 3 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu trusty --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 10 * * 4 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu bionic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
+<<< TREE
 30 10 * * 5 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu lunar --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 10 * * 6 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu kinetic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
 30 12 * * 0 nice -16 $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/language-pack-exporter.py ubuntu mantic --force-utf8-encoding -q --log-file=INFO:/srv/launchpad.net/production-logs/rosetta/language-pack-exporter.log
+===
+>>> MERGE-SOURCE
 
 # Archive package cache updater
 19 7 * * * $LP_PY /srv/launchpad.net/production/launchpad/cronscripts/update-pkgcache.py -q --log-file=/srv/launchpad.net/production-logs/update-pkgcache.log

___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp