Skip to content

Conversation

@piyush-zlai
Copy link
Contributor

@piyush-zlai piyush-zlai commented May 27, 2025

Summary

While exploring setting up a GitHub action to publish our images to docker's registry and working through some auth issues, I noticed that the openjdk images are on the train to retirement (docker-library/openjdk#505 - seems definitely the case for 8 and 11, and the suggestion seems to be to switch to temurin in general). I have swapped us out to Amazon's corretto images as corretto is a fairly commonly used openjdk implementation and the images are available from Amazon's public ECR registries.

I was able to confirm I can build and publish using these images via GH actions (PR on platform incoming) and also test locally by pulling the image and starting up the containers:

$ docker pull ziplineai/chronon-fetcher:latest
$ docker run -v ~/.config/gcloud/application_default_credentials.json:/gcp/credentials.json \
 -p 9000:9000 \
 -e "GCP_PROJECT_ID=canary-443022" \
 -e "GOOGLE_CLOUD_PROJECT=canary-443022" \
 -e "GCP_BIGTABLE_INSTANCE_ID=zipline-canary-instance" \
 -e GOOGLE_APPLICATION_CREDENTIALS=/gcp/credentials.json \
 ziplineai/chronon-fetcher

Checklist

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested
  • Documentation update

Summary by CodeRabbit

  • Chores
    • Updated the Docker image to use a lighter, Alpine-based OpenJDK 17 (Amazon Corretto) base.
    • Adjusted installed packages to Alpine equivalents and added Bash.
    • Removed Scala installation from the image.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 27, 2025

Walkthrough

The Dockerfile for the fetcher service was updated to use an Alpine-based Amazon Corretto OpenJDK 17 image instead of Debian-based OpenJDK. Package installation commands were switched from apt-get to apk, Alpine package names were used, and Scala installation was removed. Other configurations remain unchanged.

Changes

File(s) Change Summary
docker/fetcher/Dockerfile Switched base image to Alpine-based Amazon Corretto, replaced apt-get with apk, removed Scala.

Possibly related PRs

Suggested reviewers

  • david-zlai

Poem

Swapped Debian for Alpine, so light and so lean,
Corretto now rules where OpenJDK had been.
Scala waved goodbye, with a bashful little grin,
Packages installed anew, let the fetcher begin!
🐳✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docker/fetcher/Dockerfile (1)

14-23: Alpine package installation: Migration to apk is correct. Consider slimming the image by removing unneeded tools (vim, bash) and dev deps. Confirm if Python libs and Bash are required at runtime.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b4726e and f63602a.

📒 Files selected for processing (1)
  • docker/fetcher/Dockerfile (2 hunks)
🔇 Additional comments (1)
docker/fetcher/Dockerfile (1)

2-2: Update base image to Amazon Corretto Alpine: Solid upgrade to a maintained OpenJDK variant.

@piyush-zlai piyush-zlai requested a review from chewy-zlai May 27, 2025 17:40
Copy link
Collaborator

@chewy-zlai chewy-zlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@piyush-zlai piyush-zlai merged commit baee2e7 into main May 27, 2025
4 checks passed
@piyush-zlai piyush-zlai deleted the piyush/update_fetcher_docker branch May 27, 2025 18:15
@piyush-zlai piyush-zlai mentioned this pull request May 28, 2025
4 tasks
piyush-zlai added a commit that referenced this pull request May 28, 2025
## Summary
Add support in the fetcher docker container to publish profiles to
Google Cloud Profiler. Largely based on the [docs
here](https://cloud.google.com/profiler/docs/profiling-java)

We bake in the gcloud profiler so file in our docker image and if users
opt-in via the env var (`ENABLE_GCLOUD_PROFILER`) we include in the JVM
startup options.

According to the [Google
docs](https://cloud.google.com/profiler/docs/concepts-profiling), the
overhead is low enough to keep running continuously in prod so we can
start with an explicit enable / disable and fine-tune if needed.
 
Had to test this out on a Gcloud VM and while doing so I noticed that my
prior change to switch to Corretto
(#808) doesn't work on Intel /
AMD machines due to something messed up in the netty native lib so
files. I switched back to a Debian based openjdk implementation and that
seems to get things working.

Profiles can be viewed on our canary -
[Link](https://console.cloud.google.com/profiler;timespan=30m/chronon-fetcher;type=HEAP/inuse_space?inv=1&invt=AbyoEQ&project=canary-443022).
They don't show anything super useful atm as I'm not running traffic
thro' the system but we can see things are working..

![Screenshot 2025-05-28 at 3 49
11 PM](https://github.com/user-attachments/assets/caebb09d-b274-434f-a79c-4fcee895c2fb)


## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated the Docker image to use a Debian-based Java runtime for
improved native library compatibility.
- Adjusted package installation commands to use Debian's package
manager.
	- Integrated Google Cloud Profiler Java agent into the container setup.
- Modified startup script to support enabling the profiler via an
environment variable and streamlined JVM options handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants