From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D412D71628 for ; Thu, 8 Apr 2021 11:21:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B8FA8192F3 for ; Thu, 8 Apr 2021 11:21:05 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id D7D32192E8 for ; Thu, 8 Apr 2021 11:21:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id A017641F8D for ; Thu, 8 Apr 2021 11:21:03 +0200 (CEST) Date: Thu, 8 Apr 2021 11:21:01 +0200 From: Dominic =?iso-8859-1?Q?J=E4ger?= To: Thomas Lamprecht , Proxmox VE development discussion Cc: Proxmox VE development discussion Message-ID: <20210408092101.GA8824@mala> References: <20210407083045.62463-1-d.jaeger@proxmox.com> <20210407083045.62463-2-d.jaeger@proxmox.com> <1f8805e2-27e2-57fb-b49c-cd7767d0c09f@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1f8805e2-27e2-57fb-b49c-cd7767d0c09f@proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 AWL 1.599 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH manager 2/2] Close #1295: Make apt notifications configurable X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 09:21:35 -0000 On Wed, Apr 07, 2021 at 10:51:43AM +0200, Thomas Lamprecht wrote: > On 07.04.21 10:30, Dominic Jäger wrote: > > -# We assume that users with subscriptions want informations > > -# about new packages. > > -my $notify = ($info && $info->{status} eq 'Active') ? 1 : 0; > > +my $notify = $dccfg->{notify_updates} // 1; > > We may want to keep the default value the same, i.e.: > > my $notify = $dccfg->{notify_updates} // ($info && $info->{status} eq 'Active'); Is there a reason why we assume that users without subscription do not want such notifications? As far as I see it, if we change it to > $dccfg->{notify_updates} // 1 Then (until they change something) - users with active subscription should _continue_ to get notifications - enterprise repo configured but invalid subscription will continue to _not_ get mails (because pveupdate exits with error 100) Then the only change is that users - without/invalid subscription and - with only no-subscription-repo configured will now suddenly get mails, but this is actually good? We could also append a line "You can deactivate these notifications in the Datacenter options" to the mail. > > (the following is actually meant for the pve-cluster patch): > I'd really prefer using a colon for new config property entries, and I can imagine > that there will be more such switches in the future, so maybe start out with a format > sting (like migration is there) and have something like: > > 'notify: package-updates=1' > > what do you think? Done :) So the mentioned > $dccfg->{notify_updates} // 1 is actually > my $notify = $dccfg->{notify}->{package_updates} // 1; already.