public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default
@ 2025-11-04  7:34 Hannes Laimer
  2025-11-04  8:58 ` Christian Ebner
  0 siblings, 1 reply; 5+ messages in thread
From: Hannes Laimer @ 2025-11-04  7:34 UTC (permalink / raw)
  To: pbs-devel

There is no reason to still default to only listing pulling jobs.

Reported-by: https://forum.proxmox.com/threads/pbs-api-aufruf.175211/
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/api2/admin/sync.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/api2/admin/sync.rs b/src/api2/admin/sync.rs
index 6722ebea..c21a6909 100644
--- a/src/api2/admin/sync.rs
+++ b/src/api2/admin/sync.rs
@@ -23,18 +23,17 @@ use crate::{
     server::sync::do_sync_job,
 };
 
-// FIXME: 4.x make 'all' the default
 #[api()]
 #[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 /// The direction of the listed sync jobs: push, pull or all.
 pub enum ListSyncDirection {
     /// All directions
+    #[default]
     All,
     /// Sync direction push
     Push,
     /// Sync direction pull
-    #[default]
     Pull,
 }
 
-- 
2.47.3



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default
  2025-11-04  7:34 [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default Hannes Laimer
@ 2025-11-04  8:58 ` Christian Ebner
  2025-11-05 14:14   ` Thomas Lamprecht
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Ebner @ 2025-11-04  8:58 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Hannes Laimer

On 11/4/25 8:34 AM, Hannes Laimer wrote:
> There is no reason to still default to only listing pulling jobs.

Well, this was overlooked for PBS 4.0, but I'm afraid the change needs 
to be postponed to PBS version 5.0, as this is a breaking API change.

> 
> Reported-by: https://forum.proxmox.com/threads/pbs-api-aufruf.175211/
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>   src/api2/admin/sync.rs | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/api2/admin/sync.rs b/src/api2/admin/sync.rs
> index 6722ebea..c21a6909 100644
> --- a/src/api2/admin/sync.rs
> +++ b/src/api2/admin/sync.rs
> @@ -23,18 +23,17 @@ use crate::{
>       server::sync::do_sync_job,
>   };
>   
> -// FIXME: 4.x make 'all' the default
>   #[api()]
>   #[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
>   #[serde(rename_all = "kebab-case")]
>   /// The direction of the listed sync jobs: push, pull or all.
>   pub enum ListSyncDirection {
>       /// All directions
> +    #[default]
>       All,
>       /// Sync direction push
>       Push,
>       /// Sync direction pull
> -    #[default]
>       Pull,
>   }
>   


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default
  2025-11-04  8:58 ` Christian Ebner
@ 2025-11-05 14:14   ` Thomas Lamprecht
  2025-11-05 14:19     ` Fabian Grünbichler
  2025-11-05 14:21     ` Christian Ebner
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2025-11-05 14:14 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Christian Ebner,
	Hannes Laimer

Am 04.11.25 um 09:58 schrieb Christian Ebner:
> On 11/4/25 8:34 AM, Hannes Laimer wrote:
>> There is no reason to still default to only listing pulling jobs.
> 
> Well, this was overlooked for PBS 4.0, but I'm afraid the change needs to be postponed to PBS version 5.0, as this is a breaking API change.
> 

This really just listing the specific job types IIUC?

Returning new stuff is generally not a breaking change, here it was done
to avoid confusing clients that are to old [0]. Albeit I'm now actually
wondering which client can get confused? Third party integrations? As
our CLI client has no support for managing sync jobs from a PBS, and the
web UI might only have issues when a outdated version was loaded from the
cache.

Anyhow, even if I'm overlooking something now: while we want to have good
forward compatibility support, especially for point releases from the same
major release, this was introduced for PBS 3.3 about year ago. This means
all officially supported clients and PBS support it, and as it's not related
to backup protocol (write or restore), I really do not think we should let
us hold back here, as in practice nothing will change w.r.t. compat compared
to changing this already for 4.0 proper, and – again, if I do not miss
something – this change really seems unproblematic in general.

[0]: commit 403ad1f6d ("api: admin: sync: add optional 'all' sync type for
     listing")


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default
  2025-11-05 14:14   ` Thomas Lamprecht
