Add unit tests to GTFS-RT parse and validate Airflow operators#5179
Draft
Add unit tests to GTFS-RT parse and validate Airflow operators#5179
Conversation
|
Terraform plan in iac/cal-itp-data-infra/composer/us No changes. Your infrastructure matches the configuration.📝 Plan generated in Plan Terraform for Warehouse and DAG changes #1917 |
|
Terraform plan in iac/cal-itp-data-infra-staging/airflow/us Plan: 2 to add, 2 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
!~ update in-place
Terraform will perform the following actions:
# google_storage_bucket_object.calitp-staging-composer["dags/parse_and_validate_gtfs_rt.py"] will be created
+ resource "google_storage_bucket_object" "calitp-staging-composer" {
+ bucket = "calitp-staging-composer"
+ content = (sensitive value)
+ content_type = (known after apply)
+ crc32c = (known after apply)
+ detect_md5hash = "different hash"
+ generation = (known after apply)
+ id = (known after apply)
+ kms_key_name = (known after apply)
+ md5hash = (known after apply)
+ md5hexhash = (known after apply)
+ media_link = (known after apply)
+ name = "dags/parse_and_validate_gtfs_rt.py"
+ output_name = (known after apply)
+ self_link = (known after apply)
+ source = "../../../../airflow/dags/parse_and_validate_gtfs_rt.py"
+ storage_class = (known after apply)
}
# google_storage_bucket_object.calitp-staging-composer["plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"] will be created
+ resource "google_storage_bucket_object" "calitp-staging-composer" {
+ bucket = "calitp-staging-composer"
+ content = (sensitive value)
+ content_type = (known after apply)
+ crc32c = (known after apply)
+ detect_md5hash = "different hash"
+ generation = (known after apply)
+ id = (known after apply)
+ kms_key_name = (known after apply)
+ md5hash = (known after apply)
+ md5hexhash = (known after apply)
+ media_link = (known after apply)
+ name = "plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"
+ output_name = (known after apply)
+ self_link = (known after apply)
+ source = "../../../../airflow/plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"
+ storage_class = (known after apply)
}
# google_storage_bucket_object.calitp-staging-composer-catalog will be updated in-place
!~ resource "google_storage_bucket_object" "calitp-staging-composer-catalog" {
!~ content = (sensitive value)
!~ crc32c = "n61rBA==" -> (known after apply)
!~ detect_md5hash = "zk9XqSQyX8VMcQoviaMv2Q==" -> "different hash"
!~ generation = 1777671557648398 -> (known after apply)
id = "calitp-staging-composer-data/warehouse/target/catalog.json"
!~ md5hash = "zk9XqSQyX8VMcQoviaMv2Q==" -> (known after apply)
name = "data/warehouse/target/catalog.json"
# (16 unchanged attributes hidden)
}
# google_storage_bucket_object.calitp-staging-composer-manifest will be updated in-place
!~ resource "google_storage_bucket_object" "calitp-staging-composer-manifest" {
!~ content = (sensitive value)
!~ crc32c = "nSDRww==" -> (known after apply)
!~ detect_md5hash = "+GI7CKcGvoTWgbI8/Su3MQ==" -> "different hash"
!~ generation = 1777671558808840 -> (known after apply)
id = "calitp-staging-composer-data/warehouse/target/manifest.json"
!~ md5hash = "+GI7CKcGvoTWgbI8/Su3MQ==" -> (known after apply)
name = "data/warehouse/target/manifest.json"
# (16 unchanged attributes hidden)
}
Plan: 2 to add, 2 to change, 0 to destroy.📝 Plan generated in Plan Terraform for Warehouse and DAG changes #1917 |
|
Terraform plan in iac/cal-itp-data-infra/airflow/us Plan: 2 to add, 2 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
!~ update in-place
Terraform will perform the following actions:
# google_storage_bucket_object.calitp-composer["dags/parse_and_validate_gtfs_rt.py"] will be created
+ resource "google_storage_bucket_object" "calitp-composer" {
+ bucket = "calitp-composer"
+ content = (sensitive value)
+ content_type = (known after apply)
+ crc32c = (known after apply)
+ detect_md5hash = "different hash"
+ generation = (known after apply)
+ id = (known after apply)
+ kms_key_name = (known after apply)
+ md5hash = (known after apply)
+ md5hexhash = (known after apply)
+ media_link = (known after apply)
+ name = "dags/parse_and_validate_gtfs_rt.py"
+ output_name = (known after apply)
+ self_link = (known after apply)
+ source = "../../../../airflow/dags/parse_and_validate_gtfs_rt.py"
+ storage_class = (known after apply)
}
# google_storage_bucket_object.calitp-composer["plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"] will be created
+ resource "google_storage_bucket_object" "calitp-composer" {
+ bucket = "calitp-composer"
+ content = (sensitive value)
+ content_type = (known after apply)
+ crc32c = (known after apply)
+ detect_md5hash = "different hash"
+ generation = (known after apply)
+ id = (known after apply)
+ kms_key_name = (known after apply)
+ md5hash = (known after apply)
+ md5hexhash = (known after apply)
+ media_link = (known after apply)
+ name = "plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"
+ output_name = (known after apply)
+ self_link = (known after apply)
+ source = "../../../../airflow/plugins/operators/gtfs_rt_feed_to_jsonl_operator.py"
+ storage_class = (known after apply)
}
# google_storage_bucket_object.calitp-composer-catalog will be updated in-place
!~ resource "google_storage_bucket_object" "calitp-composer-catalog" {
!~ content = (sensitive value)
!~ crc32c = "Ku/hRQ==" -> (known after apply)
!~ detect_md5hash = "J/vXFF0Zm0pGSz3pVH1Qwg==" -> "different hash"
!~ generation = 1777671559668369 -> (known after apply)
id = "calitp-composer-data/warehouse/target/catalog.json"
!~ md5hash = "J/vXFF0Zm0pGSz3pVH1Qwg==" -> (known after apply)
name = "data/warehouse/target/catalog.json"
# (16 unchanged attributes hidden)
}
# google_storage_bucket_object.calitp-composer-manifest will be updated in-place
!~ resource "google_storage_bucket_object" "calitp-composer-manifest" {
!~ content = (sensitive value)
!~ crc32c = "WTgTJg==" -> (known after apply)
!~ detect_md5hash = "cPI7QSTY+2+HBdabV3Mh2w==" -> "different hash"
!~ generation = 1777671561135128 -> (known after apply)
id = "calitp-composer-data/warehouse/target/manifest.json"
!~ md5hash = "cPI7QSTY+2+HBdabV3Mh2w==" -> (known after apply)
name = "data/warehouse/target/manifest.json"
# (16 unchanged attributes hidden)
}
Plan: 2 to add, 2 to change, 0 to destroy.📝 Plan generated in Plan Terraform for Warehouse and DAG changes #1917 |
1dcb614 to
007a3d4
Compare
007a3d4 to
5af570e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds unit test coverage to the GTFS-RT DAG by way of extracting operators and porting behavioral tests.
Relates to #4488
Type of change
How has this been tested?
pytestand local AirflowPost-merge follow-ups
Monitor staging Airflow