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

Fix for first time use of dev containers in clean environment #1136

Merged
merged 15 commits into from
Mar 1, 2024

Conversation

jbirddog
Copy link
Contributor

@jbirddog jbirddog commented Feb 29, 2024

Found this issue when moving to my alpine box - seems like due to mounting a pre-existing working directory, poetry was not respecting all the things i expected it to. Fix is to add one more env var to the arena dev docker compose file.

Summary by CodeRabbit

  • New Features
    • Introduced a new GitHub Actions workflow "Dev Containers" for building and testing on pushes and pull requests.
  • Chores
    • Added and adjusted environment variables in Docker configurations to optimize caching and ensure correct service configuration.
    • Improved development environment setup and testing procedures.

Copy link
Contributor

coderabbitai bot commented Feb 29, 2024

Walkthrough

Walkthrough

The recent updates focus on optimizing caching mechanisms and configurations for improved performance in the development environment. These changes aim to enhance efficiency and streamline the development process. Additionally, a new GitHub Actions workflow named "Dev Containers" has been implemented to automate setting up the development environment and running backend unit tests upon code changes in the main branch.

Changes

File Path Change Summary
dev.docker-compose.yml Introduced caching environment variables XDG_CACHE_HOME and POETRY_CACHE_DIR. Adjusted POETRY_VIRTUALENVS_IN_PROJECT for correct service configuration.
.../spiffworkflow-frontend/dev.docker-compose.yml Added npm_config_cache and XDG_CACHE_HOME environment variables for the SpiffWorkflow frontend service.
.github/workflows/dev_containers.yml Implemented "Dev Containers" GitHub Actions workflow for automated development environment setup and backend unit testing triggered by main branch 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?

Share

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>.
    • Generate unit-tests for this file.
  • 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 generate unit tests for this file.
    • @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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 0565e63 and ece1c66.
Files selected for processing (2)
  • dev.docker-compose.yml (1 hunks)
  • spiffworkflow-backend/dev.docker-compose.yml (1 hunks)
Additional comments: 5
dev.docker-compose.yml (3)
  • 9-9: The addition of the POETRY_CACHE_DIR environment variable is a good fix for ensuring Poetry utilizes the specified cache directory within the containerized development environment. This change should help address the issue with dependency management in clean environments, especially on Alpine Linux systems.
  • 9-9: Reinstating the POETRY_VIRTUALENVS_IN_PROJECT environment variable is crucial for ensuring that virtual environments are correctly configured within the project. This change contributes to a more predictable and controlled development environment.
  • 9-9: Please ensure to test these changes in the Alpine Linux environment to verify that Poetry behaves as expected with these new configurations.
spiffworkflow-backend/dev.docker-compose.yml (2)
  • 11-11: Reinstating the POETRY_VIRTUALENVS_IN_PROJECT environment variable in the spiffworkflow-backend service configuration is a positive step towards ensuring that virtual environments are correctly configured within the project. This change aligns with the overall objectives of enhancing the development container experience.
  • 11-11: Please ensure to test these changes in the development environment to confirm that the virtual environments are correctly configured as intended.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between ece1c66 and a64ec7c.
Files selected for processing (1)
  • .github/workflows/dev_containers.yml (1 hunks)

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between a64ec7c and fdf250e.
Files selected for processing (1)
  • .github/workflows/dev_containers.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/dev_containers.yml

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between fdf250e and d97aa7d.
Files selected for processing (1)
  • spiffworkflow-frontend/dev.docker-compose.yml (1 hunks)
Additional comments: 2
spiffworkflow-frontend/dev.docker-compose.yml (2)
  • 8-8: The addition of the CYPRESS_CACHE_FOLDER environment variable is a good practice for managing Cypress cache in a containerized environment. This ensures that Cypress uses a specific directory for caching, which can help avoid permission issues and improve build times by reusing the cache.
  • 11-11: Setting the npm_config_cache environment variable is a solid approach to manage npm's cache directory. This change will help in optimizing dependency installation times and resolving potential cache-related issues in a containerized setup, especially on systems like Alpine Linux where the default cache location might not be ideal.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between d97aa7d and a75192c.
Files selected for processing (1)
  • spiffworkflow-frontend/dev.docker-compose.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • spiffworkflow-frontend/dev.docker-compose.yml

@jbirddog jbirddog marked this pull request as draft March 1, 2024 14:19
@jbirddog jbirddog marked this pull request as ready for review March 1, 2024 17:19
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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between a75192c and f7a6461.
Files selected for processing (4)
  • .github/workflows/dev_containers.yml (1 hunks)
  • dev.docker-compose.yml (1 hunks)
  • spiffworkflow-backend/dev.docker-compose.yml (1 hunks)
  • spiffworkflow-frontend/dev.docker-compose.yml (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/dev_containers.yml
  • dev.docker-compose.yml
  • spiffworkflow-backend/dev.docker-compose.yml
  • spiffworkflow-frontend/dev.docker-compose.yml

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between f7a6461 and c331705.
Files selected for processing (1)
  • dev.docker-compose.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • dev.docker-compose.yml

@jbirddog jbirddog merged commit 2226851 into main Mar 1, 2024
23 checks passed
@jbirddog jbirddog deleted the first_time branch March 1, 2024 20:28
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.

None yet

2 participants