@ 2025-11-05 14:19     ` Fabian Grünbichler
  2025-11-05 14:21     ` Christian Ebner
  1 sibling, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2025-11-05 14:19 UTC (permalink / raw)
  To: Christian Ebner, Hannes Laimer,
	Proxmox Backup Server development discussion

On November 5, 2025 3:14 pm, Thomas Lamprecht wrote:
> Am 04.11.25 um 09:58 schrieb Christian Ebner:
>> On 11/4/25 8:34 AM, Hannes Laimer wrote:
>>> There is no reason to still default to only listing pulling jobs.
>> 
>> Well, this was overlooked for PBS 4.0, but I'm afraid the change needs to be postponed to PBS version 5.0, as this is a breaking API change.
>> 
> 
> This really just listing the specific job types IIUC?
> 
> Returning new stuff is generally not a breaking change, here it was done
> to avoid confusing clients that are to old [0]. Albeit I'm now actually
> wondering which client can get confused? Third party integrations? As
> our CLI client has no support for managing sync jobs from a PBS, and the
> web UI might only have issues when a outdated version was loaded from the
> cache.
> 
> Anyhow, even if I'm overlooking something now: while we want to have good
> forward compatibility support, especially for point releases from the same
> major release, this was introduced for PBS 3.3 about year ago. This means
> all officially supported clients and PBS support it, and as it's not related
> to backup protocol (write or restore), I really do not think we should let
> us hold back here, as in practice nothing will change w.r.t. compat compared
> to changing this already for 4.0 proper, and – again, if I do not miss
> something – this change really seems unproblematic in general.

IIRC the worry was that by listing all by default, a RMW cycle might
switch from push to pull if the client doing it doesn't understand that
there are multiple types now?

> [0]: commit 403ad1f6d ("api: admin: sync: add optional 'all' sync type for
>      listing")
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default
  2025-11-05 14:14   ` Thomas Lamprecht
  2025-11-05 14:19     ` Fabian Grünbichler
@ 2025-11-05 14:21     ` Christian Ebner
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Ebner @ 2025-11-05 14:21 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox Backup Server development discussion,
	Hannes Laimer

On 11/5/25 3:14 PM, Thomas Lamprecht wrote:
> Am 04.11.25 um 09:58 schrieb Christian Ebner:
>> On 11/4/25 8:34 AM, Hannes Laimer wrote:
>>> There is no reason to still default to only listing pulling jobs.
>>
>> Well, this was overlooked for PBS 4.0, but I'm afraid the change needs to be postponed to PBS version 5.0, as this is a breaking API change.
>>
> 
> This really just listing the specific job types IIUC?
 >> Returning new stuff is generally not a breaking change, here it was done
> to avoid confusing clients that are to old [0]. Albeit I'm now actually
> wondering which client can get confused? Third party integrations? As
> our CLI client has no support for managing sync jobs from a PBS, and the
> web UI might only have issues when a outdated version was loaded from the
> cache.

Yes, now all the sync jobs would be returned when no specific direction 
was specified. Therefore this might cause issues for api consumers which 
do not expect that.

But fallout from this is probably rather limited and easily fixed on 
consumer side by also providing the flag to only list pull sync jobs 
again if required.
> Anyhow, even if I'm overlooking something now: while we want to have good
> forward compatibility support, especially for point releases from the same
> major release, this was introduced for PBS 3.3 about year ago. This means
> all officially supported clients and PBS support it, and as it's not related
> to backup protocol (write or restore), I really do not think we should let
> us hold back here, as in practice nothing will change w.r.t. compat compared
> to changing this already for 4.0 proper, and – again, if I do not miss
> something – this change really seems unproblematic in general.
> 
> [0]: commit 403ad1f6d ("api: admin: sync: add optional 'all' sync type for
>       listing")



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-05 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04  7:34 [pbs-devel] [PATCH] api: sync: list `all` instead of only `pull` synch jobs by default Hannes Laimer
2025-11-04  8:58 ` Christian Ebner
2025-11-05 14:14   ` Thomas Lamprecht
2025-11-05 14:19     ` Fabian Grünbichler
2025-11-05 14:21     ` Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal