Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kanidm for openSUSE:Factory checked 
in at 2022-09-09 18:28:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kanidm (Old)
 and      /work/SRC/openSUSE:Factory/.kanidm.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kanidm"

Fri Sep  9 18:28:08 2022 rev:13 rq:1002227 version:1.1.0~alpha9~git6.b20d5312

Changes:
--------
--- /work/SRC/openSUSE:Factory/kanidm/kanidm.changes    2022-08-27 
11:49:48.533806829 +0200
+++ /work/SRC/openSUSE:Factory/.kanidm.new.2083/kanidm.changes  2022-09-09 
18:29:36.945281639 +0200
@@ -1,0 +2,6 @@
+Fri Sep 09 02:33:47 UTC 2022 - william.br...@suse.com
+
+- Update to version 1.1.0~alpha9~git6.b20d5312:
+  * Resolve upgrade in place error with cbor to json (#1028)
+
+-------------------------------------------------------------------

Old:
----
  kanidm-1.1.0~alpha9~git5.98546259.tar.xz

New:
----
  kanidm-1.1.0~alpha9~git6.b20d5312.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kanidm.spec ++++++
--- /var/tmp/diff_new_pack.2Pyx6a/_old  2022-09-09 18:29:37.809283855 +0200
+++ /var/tmp/diff_new_pack.2Pyx6a/_new  2022-09-09 18:29:37.813283865 +0200
@@ -19,7 +19,7 @@
 %global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2
 
 Name:           kanidm
-Version:        1.1.0~alpha9~git5.98546259
+Version:        1.1.0~alpha9~git6.b20d5312
 Release:        0
 Summary:        A identity management service and clients.
 License:        ( Apache-2.0 OR BSL-1.0 ) AND ( Apache-2.0 OR ISC OR MIT ) AND 
( Apache-2.0 OR MIT ) AND ( Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT 
) AND ( CC0-1.0 OR Apache-2.0 ) AND ( MIT OR Apache-2.0 OR Zlib ) AND ( 
Unlicense OR MIT ) AND ( Zlib OR Apache-2.0 OR MIT ) AND Apache-2.0 AND 
BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND MPL-2.0 AND 
MPL-2.0+

++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.2Pyx6a/_old  2022-09-09 18:29:37.845283947 +0200
+++ /var/tmp/diff_new_pack.2Pyx6a/_new  2022-09-09 18:29:37.849283957 +0200
@@ -3,8 +3,12 @@
   <hardware>
     <processors>2</processors>
     <memory>
-      <size unit="G">4</size>
+      <size unit="G">8</size>
     </memory>
+    <disk>
+      <!-- Needed because OBS workers chronically run out of disk because 
sigghhh -->
+      <size unit="G">25</size>
+    </disk>
   </hardware>
 </constraints>
 

++++++ kanidm-1.1.0~alpha9~git5.98546259.tar.xz -> 
kanidm-1.1.0~alpha9~git6.b20d5312.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kanidm-1.1.0~alpha9~git5.98546259/kanidm_unix_int/src/db.rs 
new/kanidm-1.1.0~alpha9~git6.b20d5312/kanidm_unix_int/src/db.rs
--- old/kanidm-1.1.0~alpha9~git5.98546259/kanidm_unix_int/src/db.rs     
2022-08-26 08:02:02.000000000 +0200
+++ new/kanidm-1.1.0~alpha9~git6.b20d5312/kanidm_unix_int/src/db.rs     
2022-09-09 04:20:49.000000000 +0200
@@ -277,20 +277,25 @@
             return Err(());
         }
 
