Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add patch for metric collection #1317

Merged
merged 1 commit into from
May 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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
@@ -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"]