On 2024-08-21 19:32:14, Georg Faerber wrote:
> Control: X-Debbugs-CC dswarbr...@debian.org
>
> Hi all,
>
> On 24-08-21 14:52:07, Antoine Beaupré wrote:
>> Not sure how to proceed here, but here's a debdiff:
>
> Thanks -- there is also #1077694 which asks for more fixes in regards to
> apt_info.py to land in bookworm.
>
> I think the way forward would be to create a another
> prometheus-node-exporter-collectors bookworm-pu request and volunteer to
> do so.

No objections, but I already have a debdiff in testing here you might
want to start from. :)

I'll push it to the debian/bookworm branch on salsa and you can start
from there?

https://salsa.debian.org/go-team/packages/prometheus-node-exporter-collectors/-/commit/cbce1f6e5a5edf269ac6b555c67c31ae1fc3bc03

I also attached the email i planned on sending to create the bug, but
that might need an update if we ship more stuff.

Would be happy to see you carry this forward!

A.

-- 
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.

---- cut here ---

To: Debian Bug Tracking System <sub...@bugs.debian.org>
Subject: bookworm-pu: package 
prometheus-node-exporter-collectors/0.0~git20230203.6f710f8-1+deb12u2

Package: release.debian.org
Control: affects -1 + src:prometheus-node-exporter-collectors
X-Debbugs-Cc: prometheus-node-exporter-collect...@packages.debian.org
User: release.debian....@packages.debian.org
Usertags: pu
Tags: bookworm
X-Debbugs-Cc: ge...@debian.org
Severity: normal

Hi!

[ Reason ]
deb12u1 of this package introduced a new metric,
`apt_package_cache_timestamp_seconds`, or at least tried to. I messed
up the patch and the package doesn't actually produce the metric
correctly.

[ Impact ]
In that update (#1055115), I said:

> The second and third patch add a new metric which keeps track of the
> last update timestamp on the apt metadata.
[ 2 more citation lines. Click/Enter to show. ]
> 
> That is important: previously, the script was running apt-update so we
> could be pretty sure it was running automatically. But by making this
> change, we're *not* running apt-update automatically and assume users
> have properly setup something *else* that does.

We're not doing this correctly, and people might be mistakenly
thinking their systems are secure, with no way of monitoring for
failure.

[ Tests ]
There are no autopkgtests on this package. I've tested the package in
production on our fleet of servers with no ill effects.

[ Risks ]
Close to none. Patch is effectively a two-liner, trivial, if you ignore
the quilt patch stack noise.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Properly call the newly declared _write_cache_timestamps() function,
fixing its signature that mistakenly carried the non-existent
"registry" variable from the stable version.

[ Other info ]
Thanks to georg for the heads up.

[ 
prometheus-node-exporter-collectors_0.0~git20230203.6f710f8-1+deb12u2.debdiff: 
text/x-diff ]
diff -Nru 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/changelog 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/changelog
--- 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/changelog    
    2023-10-31 13:57:52.000000000 -0400
+++ 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/changelog    
    2024-08-21 14:46:21.000000000 -0400
@@ -1,3 +1,10 @@
+prometheus-node-exporter-collectors (0.0~git20230203.6f710f8-1+deb12u2) 
bookworm; urgency=medium
+
+  * Team upload
+  * Add missing `apt_package_cache_timestamp_seconds` metrics ommitted from 
previous upload.
+
+ -- Antoine Beaupré <anar...@debian.org>  Wed, 21 Aug 2024 14:46:21 -0400
+
 prometheus-node-exporter-collectors (0.0~git20230203.6f710f8-1+deb12u1) 
bookworm; urgency=medium

   * Team upload
diff -Nru 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-report-the-apt-cache-timestamp.patch
 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-report-the-apt-cache-timestamp.patch
--- 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-report-the-apt-cache-timestamp.patch
        2023-10-31 13:57:52.000000000 -0400
+++ 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-report-the-apt-cache-timestamp.patch
        2024-08-21 14:46:21.000000000 -0400
@@ -35,7 +35,7 @@
      print(f"apt_autoremove_pending {len(autoremovable_packages)}")


-+def _write_cache_timestamps(registry):
++def _write_cache_timestamps():
 +    print('# HELP apt_package_cache_timestamp_seconds Apt update last run 
time.')
 +    print('# TYPE apt_package_cache_timestamp_seconds gauge')
 +    try:
diff -Nru 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-use-a-better-heuristic-for-the-apt-update-last-run-t.patch
 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-use-a-better-heuristic-for-the-apt-update-last-run-t.patch
--- 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-use-a-better-heuristic-for-the-apt-update-last-run-t.patch
  2023-10-31 13:57:52.000000000 -0400
+++ 
prometheus-node-exporter-collectors-0.0~git20230203.6f710f8/debian/patches/0001-use-a-better-heuristic-for-the-apt-update-last-run-t.patch
  2024-08-21 14:46:21.000000000 -0400
@@ -39,7 +39,7 @@
  import os

 @@ -80,10 +81,18 @@ def _write_autoremove_pending(cache):
- def _write_cache_timestamps(registry):
+ def _write_cache_timestamps():
      print('# HELP apt_package_cache_timestamp_seconds Apt update last run 
time.')
      print('# TYPE apt_package_cache_timestamp_seconds gauge')
 +    apt_pkg.init_config()
@@ -58,3 +58,11 @@
          )
      except OSError:
          pass
+@@ -104,6 +113,7 @@ def _main():
+     _write_pending_upgrades(cache)
+     _write_held_upgrades(cache)
+     _write_autoremove_pending(cache)
++    _write_cache_timestamps()
+     _write_reboot_required()
+ 
+ 

Reply via email to