-        let r: Result<Option<(_, _)>, ()> = data
-            .first()
-            .map(|(token, expiry)| {
-                // token convert with json.
-                let t = serde_json::from_slice(token.as_slice()).map_err(|e| {
-                    error!("json error -> {:?}", e);
-                })?;
-                let e = u64::try_from(*expiry).map_err(|e| {
-                    error!("u64 convert error -> {:?}", e);
-                })?;
-                Ok((t, e))
-            })
-            .transpose();
-        r
+        if let Some((token, expiry)) = data.first() {
+            // token convert with json.
+            // If this errors, we specifically return Ok(None) because that 
triggers
+            // the cache to refetch the token.
+            match serde_json::from_slice(token.as_slice()) {
+                Ok(t) => {
+                    let e = u64::try_from(*expiry).map_err(|e| {
+                        error!("u64 convert error -> {:?}", e);
+                    })?;
+                    Ok(Some((t, e)))
+                }
+                Err(e) => {
+                    warn!("recoverable - json error -> {:?}", e);
+                    Ok(None)
+                }
+            }
+        } else {
+            Ok(None)
+        }
     }
 
     pub fn get_accounts(&self) -> Result<Vec<UnixUserToken>, ()> {
@@ -314,14 +319,18 @@
 
         let data = data?;
 
-        data.iter()
-            .map(|token| {
+        Ok(data
+            .iter()
+            // We filter map here so that anything invalid is skipped.
+            .filter_map(|token| {
                 // token convert with json.
-                serde_json::from_slice(token.as_slice()).map_err(|e| {
-                    error!("get_accounts json error -> {:?}", e);
-                })
+                serde_json::from_slice(token.as_slice())
+                    .map_err(|e| {
+                        warn!("get_accounts json error -> {:?}", e);
+                    })
+                    .ok()
             })
-            .collect()
+            .collect())
     }
 
     pub fn update_account(&self, account: &UnixUserToken, expire: u64) -> 
Result<(), ()> {
@@ -572,20 +581,25 @@
             return Err(());
         }
 
-        let r: Result<Option<(_, _)>, ()> = data
-            .first()
-            .map(|(token, expiry)| {
-                // token convert with json.
-                let t = serde_json::from_slice(token.as_slice()).map_err(|e| {
-                    error!("json error -> {:?}", e);
-                })?;
-                let e = u64::try_from(*expiry).map_err(|e| {
-                    error!("u64 convert error -> {:?}", e);
-                })?;
-                Ok((t, e))
-            })
-            .transpose();
-        r
+        if let Some((token, expiry)) = data.first() {
+            // token convert with json.
+            // If this errors, we specifically return Ok(None) because that 
triggers
+            // the cache to refetch the token.
+            match serde_json::from_slice(token.as_slice()) {
+                Ok(t) => {
+                    let e = u64::try_from(*expiry).map_err(|e| {
+                        error!("u64 convert error -> {:?}", e);
+                    })?;
+                    Ok(Some((t, e)))
+                }
+                Err(e) => {
+                    warn!("recoverable - json error -> {:?}", e);
+                    Ok(None)
+                }
+            }
+        } else {
+            Ok(None)
+        }
     }
 
     pub fn get_group_members(&self, g_uuid: &str) -> 
Result<Vec<UnixUserToken>, ()> {
@@ -643,15 +657,18 @@
 
         let data = data?;
 
-        data.iter()
-            .map(|token| {
+        Ok(data
+            .iter()
+            .filter_map(|token| {
                 // token convert with json.
                 // debug!("{:?}", token);
-                serde_json::from_slice(token.as_slice()).map_err(|e| {
-                    error!("json error -> {:?}", e);
-                })
+                serde_json::from_slice(token.as_slice())
+                    .map_err(|e| {
+                        error!("json error -> {:?}", e);
+                    })
+                    .ok()
             })
-            .collect()
+            .collect())
     }
 
     pub fn update_group(&self, grp: &UnixGroupToken, expire: u64) -> 
Result<(), ()> {

++++++ vendor.tar.xz ++++++
/work/SRC/openSUSE:Factory/kanidm/vendor.tar.xz 
/work/SRC/openSUSE:Factory/.kanidm.new.2083/vendor.tar.xz differ: char 25, line 
1

Reply via email to