Skip to content

Commit

Permalink
Fix provisioner deployment (#291)
Browse files Browse the repository at this point in the history
* Upgrade Python deps

* fix stdin problem

* fix occupancy test by enabling asyncio-mode=auto
  • Loading branch information
mvgijssel authored May 26, 2023
1 parent 0aaeb2e commit 3bb30af
Show file tree
Hide file tree
Showing 7 changed files with 568 additions and 423 deletions.
7 changes: 5 additions & 2 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,12 @@ load("@io_buildbuddy_buildbuddy_toolchain//:deps.bzl", "buildbuddy_deps")

buildbuddy_deps()

load("@io_buildbuddy_buildbuddy_toolchain//:rules.bzl", "buildbuddy")
load("@io_buildbuddy_buildbuddy_toolchain//:rules.bzl", "UBUNTU20_04_IMAGE", "buildbuddy")

buildbuddy(name = "buildbuddy_toolchain")
buildbuddy(
name = "buildbuddy_toolchain",
container_image = UBUNTU20_04_IMAGE,
)

# ------------------------------------ teleport client ------------------------------------ #

Expand Down
1 change: 1 addition & 0 deletions occupancy_component/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ py_pytest_test(
"tests/conftest.py",
"tests/test_init.py",
],
args = ["--asyncio-mode=auto"],
imports = ["."],
deps = [
":lib",
Expand Down
5 changes: 4 additions & 1 deletion provisioner/connectors/teleport.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def _put_file(host, state, filename_or_io, temp_file):
teleport_client = host.connector_data["teleport_client"]

with get_file_io(filename_or_io) as file_io:
stdin = file_io.read().decode("utf-8")
stdin = file_io.read()

if isinstance(stdin, bytes):
stdin = stdin.decode("utf-8")

teleport_command = teleport_client.ssh(
command=f"'cat > {temp_file}'"
Expand Down
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
black==23.3.0;
pytest==7.1.2;
pytest==7.3.1;
pytest-cov==3.0.0;
pytest-testinfra==8.1.0;
PyYAML==6.0;
pulumi==3.68.0;
pulumi-command==0.7.2;
pulumi-kubernetes==3.28.1;
pytest-homeassistant-custom-component==0.11.20;
pytest-homeassistant-custom-component==0.13.31;
tzdata==2023.3;
pyinfra==2.7
sqlalchemy==1.4.48;
Expand Down
954 changes: 548 additions & 406 deletions requirements.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rules/rules_task/requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Jinja2==3.1.2;
bazel-runfiles==0.21.0;
pytest==7.1.2;
pytest==7.3.1;
pytest-cov==3.0.0;
black==23.3.0;
deepdiff==6.3.0;
Expand Down
18 changes: 7 additions & 11 deletions rules/rules_task/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#
# pip-compile --allow-unsafe --generate-hashes requirements.in
#
attrs==23.1.0 \
--hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \
--hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015
# via pytest
bazel-runfiles==0.21.0 \
--hash=sha256:3e430dd9a5aba90a90bc2493fdcfce02a3ece47fb574db0f4ac898261e6b068d
# via -r requirements.in
Expand Down Expand Up @@ -105,6 +101,10 @@ deepdiff==6.3.0 \
--hash=sha256:15838bd1cbd046ce15ed0c41e837cd04aff6b3e169c5e06fca69d7aa11615ceb \
--hash=sha256:6a3bf1e7228ac5c71ca2ec43505ca0a743ff54ec77aa08d7db22de6bc7b2b644
# via -r requirements.in
exceptiongroup==1.1.1 \
--hash=sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e \
--hash=sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785
# via pytest
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
Expand Down Expand Up @@ -196,17 +196,13 @@ pluggy==1.0.0 \
--hash=sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159 \
--hash=sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3
# via pytest
py==1.11.0 \
--hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \
--hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378
# via pytest
pyproject-hooks==1.0.0 \
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \
--hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
# via build
pytest==7.1.2 \
--hash=sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c \
--hash=sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45
pytest==7.3.1 \
--hash=sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362 \
--hash=sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3
# via
# -r requirements.in
# pytest-cov
Expand Down

0 comments on commit 3bb30af

Please sign in to comment.