From 48b9723a374dbdad81217984d578801b85976c88 Mon Sep 17 00:00:00 2001 From: Charles Guo Date: Mon, 15 Jul 2024 16:57:56 -0400 Subject: [PATCH 1/5] Upgrade to Python 3.12 --- .python_version | 1 + MODULE.bazel | 6 +++--- requirements.lock.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .python_version diff --git a/.python_version b/.python_version new file mode 100644 index 00000000..455808f8 --- /dev/null +++ b/.python_version @@ -0,0 +1 @@ +3.12.4 diff --git a/MODULE.bazel b/MODULE.bazel index d98c6531..6c296fc6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,14 +9,14 @@ bazel_dep(name = "rules_oci", version = "1.7.6") python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain( - python_version = "3.11", + python_version = "3.12", ) -use_repo(python, "python_3_11") +use_repo(python, "python_3_12") pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") pip.parse( hub_name = "py_deps", - python_version = "3.11", + python_version = "3.12", requirements_lock = "//:requirements.lock.txt", ) use_repo(pip, "py_deps") diff --git a/requirements.lock.txt b/requirements.lock.txt index 6fd89118..b6517e69 100644 --- a/requirements.lock.txt +++ b/requirements.lock.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # bazel run //:requirements.update From 56fb1afcf73e7aac0a091e3041b402fbcfa51ba2 Mon Sep 17 00:00:00 2001 From: Charles Guo Date: Mon, 15 Jul 2024 17:02:21 -0400 Subject: [PATCH 2/5] Define no-op test --- py_proto/test/proto_file_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py_proto/test/proto_file_test.py b/py_proto/test/proto_file_test.py index 9eb9c7c5..86ce0955 100644 --- a/py_proto/test/proto_file_test.py +++ b/py_proto/test/proto_file_test.py @@ -4,7 +4,8 @@ class ProtoFileTest(unittest.TestCase): - pass + def test_noop(self): + assert True if __name__ == "__main__": From 0e9ae14dbe6dd20979af8edc3523ad4c579178e0 Mon Sep 17 00:00:00 2001 From: Charles Guo Date: Mon, 15 Jul 2024 17:32:58 -0400 Subject: [PATCH 3/5] Tag all migration images with manual --- ark_nova_stats/api/migrations/BUILD.bazel | 2 ++ fitbit_challenges/api/migrations/BUILD.bazel | 2 ++ fitbit_challenges/worker/BUILD.bazel | 2 ++ home_api/api/migrations/BUILD.bazel | 2 ++ mc_manager/api/migrations/BUILD.bazel | 2 ++ mc_manager/worker/BUILD.bazel | 2 ++ proto_registry/api/migrations/BUILD.bazel | 2 ++ 7 files changed, 14 insertions(+) diff --git a/ark_nova_stats/api/migrations/BUILD.bazel b/ark_nova_stats/api/migrations/BUILD.bazel index 382d88a6..5e481328 100644 --- a/ark_nova_stats/api/migrations/BUILD.bazel +++ b/ark_nova_stats/api/migrations/BUILD.bazel @@ -53,6 +53,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //ark_nova_stats/api/migrations:image_tarball @@ -62,6 +63,7 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/ark-nova-stats-api-migrations:latest"], repository = "docker.io/shaldengeki/ark-nova-stats-api-migrations", + tags = ["manual"], visibility = ["//ark_nova_stats/api/migrations:__subpackages__"], ) diff --git a/fitbit_challenges/api/migrations/BUILD.bazel b/fitbit_challenges/api/migrations/BUILD.bazel index b622cd5a..89369b31 100644 --- a/fitbit_challenges/api/migrations/BUILD.bazel +++ b/fitbit_challenges/api/migrations/BUILD.bazel @@ -52,6 +52,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //fitbit_challenges/api/migrations:image_tarball @@ -61,5 +62,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/fitbit-challenges-migrations:latest"], repository = "docker.io/shaldengeki/fitbit-challenges-migrations", + tags = ["manual"], visibility = ["//fitbit_challenges/api/migrations:__subpackages__"], ) diff --git a/fitbit_challenges/worker/BUILD.bazel b/fitbit_challenges/worker/BUILD.bazel index 65394361..eb96ab02 100644 --- a/fitbit_challenges/worker/BUILD.bazel +++ b/fitbit_challenges/worker/BUILD.bazel @@ -46,6 +46,7 @@ py_oci_image( "FITBIT_VERIFICATION_CODE": "testing", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //fitbit_challenges/worker:image_tarball @@ -55,5 +56,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/fitbit-challenges-worker:latest"], repository = "docker.io/shaldengeki/fitbit-challenges-worker", + tags = ["manual"], visibility = ["//fitbit_challenges/worker:__subpackages__"], ) diff --git a/home_api/api/migrations/BUILD.bazel b/home_api/api/migrations/BUILD.bazel index 03cec802..20a2c13f 100644 --- a/home_api/api/migrations/BUILD.bazel +++ b/home_api/api/migrations/BUILD.bazel @@ -50,6 +50,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //home_api/api/migrations:image_tarball @@ -59,5 +60,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/home-api-api-migrations:latest"], repository = "docker.io/shaldengeki/home-api-api-migrations", + tags = ["manual"], visibility = ["//home_api/api/migrations:__subpackages__"], ) diff --git a/mc_manager/api/migrations/BUILD.bazel b/mc_manager/api/migrations/BUILD.bazel index d7f0831e..7338e9a4 100644 --- a/mc_manager/api/migrations/BUILD.bazel +++ b/mc_manager/api/migrations/BUILD.bazel @@ -49,6 +49,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //mc_manager/api/migrations:image_tarball @@ -58,5 +59,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/mc-manager-api-migrations:latest"], repository = "docker.io/shaldengeki/mc-manager-api-migrations", + tags = ["manual"], visibility = ["//mc_manager/api/migrations:__subpackages__"], ) diff --git a/mc_manager/worker/BUILD.bazel b/mc_manager/worker/BUILD.bazel index fe023775..75b7e2d7 100644 --- a/mc_manager/worker/BUILD.bazel +++ b/mc_manager/worker/BUILD.bazel @@ -44,6 +44,7 @@ py_oci_image( "HOST_PATH": "/var/minecraft", "S3_BUCKET": "", }, + tags = ["manual"], ) # $ bazel run //mc_manager/worker:image_tarball @@ -53,5 +54,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/mc-manager-worker:latest"], repository = "docker.io/shaldengeki/mc-manager-worker", + tags = ["manual"], visibility = ["//mc_manager/worker:__subpackages__"], ) diff --git a/proto_registry/api/migrations/BUILD.bazel b/proto_registry/api/migrations/BUILD.bazel index 4089a1bd..6a07cfc4 100644 --- a/proto_registry/api/migrations/BUILD.bazel +++ b/proto_registry/api/migrations/BUILD.bazel @@ -49,6 +49,7 @@ py_oci_image( "DATABASE_NAME": "api_development", "FLASK_SECRET_KEY": "testing", }, + tags = ["manual"], ) # $ bazel run //proto_registry/api/migrations:image_tarball @@ -58,5 +59,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/proto-registry-api-migrations:latest"], repository = "docker.io/shaldengeki/proto-registry-api-migrations", + tags = ["manual"], visibility = ["//proto_registry/api/migrations:__subpackages__"], ) From 6d5694ce8913aeed1cfdb8aed1cbdf0a1bf02cae Mon Sep 17 00:00:00 2001 From: Charles Guo Date: Mon, 15 Jul 2024 17:34:47 -0400 Subject: [PATCH 4/5] Remove manual tag from cross_platform_image --- ark_nova_stats/api/migrations/BUILD.bazel | 1 - fitbit_challenges/api/migrations/BUILD.bazel | 1 - fitbit_challenges/worker/BUILD.bazel | 1 - home_api/api/migrations/BUILD.bazel | 1 - mc_manager/api/migrations/BUILD.bazel | 1 - mc_manager/worker/BUILD.bazel | 1 - proto_registry/api/migrations/BUILD.bazel | 1 - 7 files changed, 7 deletions(-) diff --git a/ark_nova_stats/api/migrations/BUILD.bazel b/ark_nova_stats/api/migrations/BUILD.bazel index 5e481328..57b58451 100644 --- a/ark_nova_stats/api/migrations/BUILD.bazel +++ b/ark_nova_stats/api/migrations/BUILD.bazel @@ -63,7 +63,6 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/ark-nova-stats-api-migrations:latest"], repository = "docker.io/shaldengeki/ark-nova-stats-api-migrations", - tags = ["manual"], visibility = ["//ark_nova_stats/api/migrations:__subpackages__"], ) diff --git a/fitbit_challenges/api/migrations/BUILD.bazel b/fitbit_challenges/api/migrations/BUILD.bazel index 89369b31..e4fb47b4 100644 --- a/fitbit_challenges/api/migrations/BUILD.bazel +++ b/fitbit_challenges/api/migrations/BUILD.bazel @@ -62,6 +62,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/fitbit-challenges-migrations:latest"], repository = "docker.io/shaldengeki/fitbit-challenges-migrations", - tags = ["manual"], visibility = ["//fitbit_challenges/api/migrations:__subpackages__"], ) diff --git a/fitbit_challenges/worker/BUILD.bazel b/fitbit_challenges/worker/BUILD.bazel index eb96ab02..c87cea5e 100644 --- a/fitbit_challenges/worker/BUILD.bazel +++ b/fitbit_challenges/worker/BUILD.bazel @@ -56,6 +56,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/fitbit-challenges-worker:latest"], repository = "docker.io/shaldengeki/fitbit-challenges-worker", - tags = ["manual"], visibility = ["//fitbit_challenges/worker:__subpackages__"], ) diff --git a/home_api/api/migrations/BUILD.bazel b/home_api/api/migrations/BUILD.bazel index 20a2c13f..ca592525 100644 --- a/home_api/api/migrations/BUILD.bazel +++ b/home_api/api/migrations/BUILD.bazel @@ -60,6 +60,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/home-api-api-migrations:latest"], repository = "docker.io/shaldengeki/home-api-api-migrations", - tags = ["manual"], visibility = ["//home_api/api/migrations:__subpackages__"], ) diff --git a/mc_manager/api/migrations/BUILD.bazel b/mc_manager/api/migrations/BUILD.bazel index 7338e9a4..9022d36a 100644 --- a/mc_manager/api/migrations/BUILD.bazel +++ b/mc_manager/api/migrations/BUILD.bazel @@ -59,6 +59,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/mc-manager-api-migrations:latest"], repository = "docker.io/shaldengeki/mc-manager-api-migrations", - tags = ["manual"], visibility = ["//mc_manager/api/migrations:__subpackages__"], ) diff --git a/mc_manager/worker/BUILD.bazel b/mc_manager/worker/BUILD.bazel index 75b7e2d7..b3d958e8 100644 --- a/mc_manager/worker/BUILD.bazel +++ b/mc_manager/worker/BUILD.bazel @@ -54,6 +54,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/mc-manager-worker:latest"], repository = "docker.io/shaldengeki/mc-manager-worker", - tags = ["manual"], visibility = ["//mc_manager/worker:__subpackages__"], ) diff --git a/proto_registry/api/migrations/BUILD.bazel b/proto_registry/api/migrations/BUILD.bazel index 6a07cfc4..b3932e78 100644 --- a/proto_registry/api/migrations/BUILD.bazel +++ b/proto_registry/api/migrations/BUILD.bazel @@ -59,6 +59,5 @@ cross_platform_image( image = ":base_image", repo_tags = ["shaldengeki/proto-registry-api-migrations:latest"], repository = "docker.io/shaldengeki/proto-registry-api-migrations", - tags = ["manual"], visibility = ["//proto_registry/api/migrations:__subpackages__"], ) From 7065b18b131bbfaffaf2072e5bd462e0df104c28 Mon Sep 17 00:00:00 2001 From: Charles Guo Date: Mon, 15 Jul 2024 17:47:02 -0400 Subject: [PATCH 5/5] Pass manual tag to two more --- tools/build_rules/api_image.bzl | 1 + tools/build_rules/cross_platform_image.bzl | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/build_rules/api_image.bzl b/tools/build_rules/api_image.bzl index 1525ce99..9a8b5637 100644 --- a/tools/build_rules/api_image.bzl +++ b/tools/build_rules/api_image.bzl @@ -53,6 +53,7 @@ def api_image( deps = deps + [ "@rules_python//python/runfiles", ], + tags = ["manual"], ) if env == None: diff --git a/tools/build_rules/cross_platform_image.bzl b/tools/build_rules/cross_platform_image.bzl index d0feb55e..c77333a6 100644 --- a/tools/build_rules/cross_platform_image.bzl +++ b/tools/build_rules/cross_platform_image.bzl @@ -35,6 +35,7 @@ def cross_platform_image( "@platforms//cpu:arm64": "//tools/build_rules:aarch64_linux", "@platforms//cpu:x86_64": "//tools/build_rules:x86_64_linux", }), + tags = ["manual"], visibility = visibility, )