Skip to content

Commit

Permalink
dataflow: workaround for beam base image bug (GoogleCloudPlatform#4899)
Browse files Browse the repository at this point in the history
* dataflow: install libffi-dev explicitly

* Mention region explicitly in cleanup

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
  • Loading branch information
davidcavazos and leahecole committed Oct 26, 2020
1 parent d638940 commit 872ded2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dataflow/flex-templates/streaming_beam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ ARG WORKDIR=/dataflow/template
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}

# Due to a change in the Beam base image in version 2.24, we need to install
# libffi-dev manually as a dependency. For more information:
# https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4891
RUN apt-get update && apt-get install -y libffi-dev && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
COPY streaming_beam.py .

Expand Down
3 changes: 2 additions & 1 deletion dataflow/flex-templates/streaming_beam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ The following sections describe how to delete or turn off these resources.
gcloud dataflow jobs list \
--filter 'NAME:streaming-beam AND STATE=Running' \
--format 'value(JOB_ID)' \
| xargs gcloud dataflow jobs cancel
--region "$REGION" \
| xargs gcloud dataflow jobs cancel --region "$REGION"
```

1. Delete the template spec file from Cloud Storage.
Expand Down

0 comments on commit 872ded2

Please sign in to comment.