Skip to content

Commit 872ded2

Browse files
David Cavazosleahecole
andauthored
dataflow: workaround for beam base image bug (GoogleCloudPlatform#4899)
* dataflow: install libffi-dev explicitly * Mention region explicitly in cleanup Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
1 parent d638940 commit 872ded2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dataflow/flex-templates/streaming_beam/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ ARG WORKDIR=/dataflow/template
1818
RUN mkdir -p ${WORKDIR}
1919
WORKDIR ${WORKDIR}
2020

21+
# Due to a change in the Beam base image in version 2.24, we need to install
22+
# libffi-dev manually as a dependency. For more information:
23+
# https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4891
24+
RUN apt-get update && apt-get install -y libffi-dev && rm -rf /var/lib/apt/lists/*
25+
2126
COPY requirements.txt .
2227
COPY streaming_beam.py .
2328

dataflow/flex-templates/streaming_beam/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ The following sections describe how to delete or turn off these resources.
224224
gcloud dataflow jobs list \
225225
--filter 'NAME:streaming-beam AND STATE=Running' \
226226
--format 'value(JOB_ID)' \
227-
| xargs gcloud dataflow jobs cancel
227+
--region "$REGION" \
228+
| xargs gcloud dataflow jobs cancel --region "$REGION"
228229
```
229230

230231
1. Delete the template spec file from Cloud Storage.

0 commit comments

Comments
 (0)