Proposal
- Provide some means for making source development packages available for
pip install
. - Use trydevpi for providing the development packages.
Rational
Use-case
Developers neeed to use the latest development packages in CI to prepare migration to the next LTS version.
Need
-
Having development versions of the modules and trytond available is a precondition for running test against latest development tip/trunk.
-
Packages actually need to be build to be available to
pip install
, as using just a checkout of the mono-repository is not enough:pip install --find-links
requires either a html page linking to packages or a directory containing packages. Pointing to source directories are not supported.pip install --index-url
andpip install --extra-index
both require an URL of a Package Index. 0Pointing to source directories are not supported.
-
Using editable installs (
pip install -e
) in CI not only requires a clone of the mono-repo, but also to create a list of recursive dependencies. -
VCS URLs also requires to create a list of recursive dependencies. And given that Tryton uses Mercurial it is uncertain whether this still clones the whole mono-repository.
-
With the de-activation of trydevpi, development packages are no longer available easily. This results in every development team needs to create some means of making dev packages available for its projects. Doing so is a waste of rare development resources and leads to redundant evaluation, evaluation even if nothing changed and redundant data.
Even if development packages are used less often than they used to be, it seams to be much more efficient providing them centrally and updating them only if actually changed. Otherwise each development team would need to run scheduled jobs (aka polling the upstream repo) and eventually build the packages.
What to provide
-
Source packages (sdist) are already build as part of Tryton’s CI process (in stage preparation). These artifacts could be reused.
-
Providing source packages is enough, given development packages are not used that often.
Providing source packages only also saves CI resources. -
Providing docker images seems overdone, as it would require additional steps for building the image. Also a single image might not suffice, as Tryton supports several versions of Python.
How to provide
-
trydevpi is still running, reactivating it should not be much of a problem
-
Means for uploading packages to trydevpi are already known
-
Using heptapods built-in package registry looks obvious, but has one major draw back: Existing package versions can not be updated. Thus updating requires quite some gitlab magic to delete the package first, which increases complexity
Implementation
Extend the .gitlab-ci.yml file by a task uploading the package to trydevpi.
Run only on branch default and if tests passed
Upload only changed packages.
Details to be discussed after proposal has been accepted…