MSSQL unit test failures
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start with admin/tool/objectfs/classes/task/populate_objects_filesize.php at the query used by the failing task and inspect the related tests in admin/tool/objectfs/tests/task/populate_objects_filesize_test.php. Reproduce the reported failure on SQL Server and check how the query’s selected columns relate to its GROUP BY clause. Done means both named tests pass on SQL Server and the task still handles orphaned objects and objects with errors as expected.
Written by the indexing model from the issue text.
Description
291) tool_objectfs\task\populate_objects_filesize_test::test_orphaned_objects_are_not_updated
dml_read_exception: Error reading from database (SQLState: 42000<br>
Error Code: 8120<br>
Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Column 'phpu_tool_objectfs_objects.timeduplicated' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>
SELECT o.id, o.contenthash, o.timeduplicated, o.location, f.filesize
FROM phpu_tool_objectfs_objects o
JOIN phpu_files f ON o.contenthash = f.contenthash
WHERE o.filesize IS NULL
AND o.location >= 0
GROUP BY o.id,
o.contenthash,
f.filesize ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 100001 ROWS ONLY
[array (
)])
/var/www/site/lib/dml/moodle_database.php:497
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:331
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:438
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:909
/var/www/site/admin/tool/objectfs/classes/task/populate_objects_filesize.php:55
/var/www/site/admin/tool/objectfs/tests/task/populate_objects_filesize_test.php:191
/var/www/site/lib/phpunit/classes/advanced_testcase.php:76
292) tool_objectfs\task\populate_objects_filesize_test::test_objects_with_error_are_not_updated
dml_read_exception: Error reading from database (SQLState: 42000<br>
Error Code: 8120<br>
Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Column 'phpu_tool_objectfs_objects.timeduplicated' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>
SELECT o.id, o.contenthash, o.timeduplicated, o.location, f.filesize
FROM phpu_tool_objectfs_objects o
JOIN phpu_files f ON o.contenthash = f.contenthash
WHERE o.filesize IS NULL
AND o.location >= 0
GROUP BY o.id,
o.contenthash,
f.filesize ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 100001 ROWS ONLY
[array (
)])
/var/www/site/lib/dml/moodle_database.php:497
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:331
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:438
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:909
/var/www/site/admin/tool/objectfs/classes/task/populate_objects_filesize.php:55
/var/www/site/admin/tool/objectfs/tests/task/populate_objects_filesize_test.php:226
/var/www/site/lib/phpunit/classes/advanced_testcase.php:76
- Dominant language
- PHP
- Stars
- 102
- Forks
- 85
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from catalyst/moodle-tool_objectfs
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
catalyst/moodle-tool_objectfs#717 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
catalyst/moodle-tool_objectfs#777 ·
-
Presigned URL redirects write a unique never read entry to core/htmlpurifier on every file requestPossibly taken @Alex-Accipio claimed this 23 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 62/100
catalyst/moodle-tool_objectfs#775 ·
-
TLS peer verification disabled on the pre-signed URL range request — should CURLOPT_SSL_VERIFYPEER be true?Possibly taken @PM84 claimed this 40 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
catalyst/moodle-tool_objectfs#770 ·
-
Difficulty 4/5 1-2 days Newbie friendliness 42/100
catalyst/moodle-tool_objectfs#761 ·
All issues in catalyst/moodle-tool_objectfs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
taskforcesh/bullmq#5238 ·
Maintainers usually reply within 1 day
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itPossibly taken @bfs2021 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/jetpack#55517 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area/import type/enhancement when/later
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day