<div dir="ltr"><div>As part of the changes for RepositoryVersions [0], we are adding some tools to the plugin API that will allow plugins to define their own celery tasks, as well as deploy them. The changes to the plugin API are made in this PR [1] and are summarized below. </div><div><br></div><div>Added:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><br></div><div>Allow plugin writers to create celery tasks</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">`pulpcore.plugin.tasks.UserFaci<wbr>ngTask`</font></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><br></div><div>working directory context manager for tasks that use the file system</div><div><font face="monospace, monospace">`pulpcore.plugin.tasks.working<wbr>_dir_context`</font></div><div><br></div><div><div>Allow plugin viewsets to return HTTP 202 with the href for a task</div></div><div><font face="monospace, monospace">`pulpcore.plugin.viewsets.Opera<wbr>tionPostponedResponse`</font></div><div><br></div><div>Allow plugin viewsets to dispatch tasks</div><div><font face="monospace, monospace">`pulpcore.plugin.viewsets.tags`</font></div></blockquote><div><br></div><div>Removed:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>This function used to raise a NotImplementedError. It is now removed from the model and defined as a celery task in each plugin.</div><div><font face="monospace, monospace">`pulpcore.plugin.models.Importer.sync`</font></div><div><br></div><div>The ImporterViewset used to proved a sync detail route at </div><div>`v3/importers/<type>/<id>/sync/`. MyPluginImporterViewset can (and probably should) define this endpoint by creating a detail route called sync. For example, see the file plugin's implementation [2]</div><div><font face="monospace, monospace">`pulpcore.plugin.viewsets.ImporterViewset.sync`</font></div></blockquote><div><br></div><div>The File plugin has an open PR to use the updated plugin API [3]. More information is available on the the issue [4].</div><div><br></div><div>[0]: <a href="https://pulp.plan.io/issues/3209" target="_blank">https://pulp.plan.io/issues/32<wbr>09</a></div><div>[1]: <a href="https://github.com/pulp/pulp/pull/3259/" target="_blank">https://github.com/pulp/pulp/p<wbr>ull/3259/</a></div><div>[2]: <a href="https://github.com/pulp/pulp_file/pull/24/files#diff-4ea13541b01c775a55f25a8c4fab0aebR29">https://github.com/pulp/pulp_file/pull/24/files#diff-4ea13541b01c775a55f25a8c4fab0aebR29</a><br></div><div>[3]: <a href="https://github.com/pulp/pulp_file/pull/24">https://github.com/pulp/pulp_file/pull/24</a></div><div>[4]: <a href="https://pulp.plan.io/issues/3074">https://pulp.plan.io/issues/3074</a></div></div>