<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to tickets</title><link href="https://sourceforge.net/p/spicedb/tickets/" rel="alternate"/><link href="https://sourceforge.net/p/spicedb/tickets/feed.atom" rel="self"/><id>https://sourceforge.net/p/spicedb/tickets/</id><updated>2024-02-12T11:06:56.490000Z</updated><subtitle>Recent changes to tickets</subtitle><entry><title>Ticket #1743: Reduce memory usage of WriteSchema discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1743/?limit=25#d135" rel="alternate"/><published>2024-02-12T11:06:56.490000Z</published><updated>2024-02-12T11:06:56.490000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net9bda15d96070a2a9cfab3239b5d334ff34151378</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Ticket changed by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1743: Reduce memory usage of WriteSchema discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1743/?limit=25#10a2" rel="alternate"/><published>2024-02-12T11:06:55.901000Z</published><updated>2024-02-12T11:06:55.901000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net055c07b5ab7b06766ab434436d4bc7204a8bfd18</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="user-mention" href="/u/vroldanbet/"&gt;@vroldanbet&lt;/a&gt; I could but I verified it manually; not sure we really need this continuously tested&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#888a" rel="alternate"/><published>2024-02-12T11:06:54.895000Z</published><updated>2024-02-12T11:06:54.895000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net24ee5e4c9c1337d283fb1a8ece94ea498039ac20</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@benjamin99 Happy Lunar New Year! (apologies if that's not the correct way to say so)&lt;/p&gt;
&lt;p&gt;And no rush - I'll see if I can run some benchmarks as well&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#29bc" rel="alternate"/><published>2024-02-12T11:06:54.791000Z</published><updated>2024-02-12T11:06:54.791000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net759d7c642467d8f4c0c04ac94f6fa8333d7cb540</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/benjamin99" rel="nofollow"&gt;benjamin99&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Okey I'll try to give it a try, but it might take some days since it is now the holiday season for the lunar new year here in Taiwan.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#b0e2" rel="alternate"/><published>2024-02-12T11:06:54.677000Z</published><updated>2024-02-12T11:06:54.677000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net641dd4f0e9dbb27807fd392b5c0af2c45d1efef9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@benjamin99 Yeah, probably, which is why we didn't do so in the first place... but maybe its fast enough that it doesn't matter? We'd have to benchmark and see&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#2146" rel="alternate"/><published>2024-02-12T11:06:54.518000Z</published><updated>2024-02-12T11:06:54.518000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net70e04f9c40053434bf4dd17f278d75fb3be089f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/benjamin99" rel="nofollow"&gt;benjamin99&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@josephschorr but base on my observation, it looks like the serialization is so inconsistent that it will get the different results from the same caveat like nine times out of ten. So if we deserialize the caveat definitions iff the there exists some byte difference in the serialization expression, it actually means that we will have to run the deserialization process for almost each and one of the comparison requests?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#d651" rel="alternate"/><published>2024-02-12T11:06:54.432000Z</published><updated>2024-02-12T11:06:54.432000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net6827605cd33287b9152be87e3a9dc01cab6a7edf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@benjamin99 Actually, looking at the diff lib, we even have the diff named right now as being a maybe: &lt;a href="https://github.com/authzed/spicedb/blob/f42617656e03a0f6c760f602f2df3906e4483664/pkg/diff/caveats/diff.go#L155" rel="nofollow"&gt;https://github.com/authzed/spicedb/blob/f42617656e03a0f6c760f602f2df3906e4483664/pkg/diff/caveats/diff.go#L155&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So we could, if the bytes are different, deserialize strict and compare; it would just make the diff a bit slower in that case&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#b72d" rel="alternate"/><published>2024-02-12T11:06:54.335000Z</published><updated>2024-02-12T11:06:54.335000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net4ecef577796c61dfd28b62715abbbc49074e15de</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/benjamin99" rel="nofollow"&gt;benjamin99&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@josephschorr just updated the test case for "no changes" in the diff package&lt;br/&gt;
&lt;a href="https://github.com/authzed/spicedb/commit/c7a6c4bd6cb2214b47c29fc99dae7fc5ef94be41" rel="nofollow"&gt;https://github.com/authzed/spicedb/commit/c7a6c4bd6cb2214b47c29fc99dae7fc5ef94be41&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Yes, I did think about "renormalize"/"reconstruct" the caveat itself from the serialized expression before making the comparison. But after checking the whole process, I think it's kinda awkward to first translate the CompiledCaveats to the CaveatDefinitions in the &lt;a class="" href="https://github.com/authzed/spicedb/blob/f42617656e03a0f6c760f602f2df3906e4483664/pkg/schemadsl/compiler/translator.go#L161" rel="nofollow"&gt;translate function&lt;/a&gt;, and then try to reconstruct the cel info (which was contained by the CompiledCaveats in the first place) before making comparison in the &lt;a class="" href="https://github.com/authzed/spicedb/blob/f42617656e03a0f6c760f602f2df3906e4483664/pkg/diff/caveats/diff.go#L72" rel="nofollow"&gt;caveat diff function&lt;/a&gt;.&lt;br/&gt;
Base on this point of view, I think changing the behavior of the serializations to make it more strict/stable would be a more feasible choice?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#8c86" rel="alternate"/><published>2024-02-12T11:06:54.232000Z</published><updated>2024-02-12T11:06:54.232000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net1ada30d6da5cfbd09dc9ea7210290c597e932fce</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/josephschorr" rel="nofollow"&gt;josephschorr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;@benjamin99 Looks good. Can you also add a test into the caveat diff tests here: &lt;a href="https://github.com/authzed/spicedb/blob/main/pkg/diff/caveats/diff_test.go" rel="nofollow"&gt;https://github.com/authzed/spicedb/blob/main/pkg/diff/caveats/diff_test.go&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think we should be able to fix this problem by just switching the caveat deserialization to either be strict, or to "renormalize" the caveats before we compare them, which would ensure that the diff lib does not report them as changed&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ticket #1742: Ensure the deterministic serialized expression for the caveats discussion</title><link href="https://sourceforge.net/p/spicedb/tickets/1742/?limit=25#5d5a" rel="alternate"/><published>2024-02-12T11:06:54.145000Z</published><updated>2024-02-12T11:06:54.145000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net46809fb1609a4bcd58d052fd3dbc234b6f5d9a4f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally posted by:&lt;/em&gt; &lt;a class="" href="https://github.com/benjamin99" rel="nofollow"&gt;benjamin99&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi @josephschorr sorry for the late reply. Here is my quick adaptation from the original test cases to ensure that the serialization of the compiled caveats are deterministic.&lt;br/&gt;
&lt;a href="https://github.com/benjamin99/spicedb/commit/2acb1f89ffd49aebb59cf714381d675289b255d0." rel="nofollow"&gt;https://github.com/benjamin99/spicedb/commit/2acb1f89ffd49aebb59cf714381d675289b255d0.&lt;/a&gt;&lt;br/&gt;
Plz let me know if there are some changes needed to be made 🙏 &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>