FIRST-Tech-Challenge / fmltc

FIRST Machine Learning Toolchain
Other
39 stars 14 forks source link

Add support for filtering on a list of closed beta teams #152

Closed cmacfarl closed 2 years ago

cmacfarl commented 2 years ago

If a simple list of teams exists in a specific bucket, then assign all of those teams the ml_test role.

Only applies to the production environment. The ml_test role was removed from the development environment to prevent teams from being able to log into both.

@lizlooney The team_info download_as_bytes() change is just because the documentation for download_as_string() says it's deprecated and the implementation just calls download_as_bytes().

github-actions[bot] commented 2 years ago

Terraform plan Succeeded for Workspace: default

Show Output ```diff An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ! update in-place -/+ destroy and then create replacement Terraform will perform the following actions: # module.dev.google_app_engine_standard_app_version.fmltc-app-v1 will be updated in-place ! resource "google_app_engine_standard_app_version" "fmltc-app-v1" { id = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" name = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" # (9 unchanged attributes hidden) ! deployment { ! zip { ! source_url = "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/d546dbaaa9cc3a932139fbd83721b66b.zip" -> "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/30b995ae977cbc9cf8b298264a2b46d2.zip" # (1 unchanged attribute hidden) } } - handlers { - auth_fail_action = "AUTH_FAIL_ACTION_REDIRECT" -> null - login = "LOGIN_OPTIONAL" -> null - security_level = "SECURE_OPTIONAL" -> null - url_regex = ".*" -> null - script { - script_path = "auto" -> null } } # (8 unchanged blocks hidden) } # module.dev.google_cloudfunctions_function.perform-action will be updated in-place ! resource "google_cloudfunctions_function" "perform-action" { id = "projects/ftc-ml-firstinspires-dev/locations/us-central1/functions/perform_action" name = "perform_action" ! source_archive_object = "7b85953eb00736f3b426379441cf09dd.zip" -> "d256b00eec5f66367fb5d4981eba1a92.zip" # (13 unchanged attributes hidden) # (2 unchanged blocks hidden) } # module.dev.google_storage_bucket.fmltc-blobs will be updated in-place ! resource "google_storage_bucket" "fmltc-blobs" { id = "ftc-ml-firstinspires-dev-blobs" name = "ftc-ml-firstinspires-dev-blobs" # (11 unchanged attributes hidden) - cors { - max_age_seconds = 3600 -> null - method = [ - "GET", ] -> null - origin = [ - "https://ftc-ml-dev.firstinspires.org", ] -> null - response_header = [ - "Content-Type", ] -> null } } # module.dev.google_storage_bucket_object.app-server-archive must be replaced -/+ resource "google_storage_bucket_object" "app-server-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "0jkp5A==" -> (known after apply) ! detect_md5hash = "1UbbqqnMOpMhOfvYNyG2aw==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gae-source-d546dbaaa9cc3a932139fbd83721b66b.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "1UbbqqnMOpMhOfvYNyG2aw==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/d546dbaaa9cc3a932139fbd83721b66b.zip?generation=1634401886637829&alt=media" -> (known after apply) - metadata = {} -> null ! name = "d546dbaaa9cc3a932139fbd83721b66b.zip" -> "30b995ae977cbc9cf8b298264a2b46d2.zip" # forces replacement ! output_name = "d546dbaaa9cc3a932139fbd83721b66b.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/d546dbaaa9cc3a932139fbd83721b66b.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.cloud-function-archive must be replaced -/+ resource "google_storage_bucket_object" "cloud-function-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "xSj/PQ==" -> (known after apply) ! detect_md5hash = "e4WVPrAHNvO0JjeUQc8J3Q==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gcf-source-7b85953eb00736f3b426379441cf09dd.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "e4WVPrAHNvO0JjeUQc8J3Q==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/7b85953eb00736f3b426379441cf09dd.zip?generation=1634401886512090&alt=media" -> (known after apply) - metadata = {} -> null ! name = "7b85953eb00736f3b426379441cf09dd.zip" -> "d256b00eec5f66367fb5d4981eba1a92.zip" # forces replacement ! output_name = "7b85953eb00736f3b426379441cf09dd.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/7b85953eb00736f3b426379441cf09dd.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } Plan: 2 to add, 3 to change, 2 to destroy. ```