Skip to content

Simplify esrally/config.py module. #1920

@fressi-elastic

Description

@fressi-elastic

Unnecessary code complexity has been spotted in esrally/config.py module:

  • There is a separate module esrally/types.py defining typing hints for it. This makes code hard to follow because of the need to include both modules (types and config) with types two types (types.Config and config.Config) referring to exactly the same thing where the protocol is not always in sync with its implementation.
  • The implementation of the key retrieval makes often use of the full content iteration because storing value scope data as keys instead of values. Despite making keys insertion simpler, it is affected later by a much more complex retrieval approach. The scope should instead be stored as a value, not as a key.
  • There is a sort of cyclic dependency between modules dependency involving config.py and paths.py that should be resolved.
  • Testing for esrally/config.py is using a dummy lower level component that is not implementing exaclty the methods of the implementation class it replaces. This has been spotted while passing linters verifications when adding typing hints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions