Skip to content

Commit

Permalink
add patch for metric collection (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoning777 authored May 14, 2019
1 parent c3235d7 commit 13d506c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions component_sdk/python/patches/http.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- http.py 2019-05-03 15:07:52.591411824 -0700
+++ http_new.py 2019-05-03 15:09:23.470304022 -0700
@@ -1784,4 +1784,4 @@
http_timeout = socket.getdefaulttimeout()
else:
http_timeout = DEFAULT_HTTP_TIMEOUT_SEC
- return httplib2.Http(timeout=http_timeout)
+ return set_user_agent(httplib2.Http(timeout=http_timeout), '-kfpipeline-')
4 changes: 3 additions & 1 deletion components/gcp/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
FROM python:2.7-slim-jessie

RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
wget patch \
&& rm -rf /var/lib/apt/lists/*

RUN pip2 install apache-beam[gcp]==2.10.0
Expand All @@ -27,4 +27,6 @@ RUN pip install .
RUN mkdir /usr/licenses && \
/ml/license.sh /ml/third_party_licenses.csv /usr/licenses

RUN patch /usr/local/lib/python2.7/site-packages/googleapiclient/http.py < /ml/patches/http.patch

ENTRYPOINT ["python", "-u", "-m", "kfp_component.launcher"]

0 comments on commit 13d506c

Please sign in to comment.