Skip to content

Commit e433f25

Browse files
committed
Add ALLOW_BROKEN_CONDITIONALS variable before calling ansible-playbook.
1 parent caa809f commit e433f25

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

.github/workflows/_build_torch_xla.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
- name: Build
5959
if: inputs.has_code_changes == 'true'
6060
shell: bash
61+
env:
62+
- ALLOW_BROKEN_CONDITIONALS: 1
6163
run: |
6264
cd pytorch/xla/infra/ansible
6365
ansible-playbook playbook.yaml -vvv -e "stage=build arch=amd64 accelerator=tpu src_root=${GITHUB_WORKSPACE} bundle_libtpu=0 build_cpp_tests=1 git_versioned_xla_build=1 cache_suffix=-ci" --skip-tags=fetch_srcs,install_deps

infra/ansible/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ WORKDIR /ansible
77
RUN pip install ansible
88
COPY . /ansible
99

10+
ENV ALLOW_BROKEN_CONDITIONALS "1"
11+
1012
ARG ansible_vars
1113
# HACK: install build dependencies only, but skip build step
1214
RUN ansible-playbook -vvv playbook.yaml -e "stage=build" -e "${ansible_vars}" --tags "bazel,configure_env,install_deps"

infra/ansible/development.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ RUN pip install ansible
1111
COPY . /ansible
1212
WORKDIR /ansible
1313

14-
# List Asnible tasks to apply for the dev image.
14+
# Ansible 2.19 requires this environment variable being set, so that we can use
15+
# string variables as boolean.
16+
ENV ALLOW_BROKEN_CONDITIONALS "1"
17+
# List Ansible tasks to apply for the dev image.
1518
ENV TAGS="bazel,configure_env,install_deps"
1619

1720
ARG ansible_vars

infra/ansible/e2e_tests.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ WORKDIR /ansible
77
RUN pip install ansible
88
COPY . /ansible
99

10+
# Ansible 2.19 requires this environment variable being set, so that we can use
11+
# string variables as boolean.
12+
ENV ALLOW_BROKEN_CONDITIONALS "1"
13+
1014
# Build PyTorch and PyTorch/XLA wheels.
1115
ARG ansible_vars
1216
RUN ansible-playbook -vvv playbook.yaml -e "stage=build" -e "${ansible_vars}"

infra/ansible/ptxla_docker_for_torchprime.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ WORKDIR /ansible
4444
RUN pip install ansible
4545
COPY --from=ansible . /ansible
4646

47+
# Ansible 2.19 requires this environment variable being set, so that we can use
48+
# string variables as boolean.
49+
ENV ALLOW_BROKEN_CONDITIONALS "1"
50+
4751
ARG ansible_vars
4852
RUN ansible-playbook -vvv playbook.yaml -e "stage=release" -e "${ansible_vars}" --tags "install_deps"
4953

0 commit comments

Comments
 (0)