-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plat 252 change exporter #2
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
As said in the comments, I'd play it safer when dealing with various maps with possibly missing keys.
But the original authors don't bother so 🤷
When it comes to configuration, I can only trust you.
You said it works, I'm ok with this.
We won't add tests here anyway.
boto3==1.28.62 | ||
botocore==1.31.65 | ||
boto3==1.35.8 | ||
botocore==1.35.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You said you wanted to put this in another PR : why ?
Just to split the chores ? Or does it impact the actual code in any way ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't try this lib with IRSA on AWS.
@@ -62,20 +49,41 @@ def validate_configs(config): | |||
logging.error("All the target AWS accounts should have the same set of keys (labels)!") | |||
sys.exit(1) | |||
|
|||
for config_metric in config["metrics"]: | |||
|
|||
if config_metric["group_by"]["enabled"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may fail with a runtime error if keys are missing.
Maybe use config_metric.get("group_by", None)
and handle error case ?
Or put the whole block on a try/except
and handle the KeyError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I see the other authors don't care about this so feel free to ignore me on this.
No description provided.