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

Dev Container Tweaks #1117

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Dev Container Tweaks #1117

merged 4 commits into from
Feb 28, 2024

Conversation

jbirddog
Copy link
Contributor

@jbirddog jbirddog commented Feb 28, 2024

  1. Realized the frontend dev container does not need to npm i since we do that on the outside now via the mounted volume. This same approach should work for the backend and arena dev containers once the permission issue preventing "run as me" is fixed.
  2. Revert package-lock.json when doing an npm i to remove a manual step
  3. Allow overriding the process models location via SPIFFWORKFLOW_BACKEND_LOCAL_BPMN_SPEC_DIR
  4. Add support for having a .env* file that is gititgnored to allow another level of local customization that won't be committed to git.
  5. Bumped backend containers to use poetry 1.8.1

Summary by CodeRabbit

  • Chores
    • Updated .gitignore to exclude files starting with .env.
    • Modified the Makefile to enhance the development environment setup process.
    • Updated Docker configurations for backend and frontend to use newer dependencies and simplify the build process.
  • Documentation
    • Enhanced the README.md to provide detailed summaries of available make targets.
  • Refactor
    • Improved flexibility in specifying local BPMN spec directory path in docker-compose.yml.

Copy link
Contributor

coderabbitai bot commented Feb 28, 2024

Walkthrough

Walkthrough

The recent updates focus on improving project configuration and development environment setup. Changes include enhancing the .gitignore to exclude environment files, refining the Makefile to streamline development processes, updating documentation in the README.md for clarity on make targets, and adjusting Docker configurations for both backend and frontend components to ensure flexibility and up-to-date dependencies. These modifications aim to simplify development workflows and ensure a more flexible and efficient setup.

Changes

Files Change Summaries
.gitignore Added the pattern .env* to exclude files starting with .env.
Makefile Updated dev-env target to include stop-dev before build-images; added git checkout -- spiffworkflow-frontend/package-lock.json to fe-npm-i.
README.md Updated description regarding make targets for enhanced clarity and documentation.
docker-compose.yml Modified volume mapping to use an environment variable for the BPMN spec directory path.
.../Dockerfile, .../dev.Dockerfile (backend) Updated poetry to 1.8.1; in dev.Dockerfile, also updated pytest-xdist to 3.5.0.
spiffworkflow-frontend/dev.Dockerfile Simplified build process by removing explicit COPY and RUN npm i, relying on CMD to start app.

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 d66ea0e and cc4027b.
Files selected for processing (7)
  • .gitignore (1 hunks)
  • Makefile (3 hunks)
  • README.md (1 hunks)
  • docker-compose.yml (1 hunks)
  • spiffworkflow-backend/Dockerfile (1 hunks)
  • spiffworkflow-backend/dev.Dockerfile (1 hunks)
  • spiffworkflow-frontend/dev.Dockerfile (1 hunks)
Files skipped from review due to trivial changes (3)
  • .gitignore
  • README.md
  • spiffworkflow-frontend/dev.Dockerfile
Additional comments: 5
spiffworkflow-backend/dev.Dockerfile (1)
  • 11-11: The update to poetry==1.8.1 and pytest-xdist==3.5.0 is aligned with the PR objectives to use up-to-date tools. Ensure that all dependencies are compatible with these versions to avoid potential conflicts.
Makefile (2)
  • 32-32: Including stop-dev before build-images in the dev-env target is a good practice to ensure a clean state before building images. This helps avoid potential issues from lingering containers or networks.
  • 72-72: Automating the reversion of package-lock.json during npm i operations in the fe-npm-i target is a significant improvement. It streamlines the setup process by removing a manual step, aligning with the PR objectives. However, ensure that this approach does not inadvertently discard intended updates to package-lock.json.
spiffworkflow-backend/Dockerfile (1)
  • 30-30: Updating the poetry version to 1.8.1 in the Dockerfile is consistent with the PR's objective to use the latest tools and practices. Ensure that the poetry version is compatible with the project's dependencies and does not introduce breaking changes.
docker-compose.yml (1)
  • 44-44: Using an environment variable (SPIFFWORKFLOW_BACKEND_LOCAL_BPMN_SPEC_DIR) to specify the local BPMN spec directory path in the docker-compose.yml file increases flexibility and customization of the development environment. This aligns with the PR objectives to enhance the development setup. Ensure that the default value (./process_models) is appropriate for most development scenarios and that the documentation is updated to reflect this new customization option.

@jbirddog jbirddog merged commit 52f986f into main Feb 28, 2024
22 checks passed
@jbirddog jbirddog deleted the devc_tweaks branch February 28, 2024 14:49
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.

2 participants