Skip to content

Commit 91bc07c

Browse files
Merge pull request #756 from bcgov/dev
MSP Scraper Fixes
2 parents a32a8ef + f360c30 commit 91bc07c

File tree

14 files changed

+71
-54
lines changed

14 files changed

+71
-54
lines changed

airflow/etl_pipelines/scrapers/StationObservationPipeline/StationObservationPipeline.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ def download_data(self):
181181

182182
# Remove any leading or trailing whitespaces:
183183
data_df = data_df.rename(str.strip)
184+
# Since from here on out the columns will be the stripped ones, if they have changed
185+
# our schema_overrides from above may not have applied
186+
# Perform CAST-ing as necessary
187+
if(key in self.expected_dtype and self.name != "ASP"):
188+
data_df = data_df.cast(self.expected_dtype[key], strict=False)
184189

185190
# __downloaded_data contains the path to the downloaded data if go_through_all_stations is False
186191
if not self.go_through_all_stations:

airflow/pod_templates/okd/heavy_task_template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ spec:
3030
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
3131
valueFrom:
3232
secretKeyRef:
33-
name: bcwat-airflow-metadata
33+
name: airflow-database-connection
3434
key: connection
3535
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
3636
valueFrom:
3737
secretKeyRef:
38-
name: bcwat-airflow-metadata
38+
name: airflow-database-connection
3939
key: connection
4040
- name: AIRFLOW_CONN_AIRFLOW_DB
4141
valueFrom:
4242
secretKeyRef:
43-
name: bcwat-airflow-metadata
43+
name: airflow-database-connection
4444
key: connection
4545
- name: AIRFLOW__WEBSERVER__SECRET_KEY
4646
valueFrom:

airflow/pod_templates/okd/largest_task_template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ spec:
3030
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
3131
valueFrom:
3232
secretKeyRef:
33-
name: bcwat-airflow-metadata
33+
name: airflow-database-connection
3434
key: connection
3535
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
3636
valueFrom:
3737
secretKeyRef:
38-
name: bcwat-airflow-metadata
38+
name: airflow-database-connection
3939
key: connection
4040
- name: AIRFLOW_CONN_AIRFLOW_DB
4141
valueFrom:
4242
secretKeyRef:
43-
name: bcwat-airflow-metadata
43+
name: airflow-database-connection
4444
key: connection
4545
- name: AIRFLOW__WEBSERVER__SECRET_KEY
4646
valueFrom:

airflow/pod_templates/okd/medium_task_template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ spec:
3030
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
3131
valueFrom:
3232
secretKeyRef:
33-
name: bcwat-airflow-metadata
33+
name: airflow-database-connection
3434
key: connection
3535
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
3636
valueFrom:
3737
secretKeyRef:
38-
name: bcwat-airflow-metadata
38+
name: airflow-database-connection
3939
key: connection
4040
- name: AIRFLOW_CONN_AIRFLOW_DB
4141
valueFrom:
4242
secretKeyRef:
43-
name: bcwat-airflow-metadata
43+
name: airflow-database-connection
4444
key: connection
4545
- name: AIRFLOW__WEBSERVER__SECRET_KEY
4646
valueFrom:

airflow/pod_templates/okd/small_task_template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ spec:
3030
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
3131
valueFrom:
3232
secretKeyRef:
33-
name: bcwat-airflow-metadata
33+
name: airflow-database-connection
3434
key: connection
3535
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
3636
valueFrom:
3737
secretKeyRef:
38-
name: bcwat-airflow-metadata
38+
name: airflow-database-connection
3939
key: connection
4040
- name: AIRFLOW_CONN_AIRFLOW_DB
4141
valueFrom:
4242
secretKeyRef:
43-
name: bcwat-airflow-metadata
43+
name: airflow-database-connection
4444
key: connection
4545
- name: AIRFLOW__WEBSERVER__SECRET_KEY
4646
valueFrom:

airflow/pod_templates/okd/tiny_task_template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ spec:
3030
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
3131
valueFrom:
3232
secretKeyRef:
33-
name: bcwat-airflow-metadata
33+
name: airflow-database-connection
3434
key: connection
3535
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
3636
valueFrom:
3737
secretKeyRef:
38-
name: bcwat-airflow-metadata
38+
name: airflow-database-connection
3939
key: connection
4040
- name: AIRFLOW_CONN_AIRFLOW_DB
4141
valueFrom:
4242
secretKeyRef:
43-
name: bcwat-airflow-metadata
43+
name: airflow-database-connection
4444
key: connection
4545
- name: AIRFLOW__WEBSERVER__SECRET_KEY
4646
valueFrom:

charts/okd/airflow/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Currently, the only release that exists is on the Foundry OKD. Therefore, the on
1010

1111
To initialize viewing the logs within , a Persistent Volume and Storage Class MUST be initialized for the Persistent Volume Claim to be enabled.
1212

13-
A secret must be created in the `bcwat` namespace titled `bcwat-airflow-metadata`. This holds a key value pair containing the connection information for the airflow metadata database.
13+
A secret must be created in the `bcwat` namespace titled `airflow-conn-bcwat-db`. This holds a key value pair containing the connection information for the airflow metadata database.
1414

1515
This database is required for airflow, and will be populated via the migrate databases job that occurs during the helm upgrade.
1616

1717
```bash
1818
apiVersion: v1
1919
kind: Secret
2020
metadata:
21-
name: bcwat-airflow-metadata
21+
name: airflow-conn-bcwat-db
2222
namespace: bcwat
2323
type: Opaque
2424
stringData:

charts/okd/airflow/values.yaml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,6 @@ images:
3737
tag: latest
3838
pullPolicy: Always
3939

40-
migrateDatabaseJob:
41-
env:
42-
- name: AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION
43-
value: "False"
44-
securityContext:
45-
runAsNonRoot: true
46-
seccompProfile:
47-
type: RuntimeDefault
48-
ttlSecondsAfterFinished: 180
49-
50-
createUserJob:
51-
env:
52-
- name: AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION
53-
value: "False"
54-
securityContext:
55-
runAsNonRoot: true
56-
seccompProfile:
57-
type: RuntimeDefault
58-
ttlSecondsAfterFinished: 180
59-
6040
redis:
6141
enabled: false
6242

@@ -79,13 +59,31 @@ logs:
7959
enabled: true
8060
storageClassName: airflow
8161

62+
migrateDatabaseJob:
63+
useHelmHooks: false
64+
env:
65+
- name: AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION
66+
value: "False"
67+
securityContext:
68+
runAsNonRoot: true
69+
seccompProfile:
70+
type: RuntimeDefault
71+
ttlSecondsAfterFinished: 180
72+
73+
createUserJob:
74+
useHelmHooks: false
75+
env:
76+
- name: AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION
77+
value: "False"
78+
securityContext:
79+
runAsNonRoot: true
80+
seccompProfile:
81+
type: RuntimeDefault
82+
ttlSecondsAfterFinished: 180
83+
8284
webserver:
83-
livenessProbe:
84-
initialDelaySeconds: 60
85-
readinessProbe:
86-
initialDelaySeconds: 60
8785
startupProbe:
88-
initialDelaySeconds: 30
86+
timeoutSeconds: 60
8987
env:
9088
- name: AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION
9189
value: "False"
@@ -116,7 +114,7 @@ webserver:
116114
cpu: 50m
117115
memory: 75Mi
118116
waitForMigrations:
119-
enabled: false
117+
enabled: true
120118
securityContext:
121119
runAsNonRoot: true
122120
seccompProfile:
@@ -129,7 +127,7 @@ scheduler:
129127
- name: ENVIRONMENT
130128
value: OKD
131129
waitForMigrations:
132-
enabled: false
130+
enabled: true
133131
securityContext:
134132
runAsNonRoot: true
135133
seccompProfile:
@@ -144,7 +142,7 @@ triggerer:
144142
persistence:
145143
enabled: false
146144
waitForMigrations:
147-
enabled: false
145+
enabled: true
148146
securityContext:
149147
runAsNonRoot: true
150148
seccompProfile:

client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bc-wat-app",
33
"private": true,
4-
"version": "4.11.1",
4+
"version": "4.11.11",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)