Skip to content

Commit

Permalink
* log-exporter: change gsutil to "gcloud storage"
Browse files Browse the repository at this point in the history
Signed-off-by: neo <[email protected]>
  • Loading branch information
neowu committed Dec 7, 2024
1 parent 44b8105 commit 5fcc52d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### 9.1.5 (11/11/2024 - )

* log-exporter: change gsutil to "gcloud storage"

> gsutil is deprecated and requires old version of python
### 9.1.4 (10/22/2024 - 11/08/2024)

* http_server: always write multipart uploading for temp file
Expand Down
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

* track okHTTP fixed pin issue with virtual threads (looks like needs to wait until 5.0.0 released)
https://github.com/square/okhttp/issues/8284
* switch httpclient to jdk built in after jdk 24?, then send goaway frame in ShutdownHandler
https://bugs.openjdk.org/browse/JDK-8335181

* log diagram, fix d3 tooltip (generate separated json, and make d3 tooltip show other non-HTML info)
* change kafka compression to zstd? as it is production ready and widely used
2 changes: 1 addition & 1 deletion ext/log-exporter/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apk add --no-cache python3 curl
# gcloud iam requires user home, so must not put --no-create-home
RUN addgroup --gid 1000 --system app && adduser --system --ingroup app --uid 1000 app
RUN curl -SL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz | tar xzf - -C /opt \
&& ln -s /opt/google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil \
&& ln -s /opt/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud \
&& mkdir -p /var/log/app && chown -R app.app /var/log/app
VOLUME /var/log/app
USER 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public UploadService(String bucket) {
public void upload(Path file, String remotePath) {
// requires '-q', otherwise standard output may block if buffer is full, Shell reads std after process ends
// and '-m' may stress network bandwidth, currently not really necessary
shell.execute("gsutil", "-q", "cp", file.toString(), bucket + remotePath);
shell.execute("gcloud", "storage", "--quiet", "cp", file.toString(), bucket + remotePath);
}
}

0 comments on commit 5fcc52d

Please sign in to comment.