<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:05:59 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-464] Design and implement module upgrade procedure</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-464</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;We need to be able to handle module upgrades (from an older to a newer version, including major/breaking version changes) in a safe and reliable fashion, This includes all the logic around starting a new isolated instance, migrating data over (handling rollbacks in error conditions), switching over selected tenant to the new version to run tests, then migrating the rest of tenant.&lt;/p&gt;</description>
                <environment></environment>
        <key id="80131">FOLIO-464</key>
            <summary>Design and implement module upgrade procedure</summary>
                <type id="10006" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium">Umbrella</type>
                                            <priority id="10001" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p2.svg">P2</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="5f8314dfbdef80006f6f572d">Adam Dickmeiss</assignee>
                                                                <reporter accountid="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d">Jakub Skoczen</reporter>
                                    <labels>
                            <label>sprint8</label>
                    </labels>
                <created>Tue, 7 Feb 2017 12:52:19 +0000</created>
                <updated>Fri, 11 Oct 2019 19:21:31 +0000</updated>
                            <resolved>Wed, 19 Apr 2017 12:07:00 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                    <timespent seconds="32400">1 day, 1 hour</timespent>
                                <comments>
                                                            <comment id="188620" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Tue, 7 Feb 2017 13:13:37 +0000"  >&lt;p&gt;I have speculated about upgrades in 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;FOLIO-406&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/FOLIO-406&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Design module life cycle&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium&quot; /&gt;
            FOLIO-406
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
, in my usual rambling style. MIght be worth checking...&lt;/p&gt;</comment>
                                                            <comment id="188622" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Fri, 10 Feb 2017 10:26:20 +0000"  >&lt;p&gt;Guys, to summarize what has been discussed on the call today:&lt;/p&gt;

&lt;p&gt;1. Tenant POST (init call) will be extended to support upgrades through a new parameter/JSON value (TBD), if attached the module will attempt migration of the schema, with the following outcomes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;204 &amp;#8211; nothing happened, schema already existed and was good enough&lt;/li&gt;
	&lt;li&gt;201 &amp;#8211; new schema was created (we could also use 200 if it doesn&apos;t make sense to differentiate from the one below)&lt;/li&gt;
	&lt;li&gt;200 &amp;#8211; schema was upgraded fine&lt;/li&gt;
	&lt;li&gt;400 &amp;#8211; the module doesn&apos;t know how to create or upgrade the schema&lt;/li&gt;
	&lt;li&gt;500 &amp;#8211; create/upgrade procedure failed, the module should always attempt a rollback to leave the storage in in the same condition&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;2. Tenant DELETE means: purge all tenant data for this module, Okapi will NOT make this call when disassociating the module from a tenant.&lt;/p&gt;

&lt;p&gt;3. We will consider (discuss/design issue) whether Tenant dissociate call is needed/useful.&lt;/p&gt;</comment>
                                                            <comment id="188627" author="5f8314dfbdef80006f6f572d" created="Fri, 10 Feb 2017 11:11:05 +0000"  >&lt;p&gt;First proposal - as discussed is to leave the /_/tenant call as is and use it for install and upgrades.. For upgrades Okapi will disassociate a tenant for module X1 and associate it with module X2 in one transaction.. We&apos;ll design a way to extract and compare versions from a module ID. The version(X2) &amp;gt; version(X1) &amp;gt; 0 for upgrades.. And version(X2)&amp;lt;version(X1) for downgrades.&lt;/p&gt;

&lt;p&gt;For install only X2 is passed as parameter version_to=X2 as parameter to /_/tenant.&lt;br/&gt;
For upgrade version_to and version_from are passed to to /_/tenant call.&lt;/p&gt;

&lt;p&gt;We propose to use PUT on the existing (&quot;from module) tenant module selection and provide the new selection in the Body.. That&apos;s is:&lt;/p&gt;

&lt;p&gt;Associate X1 with tenantID first time:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
POST /_/proxy/tenants/tenantID/modules
{ &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;X1&quot;&lt;/span&gt; }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;returns location of testlib + X1 binding - that is used in next call below.&lt;/p&gt;

&lt;p&gt;Disassociate X1 and associate with X2:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
POST /_/proxy/tenants/tenantID/modules/X1
{ &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;X2&quot;&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;returns location of testlib + X2 binding - that may be used to upgrade again.&lt;/p&gt;</comment>
                                                            <comment id="188628" author="5f8314dfbdef80006f6f572d" created="Mon, 13 Feb 2017 15:19:23 +0000"  >&lt;p&gt;Implemented and merged with master now (from okapi-254 branch)&lt;/p&gt;</comment>
                                                            <comment id="188630" author="5f8314dfbdef80006f6f572d" created="Mon, 20 Feb 2017 12:17:08 +0000"  >&lt;p&gt;Changing method from PUT to POST in upgrade.. 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;OKAPI-263&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/OKAPI-263&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Use POST rather than PUT for module upgrade (for Tenant)&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10322?size=medium&quot; /&gt;
            OKAPI-263
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
 . &lt;/p&gt;</comment>
                                                            <comment id="188632" author="5f8314dfbdef80006f6f572d" created="Wed, 19 Apr 2017 12:05:21 +0000"  >&lt;p&gt;The Tenant POST call is called for a running module before any proxy requests are sent to it . It is the the point where a module should expect whether it needs to either initialize, upgrade, leave data intact (unmodified), reject. Since the Tenant POST call can be called after Okapi has been shut down or other reason the upgrade should always be a consideration if there is existing data. Should the upgrade fail, the module should roll back to the previous state.. If that requires some kind of cloning of data to ensure data integrity that is a possibility. The module has know knowledge of its own implementation and what it expects - schema wise and other.. and it should be able to inspect existing data reliably WRT what the existing schema is.&lt;/p&gt;

&lt;p&gt;The upgrade tenant call mentioned earlier is an on-the-fly way to move a tenant from using one module (version) to another. It is not a special case. It should not be considered diffferent from the originanl POST call. In both cases, the module should consult existing data - or initialize if none exist.&lt;/p&gt;</comment>
                                                            <comment id="188635" author="5f8314dfbdef80006f6f572d" created="Tue, 20 Jun 2017 13:48:15 +0000"  >&lt;p&gt;As mentioned we need to be able to get an implementation version of a module from the MD so we can sort them! See 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;FOLIO-574&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/FOLIO-574&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;ModuleDescriptor Implementation Version&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium&quot; /&gt;
            FOLIO-574
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="53267">OKAPI-232</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53839">OKAPI-525</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="80104">FOLIO-406</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="80286">FOLIO-574</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53255">OKAPI-254</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53263">OKAPI-262</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53264">OKAPI-263</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11064">UXPROD-1815</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11213">UXPROD-2120</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="53253">OKAPI-252</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53522">OKAPI-350</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzxk0f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 7 Feb 2017 13:13:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>