-
Notifications
You must be signed in to change notification settings - Fork 43
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
Try to head off file ownership issues #2096
Conversation
📝 WalkthroughWalkthroughThe changes primarily involve updates to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
spiffworkflow-backend/Dockerfile (1)
Development libraries are included in the final image.
The development libraries (
gcc
,libssl-dev
,libpq-dev
,default-libmysqlclient-dev
,pkg-config
,libffi-dev
) are present in the final Docker image. Consider removing these libraries in the final stage to reduce image size.🔗 Analysis chain
Line range hint
57-58
: Approved: Addition of development libraries for Python dependencies.The inclusion of these development libraries is necessary for building certain Python packages. However, ensure that these libraries are not carried over to the final image to keep it lean.
Let's verify if these development libraries are present in the final image:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if development libraries are present in the final image # Test: Search for the installation of development libraries in the final stage rg --type dockerfile 'apt-get install.*gcc|libssl-dev|libpq-dev|default-libmysqlclient-dev|pkg-config|libffi-dev' spiffworkflow-backend/DockerfileLength of output: 183
Script:
#!/bin/bash # Description: Check if development libraries are present in the final image # Test: Search for the installation of development libraries in the final stage rg --type Dockerfile 'apt-get install.*gcc|libssl-dev|libpq-dev|default-libmysqlclient-dev|pkg-config|libffi-dev' spiffworkflow-backend/DockerfileLength of output: 183
Script:
#!/bin/bash # Description: Check if development libraries are present in the final image # Test: Search for the installation of development libraries in the Dockerfile rg 'apt-get install.*(gcc|libssl-dev|libpq-dev|default-libmysqlclient-dev|pkg-config|libffi-dev)' spiffworkflow-backend/DockerfileLength of output: 233
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- spiffworkflow-backend/Dockerfile (1 hunks)
🔇 Additional comments (3)
spiffworkflow-backend/Dockerfile (3)
Line range hint
1-78
: Overall approval: Changes address file ownership issues and improve build process.The modifications in this Dockerfile effectively address the PR objectives by configuring Git to handle file ownership issues and updating dependencies. The changes are well-structured and appropriate for the different build stages. Consider the suggestions for comment updates and verifications to further improve the Dockerfile.
34-35
: Approved: Git configuration addresses file ownership issues.This change aligns with the PR objective of heading off file ownership issues. However, setting
safe.directory
to*
could potentially have security implications if not carefully managed.To ensure this change doesn't introduce unintended side effects, let's verify if there are any other Git configurations in the repository:
✅ Verification successful
Verified: No additional Git configurations found in the repository.
The Git configuration change to set
safe.directory
to*
addresses the file ownership issues without introducing other Git configurations.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for other Git configurations in the repository # Test: Search for Git config files or commands rg --type-add 'dockerfile:*.Dockerfile' --type dockerfile --type yaml 'git config'Length of output: 151
Script:
#!/bin/bash # Description: Re-attempt to search for Git configurations in the repository without relying on poetry. # Test: Search for 'git config' in Dockerfile and YAML files rg --type-add 'dockerfile:*.Dockerfile' --type dockerfile --type yaml 'git config'Length of output: 146
Line range hint
46-51
: Update or remove the outdated comment about Poetry version.The comment refers to issues with Poetry 1.4, but the version has been updated to 1.6.1. Consider updating or removing this comment if the issues are no longer relevant.
Let's verify if the mentioned issues are resolved with Poetry 1.6.1:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at computer to test, but we know it works for the dev Dockerfile, so there’s a strong chance it fixes the current issue.
Unfortunately this does not successfully enable I'm noodling on how that can be resolved, since this seems like it must be a pretty common situation with a well-understood solution. An alternative is to introduce a Postgresql container that uses that volume, and have the backend use Postgres instead of SQLite. I think this change would better reflect actual deployment scenarios, while being incidental to the local "docker compose up" workflow we're trying to make better here. What do you think? |
definitely true that mysql and postgres are the right targets for real deployed environments. https://github.com/sartography/arena-compose-postgres has a compose file using postgres. |
A WILD SOLUTION APPEARS! This looks like The Right Way, being both clever and straightforward at the same time. It's something I can easily test locally; will do that, then make a PR if it works. |
:D |
See conversation [here](sartography#2096 (comment)). Tested locally; it works!
See #2090 (comment)
I think this will work, but I'm not working directly with your build pipeline locally.🤞
cc @burnettk
Summary by CodeRabbit