Skip to content

Conversation

@klnyzzz33
Copy link
Contributor

No description provided.

gabortodor and others added 30 commits October 22, 2025 11:13
# Conflicts:
#	flask_monitoringdashboard/core/exceptions/exception_collector.py
#	flask_monitoringdashboard/database/exception_occurrence.py
…-issues

Feature/config for GitHub issues
# Conflicts:
#	flask_monitoringdashboard/core/exceptions/exception_collector.py
Email notification, modifiable notifcation type
Copy link
Member

@mircealungu mircealungu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing work folks.
a few small points and I look forward to deploying this.


[alerting]
ENABLED=False
TYPE=email
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need the TYPE? We can simply test in the code for the existence of the ENVVARS? Or is there a case where we want to have the TYPE defined independently from the enviers?


At the moment the secrets and variables for the issue are saved in a .env file

There is a template with file name `.env_template` that can be used to fill in the info needed for the issue creation alert to work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see such a file. And also, I see that the file above -- config.cfg -- already definies secrets and variables. So is this still needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is not needed and should be deleted. Was a part of previous setup. Now the config.cfg is used

template = template_env.get_template('report.html')


class AlertContent:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small comment explaining the use of this class would be good

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why but alert. Seems like a strange name for this module. Either alerting or alerts would somehow be more understandable for me.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree


def create_teams_payload(alert_content: AlertContent):
return {
"type": "message",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha. Why am I not surprised that the Microsoft alternative is the most complicated one?

@@ -0,0 +1,16 @@
class GitHubRequestInfo:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need this class?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could do it without. Is that preferred?

e_copy = _get_copy_of_exception(e)

if config.alert_enabled:
_notify(e_copy, session, config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do I need a copy? Maybe at the comment too? It's not evident

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, we will look into it.

return new_exc


def _notify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move to the alerts package?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could do that.

templateUrl: 'static/pages/database_management.html',
controller: ['$scope', '$http', 'menuService', 'endpointService', 'modalService', DatabaseManagementController]
})
.when('/alerting_settings', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. we have also a UI for the alerting settings :) COOL!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^_^

:return: A JSON-object with alert configuration details
"""
# TODO
# post_to_back_if_telemetry_enabled(**{'name': 'deploy_alert_config'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for? not for sending telemetry info about the installation is it? because then email is too private to collect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants