-
Notifications
You must be signed in to change notification settings - Fork 88
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
Bugfix/307 Fix replace_config to read prom2teams config #316
Conversation
then? what it will be reviewed ? |
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.
please check my comments
docker/rootfs/replace_config.py
Outdated
with open('/opt/prom2teams/config.ini', 'w') as file: | ||
file.write(filedata) | ||
except (PermissionError, OSError) as error: | ||
pass |
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.
Why are you bypassing error handling ? If there is actual error, why we ignore it
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.
Change to tmp config files in case of config file from docker volume.
docker/rootfs/replace_config.py
Outdated
try: | ||
with open('/opt/prom2teams/uwsgi.ini', 'w') as file: | ||
file.write(uwsgi_filedata) | ||
except (PermissionError, OSError) as error: |
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.
same same here
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.
Change to tmp config files in case of config file from docker volume.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Requirements
Description of the Change
After #307 in version 4.0.0 prom2teams config in docker volume returns an error. With tmp files you can control when to replace variables.
Benefits
Now you can add prom2teams config via volumen in docker.
Possible Drawbacks
N/A.
Applicable Issues
#307