The load_configurations function is designed to load and validate configuration files provided as a sequence of filenames. The function attempts to read each configuration file and parse its contents. It handles errors gracefully, logging issues such as insufficient permissions or parsing errors, instead of raising exceptions.
Specifications:
Inputs:
config_filenames: A sequence (list or tuple) of strings representing the filenames of configuration files to load.
overrides: An optional parameter that is not used in the function as provided but should be accounted for in the design, where it may influence the parsing process.
resolve_env: A boolean that may affect how environmental variables are processed during parsing.
Outputs:
A tuple containing:
A dictionary mapping each configuration filename to its corresponding parsed configuration (as a dictionary).
A sequence of logging.LogRecord instances that document any errors encountered during parsing.
Edge Cases:
Handle cases where the config file does not exist, leading to an OSError.
Handle validation errors, which should be logged as critical failures.
Manage appropriate logging for permission-related issues.
Make sure that if no filenames are provided, the function returns an empty dictionary and no logs.
Note:
The solution should be finalized in /app/solution.py and the function must be importable as: from solution import load_configurations.