Skip to content

Commit 276858a

Browse files
committed
Terraform corrections
1 parent 7c46470 commit 276858a

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.github/workflows/api-deployer.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,18 +318,18 @@ jobs:
318318
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
319319
PLAN_OUTPUT: ${{ steps.plan.outputs.stdout }}
320320

321+
- name: Persist TF plan
322+
uses: actions/upload-artifact@v4
323+
with:
324+
name: terraform-plan.txt
325+
path: infra/terraform-plan.txt
326+
overwrite: true
327+
321328
- name: Terraform Apply
322329
if: ${{ inputs.TF_APPLY }}
323330
run: |
324331
cd infra
325332
terraform apply -auto-approve tf.plan
326333
env:
327334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
328-
PLAN_OUTPUT: ${{ steps.plan.outputs.stdout }}
329-
330-
- name: Persist TF plan
331-
uses: actions/upload-artifact@v4
332-
with:
333-
name: terraform-plan.txt
334-
path: infra/terraform-plan.txt
335-
overwrite: true
335+
PLAN_OUTPUT: ${{ steps.plan.outputs.stdout }}

api/src/shared/common/db_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Validationreport,
1313
Gtfsrealtimefeed,
1414
Entitytype,
15+
Redirectingid,
1516
)
1617

1718
from shared.feed_filters.gtfs_feed_filter import GtfsFeedFilter, LocationFilter
@@ -90,7 +91,7 @@ def get_all_gtfs_feeds_query(
9091
feed_query = feed_query.options(
9192
joinedload(Gtfsfeed.gtfsdatasets)
9293
.joinedload(Gtfsdataset.validation_reports)
93-
.joinedload(Validationreport.notices),
94+
.joinedload(Validationreport.features),
9495
*get_joinedload_options(),
9596
).order_by(Gtfsfeed.stable_id)
9697

@@ -246,6 +247,6 @@ def get_joinedload_options() -> [_AbstractLoad]:
246247
return [
247248
joinedload(Feed.locations),
248249
joinedload(Feed.externalids),
249-
joinedload(Feed.redirectingids),
250+
joinedload(Feed.redirectingids).joinedload(Redirectingid.target),
250251
joinedload(Feed.officialstatushistories),
251252
]

infra/functions-python/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ data "google_pubsub_topic" "datasets_batch_topic" {
8888
name = "datasets-batch-topic-${var.environment}"
8989
}
9090

91+
data "google_storage_bucket" "datasets_bucket" {
92+
name = "${var.datasets_bucket_name}-${var.environment}"
93+
}
94+
9195
# Service account to execute the cloud functions
9296
resource "google_service_account" "functions_service_account" {
9397
account_id = "functions-service-account"
@@ -853,6 +857,7 @@ resource "google_cloudfunctions2_function" "export_csv" {
853857
service_config {
854858
environment_variables = {
855859
DATASETS_BUCKET_NANE = var.datasets_bucket_name
860+
QAZ = "${var.datasets_bucket_name}-${var.environment}"
856861
PROJECT_ID = var.project_id
857862
ENVIRONMENT = var.environment
858863
}

0 commit comments

Comments
 (0)