Comments (3)
Hmm, In theory it should tell you why it failed if it does a dry run. Can you double check all these conditions are true and let me know which condition isn't being correctly reported back:
- It can only be run from the CLI. There is no GUI.
- We store the hostname in the cleaning configuration data. If the hostname matches production, DataCleaner will not run. If this data is missing then it will not run.
- Typically a refreshed database will be from a nightly snapshot and so the data should be slightly stale. If a non admin user has logged in recently, that's a sign this Moodle is being used, and the DataCleaner will not run.
- If cron has run recently, DataCleaner will not run. This should only be run on a data washing instance, cron should not be needed here.
- It can only be run if and only if a 'local_datacleaner_allowexecution = true;' has been added to config.php
from moodle-local_datacleaner.
I double checked the conditions and I believe all the conditions are respected.
I an using Xdebug to follow the execution. In the screenshot 1, you can see the values used in function safety_checks() in --run mode.
-- screenshot 1:
When executed in --dryrun or --run the function safety_checks() returns FALSE. So I believe this is correct.
I have more concern when the object cleaner_users/clean is constructed. When executed in --run mode, cleaner_users\clean->dryrun = TRUE; I believe the correct value should FALSE not TRUE. (Please see the screenshot 2)
-- screenshot 2:
So obviously when the method execute() is called, because of the value of $dryrun, method stops before any update.
-- screenshot 3:
What do you think?
from moodle-local_datacleaner.
Hi Nico,
The data scrambler was refactored and a few issues with dryrun fixed, as a result I cannot reproduce that issue anymore.
Please, if you find out that there is a similar issue with the new version feel free to reopen it or create a new one, I will gladly look into it.
Cheers,
Daniel
from moodle-local_datacleaner.
Related Issues (20)
- Match environments for matrix cleaner irrespective of protocol HOT 1
- When cleaning users and mixing up their names, exclude any names of admin users who are not cleaned
- Fix sql like escaping issue
- Declaration of unit tests setUp() must be compatible with new PHPUnit for moodle 3.10+ HOT 1
- Fix failing PHP docs check
- Fix failing PHP code checker
- Fix assertRegExp() is deprecated and will be removed in PHPUnit 10 HOT 1
- Master branch has a higher version than MOODLE_310_STABLE HOT 1
- Option to select all / deselect all tasks on scheduled tasks
- Totara 16 - assertFileNotExists() is deprecated and will be removed in PHPUnit 10
- Moodle 4.1 testing -> Some issues found
- Foreign key constraint preventing TRUNCATE mdl_grade_grades
- Scramble user data not working as expected
- print_error is deprecated
- Commented out SQL in cleaner_custom_sql_post may run anyway? (but fails when arguments required) HOT 1
- unit test failure test_it_outputs_header_and_footer post tracker MDL-79276
- Remove the MUC cleaner HOT 1
- Failing core unit tests duo to incorrect default value
- Cleanup table cleaner_muc_configs
- Moodle 4.3: get_all_user_name_fields() is deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-local_datacleaner.