-
Notifications
You must be signed in to change notification settings - Fork 19
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
DESENG-493: CRON config alignment and engagement metadata dependency removal #2375
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.
Nice work!
Could you please just remove a commented-out environment variable that appears to be duplicated. Also, I feel some comments could be a bit clearer for developers. Could you please respond to my questions about certain comments?
@@ -295,7 +295,7 @@ def _render_email_template(engagement: EngagementModel): | |||
engagement_url = notification.get_tenant_site_url(engagement.tenant_id, dashboard_path) | |||
templates = current_app.config['EMAIL_TEMPLATES'] | |||
subject = templates['CLOSEOUT']['SUBJECT'].format(engagement_name=engagement.name) | |||
email_environment = templates['ENVIROMENT'] | |||
email_environment = templates['ENVIRONMENT'] |
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.
Good catch!
met-cron/sample.env
Outdated
|
||
# Miscellaneous Settings | ||
SECRET_KEY="" # For Flask sessions. If unset, this value is randomized | ||
# disables certain checks for user permissions and tenant access. Buggy. |
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.
Does this comment mean that when you disable certain checks for user permissions and tenant access that unexpected behaviour may occur? Why would a developer want to disable those checks in the first place?
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 removed this comment as it's not applicable to our scenario. The checks in this case are associated with the tenant. In a multi-tenant environment like ours, we verify if this variable is set to false. In such cases, we interpret the application as multi-tenant, and consequently, we assess user access to a specific tenant to restrict engagement access within that tenant. Conversely, if this variable is set to true, we consider it a single-tenant environment, eliminating the need to check user tenant access.
met-cron/sample.env
Outdated
JWT_OIDC_WELL_KNOWN_CONFIG="" # default: constructed from issuer | ||
JWT_OIDC_JWKS_URI="" # default: constructed from issuer | ||
# Object path to access roles from JWT token | ||
# JWT_OIDC_ROLE_CLAIM=realm_access.roles # SSO schema |
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.
We should remove this commented-out line if it's not being used
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.
Removed it, thanks.
met-cron/sample.env
Outdated
EMAIL_ENVIRONMENT= | ||
EMAIL_FROM_ADDRESS="[email protected]" | ||
# Email Template Configuration | ||
# Subject lines have a reasonable default value |
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.
Could you explain this comment a little bit more please?
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 revised the comment to enhance clarity.
DATABASE_TEST_PORT= | ||
|
||
# A keycloak server is started automatically by Pytest; there is no need to start your own instance. |
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.
Thanks for this comment!
project_name = None | ||
if metadata_model and 'project_name' in metadata_model.project_metadata: | ||
project_name = metadata_model.project_metadata.get('project_name') | ||
# TODO should be re-visited once the engagement metadata functionality of completed |
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.
Thanks for the TODO comments. This is exactly what we want to see when we're commenting out code
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2375 +/- ##
==========================================
- Coverage 72.22% 72.21% -0.02%
==========================================
Files 509 509
Lines 17129 17130 +1
Branches 1288 1288
==========================================
- Hits 12372 12370 -2
- Misses 4517 4520 +3
Partials 240 240
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Issue #: https://apps.itsm.gov.bc.ca/jira/browse/DESENG-493
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).