<div dir="ltr"><div>As a followup to the chat discussion from triage/open-floor today, here is the POC on top of typed repositories. It's actually a very small change, the *only* significant difference is that the stages API no longer uses the RepositoryVersion context manager. Thus, the plugin writer must finalize it, but they can do that using core-provided facilities. The links below are diffs on top of @dalley's unmerged PRs so the links are long:</div><div><br></div><div><a href="https://github.com/dralley/pulpcore/compare/typed-repositories...bmbouter:plugin-context-manager">https://github.com/dralley/pulpcore/compare/typed-repositories...bmbouter:plugin-context-manager</a></div><div><a href="https://github.com/dralley/pulp_file/compare/typed-repositories...bmbouter:plugin-context-manager">https://github.com/dralley/pulp_file/compare/typed-repositories...bmbouter:plugin-context-manager</a></div><div><br></div><div><div>I'm able to run the pulp-smash test with these changes so I think it's working:<br></div><div>django-admin test pulp_file.tests.functional.api.test_sync.BasicFileSyncTestCase.test_sync</div><div><br></div></div><div>Note that the context manager is only syntactic sugar. The pulp_file sync code could also just as easily be as shown below. This is incomplete, but I think you'll get the idea.<br></div><div><br></div><div><a href="https://github.com/dralley/pulp_file/compare/typed-repositories...bmbouter:plugin-finalize-no-context-manager">https://github.com/dralley/pulp_file/compare/typed-repositories...bmbouter:plugin-finalize-no-context-manager</a></div><div><br></div><div>With this plugins can even do what they want in terms of style (context manager or not). Also they can not use it at all and the only extra responsibility would be to finalize the RepositoryVersion with its context manager (core provided).<br></div><div><br></div><div><br></div><div>I'd like to ask for feedback on this design asap. Questions are concerns ... please send 'em.</div><div><br></div><div>An extensive description was given at open floor, but those logs aren't up yet. The gist is that content modification/validation will require user options, the plugin already knows that, so let's stop having the core finalize the RepositoryVersion.</div><div><br></div></div>