FIRST-Tech-Challenge / fmltc

FIRST Machine Learning Toolchain
Other
39 stars 14 forks source link

Disable training buttons when training not enabled, and add support for datastore config items #170

Closed cmacfarl closed 2 years ago

cmacfarl commented 2 years ago

Use a datastore collection to store configurable items.

Set a boolean property, training_enabled, in the Configuration entity to enable or disable the training buttons.

Not implemented yet would be an admin only route that will refresh the config. Or, one step further, an admin UI that will set them for you and refresh the config. At present you hand add them via the cloud console.

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/6cb652a57663039ce6b8d7dd8040c234.zip" -> "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/1985ed45bfff9e8bd50556613dccb7e2.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 = "5d83425db9205596ee98ab4877e5bd98.zip" -> "6f33af1692902526e40fa58c662af3b6.zip" # (13 unchanged attributes hidden) # (2 unchanged blocks hidden) } # 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 = "jnVpXA==" -> (known after apply) ! detect_md5hash = "bLZSpXZjA5zmuNfdgEDCNA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gae-source-6cb652a57663039ce6b8d7dd8040c234.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "bLZSpXZjA5zmuNfdgEDCNA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/6cb652a57663039ce6b8d7dd8040c234.zip?generation=1635176626444423&alt=media" -> (known after apply) - metadata = {} -> null ! name = "6cb652a57663039ce6b8d7dd8040c234.zip" -> "1985ed45bfff9e8bd50556613dccb7e2.zip" # forces replacement ! output_name = "6cb652a57663039ce6b8d7dd8040c234.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/6cb652a57663039ce6b8d7dd8040c234.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.closure_js must be replaced -/+ resource "google_storage_bucket_object" "closure_js" { ! crc32c = "4k2m9w==" -> (known after apply) ! detect_md5hash = "Lul2pbOafacKyMRcaQfc7g==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-compiled/js/fmltc.js" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "Lul2pbOafacKyMRcaQfc7g==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/compiled%2Fjs%2Ffmltc.js?generation=1635131803054895&alt=media" -> (known after apply) - metadata = {} -> null name = "compiled/js/fmltc.js" ! output_name = "compiled/js/fmltc.js" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/compiled%2Fjs%2Ffmltc.js" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (3 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 = "Zk0a1w==" -> (known after apply) ! detect_md5hash = "XYNCXbkgVZbumKtId+W9mA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gcf-source-5d83425db9205596ee98ab4877e5bd98.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "XYNCXbkgVZbumKtId+W9mA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/5d83425db9205596ee98ab4877e5bd98.zip?generation=1635176626381045&alt=media" -> (known after apply) - metadata = {} -> null ! name = "5d83425db9205596ee98ab4877e5bd98.zip" -> "6f33af1692902526e40fa58c662af3b6.zip" # forces replacement ! output_name = "5d83425db9205596ee98ab4877e5bd98.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/5d83425db9205596ee98ab4877e5bd98.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } Plan: 3 to add, 2 to change, 3 to destroy. ```