Skip to content

Mismatch between the analyze and vacuum flag keys and what the code expects #733

@KaneMorgan

Description

@KaneMorgan

Hello,

I was attempting to use normalise_config to sanitize some arguments before passing them
to analyze_vaccum.

After normalising I noticed that a the vacuum_flag and analyze_flag were ignored. I think the issue is here:

>>> import vendor.aws_redshift_utils.lib.analyze_vacuum_utility.config_constants as aws_constants
>>> aws_constants.normalise_config
>>> aws_constants.normalise_config({"vacuum_flag": True})
{'do_vacuum': True}

"do_analyze": ["doAnalyze", "analyze_flag", "analyze-flag"],

the config normalises the keys to "do_vacuum" and "do_analyze",

However as of this PR the analyze_vacuum function expects the config keys to be "vacuum_flag" and "analyze_flag"
https://github.com/awslabs/amazon-redshift-utils/pull/643/files#diff-ae751f79fdff793b5f2a8b6ccd9c63cb84e90931dd1c8a3667146345b481f96eL698

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