Code Monkey home page Code Monkey logo

moodle-tool_forcedcache's Issues

Double quote in lang string causing test failure

Double quote in lang string causing test failure:

$string['config_json_path_invalid'] = 'Invalid configuration path. Please ensure the path is outside of the "{$a}" directory.';

the double quotes inside this lang string are not being escaped correctly and cause a test failure in server/admin/tool/forcedcache/tests/cache_config_test.php

Failed asserting that exception message 'Invalid configuration path. Please ensure the path is outside of the "/var/www/server" directory.' contains 'Invalid configuration path. Please ensure the path is outside of the "/var/www/server" directory.'.```

Removing the quotes from the lang string as a workaround resolves this issue

Codechecker issues found since #31

For example: https://github.com/catalyst/moodle-tool_forcedcache/runs/4161249845?check_suite_focus=true


Run moodle-plugin-ci codechecker
 RUN  Moodle Code Checker on tool_forcedcache
........E..W... 15 / 15 (100%)

FILE: /home/runner/work/moodle-tool_forcedcache/moodle-tool_forcedcache/moodle/admin/tool/forcedcache/classes/check/enabled.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
 26 | ERROR | Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
    |       | (moodle.Files.MoodleInternal.MoodleInternalGlobalState)
------------------------------------------------------------------------------------------------------------------------------------


FILE: ...ner/work/moodle-tool_forcedcache/moodle-tool_forcedcache/moodle/admin/tool/forcedcache/classes/cache_administration_helper.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
 261 | WARNING | Inline comments must end in full-stops, exclamation marks, or question marks
     |         | (moodle.Commenting.InlineComment.InvalidEndChar)
------------------------------------------------------------------------------------------------------------------------------------

Time: 1.37 secs; Memory: 18MB

Error: Process completed with exit code 1.

Documentation Improvements Required

Documentation made it hard to get started without reading it from start to finish. There was a bit of jumping around, and certain terms weren't 100% on point.

Ideally, the documentation should allow you to:

  • get started more quickly,
  • avoid issues earlier on
  • be easier to understand.
  • quickly knowing what options are available to configure,
  • knowing how could I configure it (json, php and where)
  • understanding what does each of the fields in the configuration object means.

Expose the actual store settings in the admin ui

Previously you could see and edit the store settings, now we can't edit (yay) but we've lost visibility of the settings.

Tasks:

  • on /admin/tool/forcedcache/index.php add a head heading for stores
  • add a new sub heading for each store + a hash anchor
  • dump the type and config for the store in a table
  • from the main cache page under 'Configured store instances' deep link to each heading
  • move the forced status to be a sibling of the core caching page

PHP Fatal error - incompatible declaration

Moodle: MOODLE_402_STABLE
tool_forcedcache: MOODLE_40_STABLE

PHP Fatal error: Declaration of tool_forcedcache_cache_factory::create_config_instance(bool $writer = false) must be compatible with cache_factory::create_config_instance($writer = false) in /path/to/moodle/admin/tool/forcedcache/classes/cache_factory.php on line 33

Can't make plugin working with Moodle 3.11 and AWS elasticache Redis

Hi,

I'm struggling to make the plugin work with my Moodle instance.
The test page says that my configuration (done in config.php) is OK.
But my Redis store isn't created and the store mappings aren't set.

My Moodle instance is deployed in AWS cluster.
The Redis host is an AWS Elastisearch host.
If I set everything manually in Moodle administration, everything is ok.

Here is the piece of my config.php dealing with the plugin.
The expression {{ ... }} are well-replaced and the resulting final file is correct.

`$CFG->tool_forcedcache_config_array = [
'stores' => [
// Redis is an all round great workhorse cache which
// we use as the main shared cache.
// https://docs.moodle.org/en/Redis_cache_store
'aws_elasticache_redis' => [
'type' => 'redis',
'name' => 'aws_elasticache_redis',
'config' => [
'server' => '{{ .Values.config.elasticacheClusterAddress }}',
'prefix' => '{{ .Values.config.redisPrefix }}',
'password' => '',
'serializer' => 1,
'compressor' => 0
]
]
],
'rules' => [
'application' => [
[
'stores' => ['aws_elasticache_redis']
]
],
'session' => [
[
'stores' => ['aws_elasticache_redis']
]
],
'request' => []
],
'definitionoverrides' => []
];

$CFG->alternative_cache_factory_class = 'tool_forcedcache_cache_factory';`

Support connecting TLS for Redis

Is it possible to use Redis with TLS configuration? Moodle already has support for TLS connection with Redis, which makes it unsuitable for configuring Redis for the Moodle project.

Pin CI to mariadb:10.5

New mariadb:10.6 makes the COMPRESSED row format read-only by default
because it's deprecated now and will be removed in mariadb:10.7

This is being tracked @ https://tracker.moodle.org/browse/MDL-72131

Once that issue is fixed and we switch to DYNAMIC or whichever the
final solution is, we'll unpin this.

(copy pasted from same issue different repository)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.