Circleci project setup -testing#121
Conversation
Summary of ChangesHello @dhairs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new CircleCI configuration file ( Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a CircleCI configuration to automate the build and test process. The setup is comprehensive, covering Bazel builds, caching, unit tests, and integration tests with Docker services. However, there are a few critical issues that need to be addressed. There are several instances of a typo ('telemtry' instead of 'telemetry') that will cause the pipeline to fail. Additionally, there's a security concern with writing secrets to a file, and a brittle sleep command that could lead to flaky builds. My review includes suggestions to fix these issues.
| name: Create .env file for Docker | ||
| command: | | ||
| mkdir -p telemtry | ||
| cat > telemtry/.env \<< EOF | ||
| POSTGRES_USER=${POSTGRES_USER} | ||
| POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
| EOF |
There was a problem hiding this comment.
Writing secrets to a file on the filesystem, even temporarily, is a security risk. The .env file containing POSTGRES_USER and POSTGRES_PASSWORD could be exposed. A more secure approach is to have docker compose use environment variables directly from the CI job's shell. This would require modifying your docker-compose.yml files to remove the env_file directive. Since those files are not part of this PR, I'm flagging this as a high-severity issue to be addressed. Once the compose files are updated, this entire run step can be removed.
| docker ps | ||
|
|
There was a problem hiding this comment.
Using a fixed sleep 10 is brittle and can make your build flaky. If services take longer to start, subsequent steps might fail. It's better to actively poll for services to become ready. The docker compose up --wait command is a good start, but it relies on healthcheck directives in your compose files, which may not be configured. A more robust method is to loop and check if service ports are accessible.
# Wait up to 60 seconds for Kafka and Postgres to be available
timeout 60 bash -c 'until </dev/tcp/localhost/9092; do sleep 1; done'
timeout 60 bash -c 'until </dev/tcp/localhost/5432; do sleep 1; done'
echo "Services are ready."
docker ps…acingElectric/lhre-2026 into circleci-project-setup
No description provided.