Skip to content

Conversation

@NatSquared
Copy link
Collaborator

NatSquared and others added 30 commits May 5, 2025 18:21
...that coexist in the e903c2-tools namespace, to avoid collisions
since we use the common SSO keycloak instance
For readability, you understand

Co-authored-by: Baelx <[email protected]>
Add Helm chart and templates for MET API deployment
Also add OIDC configuration endpoint and environment variable handling
DESENG-811: Implement Helm chart for MET Web
@NatSquared NatSquared marked this pull request as ready for review May 22, 2025 23:39
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2025

Codecov Report

Attention: Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.45%. Comparing base (fc02743) to head (9fd58d4).
Report is 11 commits behind head on omega-project.

Files with missing lines Patch % Lines
met-api/src/met_api/resources/oidc_config.py 82.75% 5 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           omega-project    #2633      +/-   ##
=================================================
+ Coverage          74.94%   75.45%   +0.50%     
=================================================
  Files                611      653      +42     
  Lines              22375    23305     +930     
  Branches            1932     1927       -5     
=================================================
+ Hits               16769    17584     +815     
- Misses              5334     5449     +115     
  Partials             272      272              
Flag Coverage Δ
analyticsapi 88.93% <ø> (?)
metapi 87.05% <83.87%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
met-api/src/met_api/config.py 97.33% <ø> (ø)
met-api/src/met_api/resources/__init__.py 100.00% <100.00%> (ø)
met-api/src/met_api/schemas/widget_listening.py 100.00% <ø> (ø)
...src/met_api/services/widget_translation_service.py 76.66% <ø> (+0.19%) ⬆️
met-web/src/config.ts 100.00% <ø> (+3.22%) ⬆️
met-api/src/met_api/resources/oidc_config.py 82.75% <82.75%> (ø)

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@jareth-whitney jareth-whitney left a comment

Choose a reason for hiding this comment

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

Hi Nat, this looks like a collection of great new environment definition that will modernize our platform. PR approved! Please just take a look at my comments, and especially address the following:

  • Small typo
  • Review usage of nullish coalescing operator
  • prod values email.environment string
  • deployment-scheduler vault.hashicorp.com/auth-path - is this static or should it be dynamic?

test -f venv/bin/activate || python3.12 -m venv $(CURRENT_ABS_DIR)/venv ;\
. venv/bin/activate ;\
pip install --upgrade pip ;\
pip install -Ur requirements/prod.txt ;\
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this script performing unwanted upgrades as is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes; it was

if __name__ == "__main__":
application.run(debug=True, host='0.0.0.0', port=5001)
# Never set debug=True in production
application.run(debug=False, host='0.0.0.0', port=5001)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch


class ClosingSoonEmailService: # pylint: disable=too-few-public-methods
"""Mail for newly published engagements"""
"""Service to send emails for engagements that are closing soon."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for implementing a better description here.

// This file is a stub for the environment variables.
// In production, this is generated and served by Nginx.
// In development, values are provided by process.env.
// It is left here so as to avoid 404 errors in development.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the detailed explanations

protocol: TCP
resources:
limits:
cpu: 150m
Copy link
Contributor

Choose a reason for hiding this comment

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

The CPU usage limitations are real :````)

baseUrl: 'loginproxy.gov.bc.ca'

email:
environment: 'Sent from the Production environment'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we give the environment string a consistent structure to match dev and test? Totally optional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since this will be sending to public users, I decided to make the string a bit more plain-language since "You are using the PROD environment" wouldn't make much sense to them. I can update the others to match, but I get the feeling we'll be reworking this template to remove the environment banner eventually

@@ -10,7 +9,7 @@ parameters:
- name: SOURCE_REPOSITORY_URL
displayName: Git Repository URL
description: The URL of the repository with your application source code.
value: https://github.com/VineetBala-AOT/redash
Copy link
Contributor

Choose a reason for hiding this comment

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

oh my gosh, good catch

vault.hashicorp.com/agent-pre-populate-only: 'true'
vault.hashicorp.com/namespace: platform-services
vault.hashicorp.com/role: {{ .Values.vault.engine }}
vault.hashicorp.com/auth-path: auth/k8s-gold
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this value be consistent in another use context for this platform or should it be captured as an env variable?

@@ -0,0 +1,70 @@
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't these being deprecated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes; DeploymentConfigs are deprecated. Tickets DESENG-802 through -810 were created to convert these DeploymentConfigs to Deployments, which is out of scope for this ticket.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 4, 2025

@NatSquared NatSquared merged commit 2797543 into omega-project Jun 4, 2025
17 of 20 checks passed
@NatSquared NatSquared deleted the DESENG-811-use-helm-charts branch June 27, 2025 20:06
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