Skip to content

4.0.2

Choose a tag to compare

@Sinyuk Sinyuk released this 19 Jun 05:41
· 39 commits to main since this release
087bebb

What's Changed

Features:

  • rewrote the WSGi application builder
  • made swagger open
  • added the ability to start Gunicorn server, move server start command to cli
  • Updates related to ModularUser include:
    • Update the meta field to now store two types of meta: allowed_values and aux_data.
    • Included --meta_type parameter in modular user set_meta_attribute command.
      This parameter allows two types, allowed_values (set as default if this
      flag is not provided) and aux_data.
    • Added sorting to the meta field in the ModularUser table to ensure consistent order, preventing different hashes generation from other orders.
      This new function sorts dictionaries and lists at any depth level.
    • Added aux_data to thread-local storage. Retrieve this from the DB using the user located in ModularUser.meta.
    • Updated commands to ensure compatibility with changes related to meta:
      • set_meta_attribute, update_meta_attribute, delete_meta_attribute,
        reset_meta, get_meta
  • Updated swagger-ui-py from 21.12.8 to 23.9.23
  • Added middleware to capture all swagger.json files
  • hid error logs when starting the server on MacOS
  • Added meta to thread local storage, which contains the ModularUser field meta`
  • Added service_name and service_display_name in the allowed values for meta
  • Added sorting of the meta field in the ModularUser table to ensure a consistent order, as different orders can generate different hashes
  • Added a new class FileHandlerManager to the log_helper file to prevent the Too Many Open Files error
  • Implemented throttle manager: Too Many Requests
  • Added a new value "limit_api_call": 30 to startup_config.json, where 30 represents the maximum number of calls per second. If no value is provided, the default is set to 10
  • Added the ability to install modules inside modular-api using setup.cfg and pyproject.toml
  • Json flag added for next commands: user describe, user get_meta, policy describe, group describe, audit
  • Updated exception_log() to use a with block when opening the LOG_FILE, ensuring the file gets properly closed after operations are completed.
  • Implemented proper bool type option processing in direct API requests
  • Implemented proper bool type command option processing.
  • Standardized name of keys of stats item
  • Added mechanism of native module name inclusion to stats item.
  • Changed statistic item ID generation method.
  • Verification script adapted to new item ID generation method.
  • Reduced calls to modular_api_log from modular_api_cli
  • Added environment variables to configure separate log paths for modular_api and modular_api_cli logs

Fixes:

  • Fixed meta keys validation logic to operate independently of file formatting
  • Fixed internal server error when trying to login without a username (in SaaS mode)
  • Fixed issues related to CLI version WARNING
    • Resolve bug associated with CLI version WARNING
    • Adjust @property decorator usage. Now accessible as an attribute, not a
      method. Make necessary replacements where required
  • Fixed an issue where the last line of the error message was lost in the
    exception_log function.
  • Implemented fixes and improvements for swagger-ui:
    • The logic for login:
      • Unauthorized users are now provided with an empty swagger.json file
      • Generate new swagger.json instead of new page
  • Fixed an issue that occurred while saving meta for ModularUser in on-prem mode
  • Fixed issue: Too many open files
  • Fixed setuptools deprecation warning. Change pkg_resources to importlib.metadata
  • Fixed modules installation issue
  • Fixed the command modular user add if the user entered the password then it will not be displayed
  • Fixed flag value resolving
  • Fixed file handling in check_module_requirements_compatibility(). Previously, the module_path file was opened for analysis but not closed properly.

Deletions:

  • remove TinyDB and move to MongoDB
  • removed not-used code and not-used libs
  • removed startup_config.json. Replace it with cli parameters and environment variables. Add .env file support.

Full Changelog: https://github.com/epam/modular-api/commits/4.0.2