From 79a448c504a7b3f09f1ec262970998197cbc4607 Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 10:12:06 -0500 Subject: [PATCH 1/8] Adding python example --- python/BUILD | 0 python/main.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 python/BUILD create mode 100644 python/main.py diff --git a/python/BUILD b/python/BUILD new file mode 100644 index 00000000..e69de29b diff --git a/python/main.py b/python/main.py new file mode 100644 index 00000000..e69de29b From 12c2b75d0c5351042896aced6755698769f33373 Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 10:14:30 -0500 Subject: [PATCH 2/8] Workspace file definitions --- WORKSPACE | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 4224bced..92533cf5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -237,3 +237,10 @@ load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "dotnet_register_toolchains", "d dotnet_register_toolchains() dotnet_repositories_nugets() + +http_archive( + name = "rules_python", + sha256 = "bc4e59e17c7809a5b373ba359e2c974ed2386c58634819ac5a89c0813c15705c", + strip_prefix = "rules_python-0.15.1", + url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.15.1.tar.gz", +) \ No newline at end of file From 6515d17c3cee25d0fd11565099812b9b26a0c9b6 Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 13:54:12 -0500 Subject: [PATCH 3/8] Fixing files that were incorrectly uploaded empty --- .bazelrc | 16 +++++++ .bazelversion | 2 +- .ijwb/.bazelproject | 4 ++ .ijwb/.blaze/modules/.project-data-dir.iml | 12 +++++ .ijwb/.blaze/modules/.workspace.iml | 17 +++++++ .ijwb/.idea/.gitignore | 3 ++ .ijwb/.idea/.name | 1 + .ijwb/.idea/misc.xml | 7 +++ .ijwb/.idea/modules.xml | 10 ++++ .ijwb/.idea/runConfigurations.xml | 56 ++++++++++++++++++++++ .ijwb/.idea/vcs.xml | 7 +++ python/BUILD | 7 +++ python/main.py | 4 ++ 13 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 .ijwb/.bazelproject create mode 100644 .ijwb/.blaze/modules/.project-data-dir.iml create mode 100644 .ijwb/.blaze/modules/.workspace.iml create mode 100644 .ijwb/.idea/.gitignore create mode 100644 .ijwb/.idea/.name create mode 100644 .ijwb/.idea/misc.xml create mode 100644 .ijwb/.idea/modules.xml create mode 100644 .ijwb/.idea/runConfigurations.xml create mode 100644 .ijwb/.idea/vcs.xml diff --git a/.bazelrc b/.bazelrc index 558b781e..34d1f42b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -44,3 +44,19 @@ build:engflow_oss --remote_executor=grpcs://oss-cluster.engflow.com build:engflow_oss --bes_backend=grpcs://oss-cluster.engflow.com build:engflow_oss --bes_lifecycle_events build:engflow_oss --bes_results_url=https://oss-cluster.engflow.com/invocation/ + +build:canary --config=engflow_common +build:canary --remote_executor=grpcs://eu-central-1.aws.canary.cluster.engflow.com +build:canary --bes_backend=grpcs://eu-central-1.aws.canary.cluster.engflow.com +build:canary --bes_lifecycle_events +build:canary --bes_results_url=https://eu-central-1.aws.canary.cluster.engflow.com/invocation +build:canary --tls_client_certificate=/home/andres/sources/canary.crt +build:canary --tls_client_key=/home/andres/sources/canary.key + +build:glass --config=engflow_common +build:glass --remote_executor=grpcs://glass.cluster.engflow.com +build:glass --bes_backend=grpcs://glass.cluster.engflow.com +build:glass --bes_lifecycle_events +build:glass --bes_results_url=https://glass.cluster.engflow.com/invocation +build:glass --tls_client_certificate=/home/andres/sources/glass.crt +build:glass --tls_client_key=/home/andres/sources/glass.key \ No newline at end of file diff --git a/.bazelversion b/.bazelversion index 91ff5727..03f488b0 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.2.0 +5.3.0 diff --git a/.ijwb/.bazelproject b/.ijwb/.bazelproject new file mode 100644 index 00000000..164901c7 --- /dev/null +++ b/.ijwb/.bazelproject @@ -0,0 +1,4 @@ +directories: + . + +derive_targets_from_directories: false \ No newline at end of file diff --git a/.ijwb/.blaze/modules/.project-data-dir.iml b/.ijwb/.blaze/modules/.project-data-dir.iml new file mode 100644 index 00000000..24fe7b32 --- /dev/null +++ b/.ijwb/.blaze/modules/.project-data-dir.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.ijwb/.blaze/modules/.workspace.iml b/.ijwb/.blaze/modules/.workspace.iml new file mode 100644 index 00000000..15e51929 --- /dev/null +++ b/.ijwb/.blaze/modules/.workspace.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.ijwb/.idea/.gitignore b/.ijwb/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.ijwb/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.ijwb/.idea/.name b/.ijwb/.idea/.name new file mode 100644 index 00000000..96236f81 --- /dev/null +++ b/.ijwb/.idea/.name @@ -0,0 +1 @@ +example \ No newline at end of file diff --git a/.ijwb/.idea/misc.xml b/.ijwb/.idea/misc.xml new file mode 100644 index 00000000..3d7fadd9 --- /dev/null +++ b/.ijwb/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.ijwb/.idea/modules.xml b/.ijwb/.idea/modules.xml new file mode 100644 index 00000000..4f3468e0 --- /dev/null +++ b/.ijwb/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.ijwb/.idea/runConfigurations.xml b/.ijwb/.idea/runConfigurations.xml new file mode 100644 index 00000000..8c7072b3 --- /dev/null +++ b/.ijwb/.idea/runConfigurations.xml @@ -0,0 +1,56 @@ + + + + + + \ No newline at end of file diff --git a/.ijwb/.idea/vcs.xml b/.ijwb/.idea/vcs.xml new file mode 100644 index 00000000..62bd7a01 --- /dev/null +++ b/.ijwb/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/python/BUILD b/python/BUILD index e69de29b..3d0394cf 100644 --- a/python/BUILD +++ b/python/BUILD @@ -0,0 +1,7 @@ +load("@rules_python//python:defs.bzl", "py_binary") + +py_binary( + name = "python", + main = "main.py", + srcs = ["main.py"], +) \ No newline at end of file diff --git a/python/main.py b/python/main.py index e69de29b..3ff6a7c1 100644 --- a/python/main.py +++ b/python/main.py @@ -0,0 +1,4 @@ +def main(): + print("Hello world!") + +main() \ No newline at end of file From 9392ce093bd4f155e1c831192d51ac98bfcc7596 Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 14:10:03 -0500 Subject: [PATCH 4/8] Revert "Workspace file definitions" This reverts commit 12c2b75d0c5351042896aced6755698769f33373. --- WORKSPACE | 7 ------- 1 file changed, 7 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 92533cf5..4224bced 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -237,10 +237,3 @@ load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "dotnet_register_toolchains", "d dotnet_register_toolchains() dotnet_repositories_nugets() - -http_archive( - name = "rules_python", - sha256 = "bc4e59e17c7809a5b373ba359e2c974ed2386c58634819ac5a89c0813c15705c", - strip_prefix = "rules_python-0.15.1", - url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.15.1.tar.gz", -) \ No newline at end of file From 9e2d06ccb37e197ffd248045f43ad972bff779b1 Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 14:11:25 -0500 Subject: [PATCH 5/8] Revert "Fixing files that were incorrectly uploaded empty" This reverts commit 6515d17c3cee25d0fd11565099812b9b26a0c9b6. --- .bazelrc | 16 ------- .bazelversion | 2 +- .ijwb/.bazelproject | 4 -- .ijwb/.blaze/modules/.project-data-dir.iml | 12 ----- .ijwb/.blaze/modules/.workspace.iml | 17 ------- .ijwb/.idea/.gitignore | 3 -- .ijwb/.idea/.name | 1 - .ijwb/.idea/misc.xml | 7 --- .ijwb/.idea/modules.xml | 10 ---- .ijwb/.idea/runConfigurations.xml | 56 ---------------------- .ijwb/.idea/vcs.xml | 7 --- python/BUILD | 7 --- python/main.py | 4 -- 13 files changed, 1 insertion(+), 145 deletions(-) delete mode 100644 .ijwb/.bazelproject delete mode 100644 .ijwb/.blaze/modules/.project-data-dir.iml delete mode 100644 .ijwb/.blaze/modules/.workspace.iml delete mode 100644 .ijwb/.idea/.gitignore delete mode 100644 .ijwb/.idea/.name delete mode 100644 .ijwb/.idea/misc.xml delete mode 100644 .ijwb/.idea/modules.xml delete mode 100644 .ijwb/.idea/runConfigurations.xml delete mode 100644 .ijwb/.idea/vcs.xml diff --git a/.bazelrc b/.bazelrc index 34d1f42b..558b781e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -44,19 +44,3 @@ build:engflow_oss --remote_executor=grpcs://oss-cluster.engflow.com build:engflow_oss --bes_backend=grpcs://oss-cluster.engflow.com build:engflow_oss --bes_lifecycle_events build:engflow_oss --bes_results_url=https://oss-cluster.engflow.com/invocation/ - -build:canary --config=engflow_common -build:canary --remote_executor=grpcs://eu-central-1.aws.canary.cluster.engflow.com -build:canary --bes_backend=grpcs://eu-central-1.aws.canary.cluster.engflow.com -build:canary --bes_lifecycle_events -build:canary --bes_results_url=https://eu-central-1.aws.canary.cluster.engflow.com/invocation -build:canary --tls_client_certificate=/home/andres/sources/canary.crt -build:canary --tls_client_key=/home/andres/sources/canary.key - -build:glass --config=engflow_common -build:glass --remote_executor=grpcs://glass.cluster.engflow.com -build:glass --bes_backend=grpcs://glass.cluster.engflow.com -build:glass --bes_lifecycle_events -build:glass --bes_results_url=https://glass.cluster.engflow.com/invocation -build:glass --tls_client_certificate=/home/andres/sources/glass.crt -build:glass --tls_client_key=/home/andres/sources/glass.key \ No newline at end of file diff --git a/.bazelversion b/.bazelversion index 03f488b0..91ff5727 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.3.0 +5.2.0 diff --git a/.ijwb/.bazelproject b/.ijwb/.bazelproject deleted file mode 100644 index 164901c7..00000000 --- a/.ijwb/.bazelproject +++ /dev/null @@ -1,4 +0,0 @@ -directories: - . - -derive_targets_from_directories: false \ No newline at end of file diff --git a/.ijwb/.blaze/modules/.project-data-dir.iml b/.ijwb/.blaze/modules/.project-data-dir.iml deleted file mode 100644 index 24fe7b32..00000000 --- a/.ijwb/.blaze/modules/.project-data-dir.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.ijwb/.blaze/modules/.workspace.iml b/.ijwb/.blaze/modules/.workspace.iml deleted file mode 100644 index 15e51929..00000000 --- a/.ijwb/.blaze/modules/.workspace.iml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.ijwb/.idea/.gitignore b/.ijwb/.idea/.gitignore deleted file mode 100644 index 26d33521..00000000 --- a/.ijwb/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.ijwb/.idea/.name b/.ijwb/.idea/.name deleted file mode 100644 index 96236f81..00000000 --- a/.ijwb/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -example \ No newline at end of file diff --git a/.ijwb/.idea/misc.xml b/.ijwb/.idea/misc.xml deleted file mode 100644 index 3d7fadd9..00000000 --- a/.ijwb/.idea/misc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.ijwb/.idea/modules.xml b/.ijwb/.idea/modules.xml deleted file mode 100644 index 4f3468e0..00000000 --- a/.ijwb/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.ijwb/.idea/runConfigurations.xml b/.ijwb/.idea/runConfigurations.xml deleted file mode 100644 index 8c7072b3..00000000 --- a/.ijwb/.idea/runConfigurations.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.ijwb/.idea/vcs.xml b/.ijwb/.idea/vcs.xml deleted file mode 100644 index 62bd7a01..00000000 --- a/.ijwb/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/python/BUILD b/python/BUILD index 3d0394cf..e69de29b 100644 --- a/python/BUILD +++ b/python/BUILD @@ -1,7 +0,0 @@ -load("@rules_python//python:defs.bzl", "py_binary") - -py_binary( - name = "python", - main = "main.py", - srcs = ["main.py"], -) \ No newline at end of file diff --git a/python/main.py b/python/main.py index 3ff6a7c1..e69de29b 100644 --- a/python/main.py +++ b/python/main.py @@ -1,4 +0,0 @@ -def main(): - print("Hello world!") - -main() \ No newline at end of file From fe3aed5a05d893ec3c6de212671cb6df2bff57ee Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 14:15:52 -0500 Subject: [PATCH 6/8] Actually fixing files that were incorrectly uploaded empty --- WORKSPACE | 7 +++++++ python/BUILD | 7 +++++++ python/main.py | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 4224bced..92533cf5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -237,3 +237,10 @@ load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "dotnet_register_toolchains", "d dotnet_register_toolchains() dotnet_repositories_nugets() + +http_archive( + name = "rules_python", + sha256 = "bc4e59e17c7809a5b373ba359e2c974ed2386c58634819ac5a89c0813c15705c", + strip_prefix = "rules_python-0.15.1", + url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.15.1.tar.gz", +) \ No newline at end of file diff --git a/python/BUILD b/python/BUILD index e69de29b..3d0394cf 100644 --- a/python/BUILD +++ b/python/BUILD @@ -0,0 +1,7 @@ +load("@rules_python//python:defs.bzl", "py_binary") + +py_binary( + name = "python", + main = "main.py", + srcs = ["main.py"], +) \ No newline at end of file diff --git a/python/main.py b/python/main.py index e69de29b..3ff6a7c1 100644 --- a/python/main.py +++ b/python/main.py @@ -0,0 +1,4 @@ +def main(): + print("Hello world!") + +main() \ No newline at end of file From c960be185946bb20aee1828a7fbf57806f92428c Mon Sep 17 00:00:00 2001 From: Andres Rueda Date: Tue, 6 Dec 2022 14:37:14 -0500 Subject: [PATCH 7/8] Adding python directory to the CI workflow build --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30233bbc..bae532cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,3 +51,6 @@ jobs: - name: Building //csharp directory run: bazel build //csharp/... + + - name: Building //python directory + run: bazel build //python/... From 9057e0602f8e4b63beb252cb43efbbc9238f5780 Mon Sep 17 00:00:00 2001 From: afrueda97 <119602854+afrueda97@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:43:28 -0500 Subject: [PATCH 8/8] Adding main name idiom suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrés Felipe Barco Santa --- python/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/main.py b/python/main.py index 3ff6a7c1..b41d0fe4 100644 --- a/python/main.py +++ b/python/main.py @@ -1,4 +1,6 @@ def main(): print("Hello world!") + -main() \ No newline at end of file +if __name__ == "__main__": + main()