Skip to content

Commit

Permalink
Update unreleased documentation (#451)
Browse files Browse the repository at this point in the history
* Update versions.json

* Deployed 21367cd to unreleased in versions with MkDocs 1.5.3 and mike 1.1.2

* Sort docs versions

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
github-actions[bot] and GitHub Actions Bot authored Nov 2, 2023
1 parent 8440d2d commit a377bca
Show file tree
Hide file tree
Showing 12 changed files with 988 additions and 766 deletions.
142 changes: 76 additions & 66 deletions versions/unreleased/api-ref/prefect/deployments/deployments/index.html

Large diffs are not rendered by default.

63 changes: 49 additions & 14 deletions versions/unreleased/api-ref/prefect/deployments/runner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10252,9 +10252,11 @@ <h2 id="prefect.deployments.runner.deploy" class="doc doc-heading">

<p>Deploy the provided list of deployments to dynamic infrastructure via a
work pool.</p>
<p>Calling this function will build a Docker image for the deployments, push it to a
<p>By default, calling this function will build a Docker image for the deployments, push it to a
registry, and create each deployment via the Prefect API that will run the corresponding
flow on the given schedule.</p>
<p>If you want to use an existing image, you can pass <code>build=False</code> to skip building and pushing
an image.</p>



Expand Down Expand Up @@ -10313,6 +10315,21 @@ <h2 id="prefect.deployments.runner.deploy" class="doc doc-heading">
<em>required</em>
</td>
</tr>
<tr>
<td><code>build</code></td>
<td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p>Whether or not to build a new image for the flow. If False, the provided
image will be used as-is and pulled at runtime.</p>
</div>
</td>
<td>
<code>True</code>
</td>
</tr>
<tr>
<td><code>push</code></td>
<td>
Expand Down Expand Up @@ -10575,28 +10592,43 @@ <h2 id="prefect.deployments.runner.deploy" class="doc doc-heading">
<span class="normal">860</span>
<span class="normal">861</span>
<span class="normal">862</span>
<span class="normal">863</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="normal">863</span>
<span class="normal">864</span>
<span class="normal">865</span>
<span class="normal">866</span>
<span class="normal">867</span>
<span class="normal">868</span>
<span class="normal">869</span>
<span class="normal">870</span>
<span class="normal">871</span>
<span class="normal">872</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">deploy</span><span class="p">(</span>
<span class="o">*</span><span class="n">deployments</span><span class="p">:</span> <span class="n">RunnerDeployment</span><span class="p">,</span>
<span class="n">work_pool_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">image</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">DeploymentImage</span><span class="p">],</span>
<span class="n">build</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="n">push</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="n">print_next_steps_message</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">List</span><span class="p">[</span><span class="n">UUID</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Deploy the provided list of deployments to dynamic infrastructure via a</span>
<span class="sd"> work pool.</span>

<span class="sd"> Calling this function will build a Docker image for the deployments, push it to a</span>
<span class="sd"> By default, calling this function will build a Docker image for the deployments, push it to a</span>
<span class="sd"> registry, and create each deployment via the Prefect API that will run the corresponding</span>
<span class="sd"> flow on the given schedule.</span>

<span class="sd"> If you want to use an existing image, you can pass `build=False` to skip building and pushing</span>
<span class="sd"> an image.</span>

<span class="sd"> Args:</span>
<span class="sd"> *deployments: A list of deployments to deploy.</span>
<span class="sd"> work_pool_name: The name of the work pool to use for these deployments.</span>
<span class="sd"> image: The name of the Docker image to build, including the registry and</span>
<span class="sd"> repository. Pass a DeploymentImage instance to customize the Dockerfile used</span>
<span class="sd"> and build arguments.</span>
<span class="sd"> build: Whether or not to build a new image for the flow. If False, the provided</span>
<span class="sd"> image will be used as-is and pulled at runtime.</span>
<span class="sd"> push: Whether or not to skip pushing the built image to a registry.</span>
<span class="sd"> print_next_steps_message: Whether or not to print a message with next steps</span>
<span class="sd"> after deploying the deployments.</span>
Expand Down Expand Up @@ -10651,19 +10683,22 @@ <h2 id="prefect.deployments.runner.deploy" class="doc doc-heading">
<span class="p">)</span>

<span class="n">console</span> <span class="o">=</span> <span class="n">Console</span><span class="p">()</span>
<span class="k">with</span> <span class="n">Progress</span><span class="p">(</span>
<span class="n">SpinnerColumn</span><span class="p">(),</span>
<span class="n">TextColumn</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Building image </span><span class="si">{</span><span class="n">image</span><span class="o">.</span><span class="n">reference</span><span class="si">}</span><span class="s2">...&quot;</span><span class="p">),</span>
<span class="n">transient</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">console</span><span class="o">=</span><span class="n">console</span><span class="p">,</span>
<span class="p">)</span> <span class="k">as</span> <span class="n">progress</span><span class="p">:</span>
<span class="n">docker_build_task</span> <span class="o">=</span> <span class="n">progress</span><span class="o">.</span><span class="n">add_task</span><span class="p">(</span><span class="s2">&quot;docker_build&quot;</span><span class="p">,</span> <span class="n">total</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">image</span><span class="o">.</span><span class="n">build</span><span class="p">()</span>
<span class="k">if</span> <span class="n">build</span><span class="p">:</span>
<span class="k">with</span> <span class="n">Progress</span><span class="p">(</span>
<span class="n">SpinnerColumn</span><span class="p">(),</span>
<span class="n">TextColumn</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Building image </span><span class="si">{</span><span class="n">image</span><span class="o">.</span><span class="n">reference</span><span class="si">}</span><span class="s2">...&quot;</span><span class="p">),</span>
<span class="n">transient</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">console</span><span class="o">=</span><span class="n">console</span><span class="p">,</span>
<span class="p">)</span> <span class="k">as</span> <span class="n">progress</span><span class="p">:</span>
<span class="n">docker_build_task</span> <span class="o">=</span> <span class="n">progress</span><span class="o">.</span><span class="n">add_task</span><span class="p">(</span><span class="s2">&quot;docker_build&quot;</span><span class="p">,</span> <span class="n">total</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">image</span><span class="o">.</span><span class="n">build</span><span class="p">()</span>

<span class="n">progress</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">docker_build_task</span><span class="p">,</span> <span class="n">completed</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">console</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Successfully built image </span><span class="si">{</span><span class="n">image</span><span class="o">.</span><span class="n">reference</span><span class="si">!r}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="s2">&quot;green&quot;</span><span class="p">)</span>
<span class="n">progress</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">docker_build_task</span><span class="p">,</span> <span class="n">completed</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">console</span><span class="o">.</span><span class="n">print</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Successfully built image </span><span class="si">{</span><span class="n">image</span><span class="o">.</span><span class="n">reference</span><span class="si">!r}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="s2">&quot;green&quot;</span>
<span class="p">)</span>

<span class="k">if</span> <span class="n">push</span><span class="p">:</span>
<span class="k">if</span> <span class="n">build</span> <span class="ow">and</span> <span class="n">push</span><span class="p">:</span>
<span class="k">with</span> <span class="n">Progress</span><span class="p">(</span>
<span class="n">SpinnerColumn</span><span class="p">(),</span>
<span class="n">TextColumn</span><span class="p">(</span><span class="s2">&quot;Pushing image...&quot;</span><span class="p">),</span>
Expand Down
Loading

0 comments on commit a377bca

Please sign in to comment.