Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install python and moodlemlbackend package #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmonllao
Copy link
Contributor

No description provided.

@dmonllao
Copy link
Contributor Author

I imagine that the patch would need to be cherry picked to each of the supported branches.

@dmonllao
Copy link
Contributor Author

Correcting myself: this patch should be applied to *stretch branches. I've created #36 for jessie branches.

@dmonllao dmonllao force-pushed the python-mlbackend branch 2 times, most recently from 71b0142 to 46ddc97 Compare December 10, 2018 16:30
@dmonllao
Copy link
Contributor Author

The patch has been amended to clear apt and pip caches.

@dmonllao
Copy link
Contributor Author

As commented in #36 I would vote to integrate this in stretch and forget about #36. I am personally using moodle-docker exclusively for development and to integrate this issue and moodlehq/moodle-docker#90 would make things significantly easier for me.

@dmonllao
Copy link
Contributor Author

I've just closed #35 (jessie) anything against integrating this patch?

How are we managing system upgrades? E.g. I start using docker today and I use the latest moodlemlbackend version (0.0.5). During Moodle 3.7 development cycle we release a new moodlemlbackend version (0.0.6) tests stop working because Moodle now requires moodlemlbackend 0.0.6. Is there a process to follow so my moodlemlbackend version gets updated?

@stronk7
Copy link
Member

stronk7 commented Sep 27, 2019

Hi,

after our recent conversations now that a "server" MDL-66004 is (going to be) available, it seems that we hardly* will be incorporating the backend to the php images and, instead, will use the server alternative to run those tests in our CI infrastructure (and also with moodle-docker).

So, we'll be continuously testing the backend via the server alternative. That leaves the local alternative not being tested. Only when some issue enforces it, or a recurring MDLQA asks for it it will be run.

Just thinking that, a probable alternative for this PR could be something like:

  1. we create a shell script that asks:
  • PHP version to use
  • Python version to use.
  • mlbackend version to use.
  1. And then it magically, gets one of our php images as base and build a new one (locally, won't be sent to cocker registry ever) with the python and mlbackend versions installed. Then tests can be run and done.

  2. Basically all we need is a Dockerfile (or script) that dynamically does that. And it would create images like 7.3-3.7.4-2.2.0(php, python, backend) for example.

  3. Then they can be used to test local (within the custom docker image just created) without much problem. In fact surely we could add a job to make it also in CIs (and dispose the image once done).

So I think the code in this PR is valid... but, instead of adding it to the php-apache images... let's apply it within a utility generating those "custom" images.

100% and idea, happy to discuss.

  • hardly: because it's going to be impossible to keep one image working for Moodle 3.5 to 4.1 if we do so, because the backend versions go advancing (as David commented above).

@scara
Copy link
Contributor

scara commented Sep 27, 2019

Hello Everyone,
why not going on an hybrid path i.e. including the script within the mainstream adding the arguments Eloy described above and then run it within an instance i.e. the container, when required by the specific test execution?

It would be the same as running a phpunit session: the limit is when people run docker w/o root permissions since the script should install packages...
At the end, I think that Eloy's proposal makes sense if we want to be non-root-proof as told by @andrewnicols in other issues within the Moodle Docker Toolbox.

HTH,
Matteo

@stronk7 stronk7 force-pushed the master branch 2 times, most recently from 64fcd51 to 057db2d Compare August 13, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants