Skip to content
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

move to production #2987

Merged
merged 9 commits into from
Jan 26, 2024
2 changes: 1 addition & 1 deletion k8s/auth-service/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 3
image:
repository: eu.gcr.io/airqo-250220/airqo-auth-api
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/auth-service/values-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-auth-api
tag: stage-f47db6d2-1706169741
tag: stage-9c5e5eb9-1706226064
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/data-proxy/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-data-proxy-api
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/device-registry/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 3
image:
repository: eu.gcr.io/airqo-250220/airqo-device-registry-api
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/gp-model/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
namespace: production
configMap: env-gp-model-production
images:
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
repositories:
cronJob: eu.gcr.io/airqo-250220/airqo-gp-model-job
brokerConsumer: eu.gcr.io/airqo-250220/airqo-gp-model-broker-consumer
Expand Down
2 changes: 1 addition & 1 deletion k8s/predict/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ images:
predictJob: eu.gcr.io/airqo-250220/airqo-predict-job
trainJob: eu.gcr.io/airqo-250220/airqo-train-job
predictPlaces: eu.gcr.io/airqo-250220/airqo-predict-places-air-quality
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
api:
name: airqo-prediction-api
label: prediction-api
Expand Down
2 changes: 1 addition & 1 deletion k8s/workflows/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ images:
repositories:
initContainer: eu.gcr.io/airqo-250220/airqo-workflows-xcom
containers: eu.gcr.io/airqo-250220/airqo-workflows
tag: prod-ae9b1fab-1706224159
tag: prod-0daa6308-1706226127
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
28 changes: 14 additions & 14 deletions src/device-registry/utils/create-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,27 +267,27 @@ const createGrid = {
}

// Remove old grid_ids from sites
// const pullResponse = await SiteModel(tenant).updateMany(
// {
// _id: { $in: batchSiteIds },
// grids: { $ne: grid_id.toString() },
// },
// {
// $pull: { grids: { $ne: grid_id.toString() } },
// }
// );

// Remove the Grid from Sites which no longer have devices deployed to them
const pullResponse = await SiteModel(tenant).updateMany(
{
_id: { $nin: batchSiteIds }, // Select sites not in batchSiteIds
grids: { $in: [grid_id.toString()] }, // Select sites that contain the grid_id
_id: { $in: batchSiteIds },
grids: { $ne: grid_id.toString() },
},
{
$pull: { grids: grid_id.toString() }, // Remove grid_id from the selected sites
$pull: { grids: { $ne: grid_id.toString() } },
}
);

// Remove the Grid from Sites which no longer have devices deployed to them
// const pullResponse = await SiteModel(tenant).updateMany(
// {
// _id: { $nin: batchSiteIds }, // Select sites not in batchSiteIds
// grids: { $in: [grid_id.toString()] }, // Select sites that contain the grid_id
// },
// {
// $pull: { grids: grid_id.toString() }, // Remove grid_id from the selected sites
// }
// );

logObject("pullResponse", pullResponse);

// Check if pull operation was successful
Expand Down
Loading