Conversation
This commit also tidy up and fixes some minor issues.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 63.15% 61.07% -2.08%
==========================================
Files 51 56 +5
Lines 1699 2130 +431
==========================================
+ Hits 1073 1301 +228
- Misses 626 829 +203
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| chmod -R 2777 "${SHAREDDIR}" || true | ||
|
|
||
| # Clone the performance data generator plugin inside the container. | ||
| docker exec "${WEBSERVER}" sh -c "git clone --depth 1 ${plugin_repo} ${dest}" |
There was a problem hiding this comment.
Why are we doing it this way? See the plugins module
https://github.com/moodlehq/moodle-ci-runner/blob/main/runner/main/modules/plugins/plugins.sh#L21
Essentially we shoudl be setting the PLUGINSTOINSTALL to something like:
PLUGINSTOINSTALL="${PLUGINSTOINSTALL};$plugin_repo|local/performancetool|main"
There was a problem hiding this comment.
I have updated the runner code to use the PLUGINSTOINSTALL
| echo "Running: ${initcmd[*]}" | ||
|
|
||
| plugin_repo="https://github.com/moodlehq/moodle-local_performancetool" | ||
| dest="/var/www/html/local/performancetool" |
There was a problem hiding this comment.
This won't work for Moodle 5.1 and above -- it isn't in the public directory.
| local initcmd | ||
| performance_initcmd initcmd # By nameref. | ||
| echo "Running: ${initcmd[*]}" |
There was a problem hiding this comment.
This should be just above the actual cal to the command, otherwise it can make debugging very confusing.
There was a problem hiding this comment.
I have done a big clean up, it should be all good now.
|
|
||
| # Ensure host shared directories exist and are writable so plugin can save files. | ||
| mkdir -p "${SHAREDDIR}/planfiles" "${SHAREDDIR}/output/logs" "${SHAREDDIR}/output/runs" | ||
| chmod -R 2777 "${SHAREDDIR}" || true |
There was a problem hiding this comment.
What's this about? Why do we need || true?
| echo "Copying generated plan files from container to ${SHAREDDIR}/planfiles" | ||
|
|
||
| docker exec -u root "${WEBSERVER}" bash -lc "\ | ||
| mkdir -p /shared/planfiles && \ |
There was a problem hiding this comment.
Didn't we already do this a few lines above? (the mkdir)?
| --size="${SITESIZE}" \ | ||
| --fixeddataset \ | ||
| --bypasscheck \ | ||
| --filesizelimit="1000" |
There was a problem hiding this comment.
What is the file size limit? Should it be in env vars?
| @@ -0,0 +1,219 @@ | |||
| import java.io.*; | |||
There was a problem hiding this comment.
What is this, and where is it used? Didn't we copy this into the performance tool system itself? I can't see anywhere that we consume this file.
| @@ -0,0 +1,12 @@ | |||
| import java.io.*; | |||
There was a problem hiding this comment.
Ditto this file. Can't see it being used anywere right now.
| # Include logs string. | ||
| includelogs=1 | ||
| includelogsstr="-Jincludelogs=$includelogs" | ||
| samplerinitstr="-Jbeanshell.listener.init=recorderfunctions.bsf" |
There was a problem hiding this comment.
Ah - just found where we're using the recorder. Is this something that can / should be in the jmx files themselves?
| $CFG->skiplangupgrade = false; | ||
|
|
||
| $CFG->wwwroot = 'http://host.name'; | ||
| $CFG->wwwroot = getenv('MOODLE_WWWROOT') ?: 'http://host.name'; |
There was a problem hiding this comment.
What's the purpose of this change?
There was a problem hiding this comment.
Without this change the following error is displayed during the Jmeter run:
| http://host.name/course/view.php?id=4 Non HTTP response code: java.net.UnknownHostException | 3
2ba68c8 to
8daa21c
Compare
First chuck of work to restore the performance job in our CI.
Probably there are some things that needs to be improved/fixed here and there but this is running in our CI without problems.