doc-exports/docs/fg/umn/functiongraph_01_0180.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

30 lines
7.7 KiB
HTML

<a name="functiongraph_01_0180"></a><a name="functiongraph_01_0180"></a>
<h1 class="topictitle1">Managing Versions</h1>
<div id="body32001227"><div class="section" id="functiongraph_01_0180__en-us_topic_0000001298667453_section5302192414611"><h4 class="sectiontitle">Overview</h4><p id="functiongraph_01_0180__en-us_topic_0000001298667453_p1766352885411">FunctionGraph allows you to publish one or more versions throughout the development, test, and production processes to manage your function code. The code and environment variables of each version are saved as a snapshot. After the function code is published, you can modify settings as required.</p>
<p id="functiongraph_01_0180__en-us_topic_0000001298667453_p127258251167">After a function is created, the default version is latest. Each function has the latest version. After the function code is published, you can modify the version configuration as required.</p>
<div class="note" id="functiongraph_01_0180__en-us_topic_0000001298667453_note1094934117458"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0180__en-us_topic_0000001298667453_p9621134544511">A version is a snapshot of a function and corresponds to a tag in code. Each version contains the configuration and code of the function. By default, no trigger is bound to a new version. After a version is published, the configuration (such as environment variables) and code of the version cannot be updated, to ensure stability and traceability.</p>
</div></div>
</div>
<div class="section" id="functiongraph_01_0180__en-us_topic_0000001298667453_section2930162719332"><h4 class="sectiontitle">Publishing a Version</h4><ol id="functiongraph_01_0180__en-us_topic_0000001298667453_ol1944154814712"><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li104414819716">Log in to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_en-us_topic_0000001251907924_b033610517502">Functions</strong> &gt; <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_en-us_topic_0000001251907924_b183361950502">Function List</strong>.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li7444481711">Click the function to be configured to go to the function details page.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li1544124812710">On the <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b13417164818401">Version</strong> tab page, click <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b21949114111">Publish new version</strong>.<div class="fignone" id="functiongraph_01_0180__en-us_topic_0000001298667453_fig652110231115"><span class="figcap"><b>Figure 1 </b>Parameters for publishing a new version</span><br><span><img id="functiongraph_01_0180__en-us_topic_0000001298667453_image1452262310116" src="en-us_image_0000001305505277.png"></span></div>
<div class="p" id="functiongraph_01_0180__en-us_topic_0000001298667453_p12189171610012"><ul id="functiongraph_01_0180__en-us_topic_0000001298667453_ul13706411135215"><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li14706201165218"><strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b1166014306433">Version</strong>: Enter a version number. If no version number is specified, the system automatically generates a version number based on the current date, for example, <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b1730132223919">v20220510-190658</strong>.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li15220142611554"><strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b61311494518">Description</strong>: Enter a description for the version. This parameter is optional.</li></ul>
</div>
</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li14410481371">Click <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b6789184916425">OK</strong>. The system automatically publishes a version. Then you will be redirected to the new version.<div class="note" id="functiongraph_01_0180__en-us_topic_0000001298667453_note19440483712"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="functiongraph_01_0180__en-us_topic_0000001298667453_ul4846628175311"><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li12847152895318">You can publish up to 20 versions for a function.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li859431568">For a function whose latest version has been configured with reserved instances, the function configuration can be modified. By default, non-latest versions do not have reserved instances.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li0815134420434">No disk is attached to a new version created based on latest. Environment variables cannot be set if no trigger has been bound to the version.</li></ul>
</div></div>
</li></ol>
</div>
<div class="section" id="functiongraph_01_0180__en-us_topic_0000001298667453_section148361555173316"><h4 class="sectiontitle">Deleting a Version</h4><ol id="functiongraph_01_0180__en-us_topic_0000001298667453_ol1327116943417"><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li295531415011">Return to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b1682298152">Functions</strong> &gt; <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b15829911516">Function List</strong>.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li1051115592">Click the function to be configured to go to the function details page.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li056151917">On the <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b166919589487">Version</strong> tab page of the latest version, select the version to delete.<div class="fignone" id="functiongraph_01_0180__en-us_topic_0000001298667453_fig1129241114143"><span class="figcap"><b>Figure 2 </b>Deleting a version</span><br><span><img id="functiongraph_01_0180__en-us_topic_0000001298667453_image0293411141415" src="en-us_image_0000001257625360.png"></span></div>
<div class="note" id="functiongraph_01_0180__en-us_topic_0000001298667453_note1435416515138"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="functiongraph_01_0180__en-us_topic_0000001298667453_ul1635465113131"><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li103541951161320">The latest version of a function cannot be deleted.</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li11354175191310">If a function version associated with aliases is deleted, the aliases will also be deleted.</li></ul>
</div></div>
</li><li id="functiongraph_01_0180__en-us_topic_0000001298667453_li127214920341">Click <strong id="functiongraph_01_0180__en-us_topic_0000001298667453_b19373948134916">OK</strong> to delete the version.<div class="warning" id="functiongraph_01_0180__en-us_topic_0000001298667453_note15489183619173"><span class="warningtitle"><img src="public_sys-resources/warning_3.0-en-us.png"> </span><div class="warningbody"><p id="functiongraph_01_0180__en-us_topic_0000001298667453_p88101732171710">Deleting a version will permanently delete the associated code, configuration, alias, and event source mapping, but will not delete logs. Deleted versions cannot be recovered. Exercise caution when performing this operation.</p>
</div></div>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_01_0300.html">Configuring Functions</a></div>
</div>
</div>