Skip to content

fix skip policy alert var#921

Closed
ebattat wants to merge 1 commit into
redhat-performance:mainfrom
ebattat:fix_skip_policy_alert_var
Closed

fix skip policy alert var#921
ebattat wants to merge 1 commit into
redhat-performance:mainfrom
ebattat:fix_skip_policy_alert_var

Conversation

@ebattat

@ebattat ebattat commented Jul 2, 2025

Copy link
Copy Markdown
Member

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

Description

Got the following error:

                            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/cloud_governance/main/environment_variables.py", line 285, in __init__
    self._environment_variables_dict['SKIP_POLICIES_ALERT'] = literal_eval(
                                                              ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 112, in literal_eval
    return _convert(node_or_string)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 92, in _convert
    return list(map(_convert, node.elts))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 111, in _convert
    return _convert_signed_num(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 85, in _convert_signed_num
    return _convert_num(node)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ast.py", line 76, in _convert_num
    _raise_malformed_node(node)
  File "/usr/local/lib/python3.12/ast.py", line 73, in _raise_malformed_node
    raise ValueError(msg + f': {node!r}')
ValueError: malformed node or string on line 1: <ast.Name object at 0x7f8a18fcb650>

For security reasons, all pull requests need to be approved first before running any automated CI

@ebattat ebattat requested a review from athiruma July 2, 2025 06:50
@ebattat ebattat self-assigned this Jul 2, 2025
@ebattat ebattat added the bug Something isn't working label Jul 2, 2025
@athiruma

athiruma commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

@ebattat

SKIP_POLICIES_ALERT = '["unused_access_key"]'

make this to list instead of string.

@ebattat

ebattat commented Jul 2, 2025

Copy link
Copy Markdown
Member Author

Do you mean:
SKIP_POLICIES_ALERT = ["unused_access_key"]

@ebattat

ebattat commented Jul 2, 2025

Copy link
Copy Markdown
Member Author

Fix in new PR: #922

@ebattat ebattat closed this Jul 2, 2025
@github-project-automation github-project-automation Bot moved this from In progress to Done in Cloud-Governance project Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

2 participants