Skip to content

Infrastructure#506

Closed
chrisaddy wants to merge 30 commits intomasterfrom
infrastructure
Closed

Infrastructure#506
chrisaddy wants to merge 30 commits intomasterfrom
infrastructure

Conversation

@chrisaddy
Copy link
Copy Markdown
Collaborator

@chrisaddy chrisaddy commented May 13, 2025

This pull request introduces several changes across the codebase, including updates to workflows, task definitions, and configuration files, as well as the removal of Haskell-related files and functionality. The most significant changes are grouped below by theme.

Workflow Automation and CI/CD Enhancements:

  • Added a new GitHub Actions workflow (.github/workflows/format.yaml) to check code formatting and linting using mise. This ensures code quality is maintained in pull requests.
  • Fixed a typo in the test workflow (.github/workflows/test.yaml) where the test command was incorrectly written as mise run teset instead of mise run test.

Task Definitions and Tooling Updates:

  • Updated .mise.toml to add a python:check task for running Python code quality checks and restructured task dependencies. Introduced a new haskell:build task for building Haskell code. [1] [2]

Haskell Code and Configuration Removal:

  • Removed Haskell-related files, including platform/Dockerfile, platform/Setup.hs, platform/app/Main.hs, and platform/src/Lib.hs, effectively deprecating the Haskell-based platform functionality. [1] [2] [3] [4]
  • Deleted platform/package.yaml and platform/platform.cabal, removing Haskell package configurations. [1] [2]

Configuration and Dependency Management:

  • Cleaned up .flox/env/manifest.toml by removing unused dependencies and sections, streamlining the environment configuration.

Miscellaneous Additions:

  • Added a .python_coverage.xml file to track Python code coverage metrics.
  • Introduced a permissions configuration (infrastructure/.claude/settings.local.json) for specific commands to enhance security.

These changes collectively improve workflow automation, simplify task management, and remove deprecated functionality, aligning the project with updated requirements and best practices.

Summary by CodeRabbit

  • Chores
    • Removed all Haskell-related source files, configuration files, and Docker assets from the project.
    • Simplified and cleaned up environment and manifest configuration files.
    • Updated and refocused task automation to support only Python and application service workflows.
    • Stopped ignoring .DS_Store files in version control.
  • New Features
    • Added new tasks for installing Python dependencies, running Python tests, and building/running application services.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2025

Walkthrough

This change removes all Haskell-based "platform" application source code, configuration, and build artifacts, including Docker and Compose files, and test suites. Project configuration files are updated to eliminate Haskell and platform-related entries, refocusing build and task automation on Python workflows and dynamic application service management.

Changes

File(s) Change Summary
.flox/env/manifest.toml Simplified by removing Haskell and Pulumi package paths, reordering remaining entries, and deleting empty sections.
.mise.toml Refactored: removed all Haskell/platform tasks, added/renamed Python tasks, introduced dynamic application service build/run tasks, and updated test/format/lint workflows.
.gitignore Removed .DS_Store from ignored files.
platform/Dockerfile, platform/compose.yaml Deleted Dockerfile and Compose file for the Haskell platform application.
platform/Setup.hs, platform/app/Main.hs, platform/src/Account.hs, platform/src/Lib.hs, platform/test/Spec.hs Deleted all Haskell source, main entry point, library, and test modules for the platform application.
platform/package.yaml, platform/platform.cabal, platform/stack.yaml Deleted all Haskell build and package configuration files for the platform project.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Mise as Mise Task Runner
    participant Docker as Docker Engine

    Dev->>Mise: Run application:service:build <service>
    Mise->>Docker: Build Docker image for <service> (dynamic path/tag)
    Docker-->>Mise: Image built

    Dev->>Mise: Run application:service:run <service>
    Mise->>Docker: Run container for <service> with env/ports
    Docker-->>Mise: Service running
Loading

Possibly related PRs

  • Rebuild full application #485: Removes Haskell platform code and configuration, mirroring this PR's elimination of Haskell components and transition to Python-based infrastructure.

Suggested labels

application

Poem

In the warren, code once hopped in Haskell’s field,
Now Python’s paws take over—new workflows revealed!
Old Docker burrows cleared, Compose tunnels gone,
The stack of the past has finally moved on.
With fresh carrots (tasks) and a Pythonic cheer,
This rabbit’s code garden is sprouting anew this year! 🥕

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, 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.

@graphite-app graphite-app Bot requested a review from forstmeier May 13, 2025 06:22
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 13, 2025

Graphite Automations

"Assign author to pull request" took an action on this PR • (05/13/25)

1 assignee was added to this PR based on John Forstmeier's automation.

@chrisaddy chrisaddy force-pushed the infrastructure branch 8 times, most recently from e4ceaa8 to ff72dc8 Compare May 13, 2025 06:33
Copy link
Copy Markdown
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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.mise.toml (1)

59-66: Parameterize port mapping for service run
The application:service:run task hardcodes port 8080:8080. If services listen on different ports or require multiple mappings, consider adding a configurable port argument or using {{arg(...)}} for flexibility.

🛑 Comments failed to post (1)
.mise.toml (1)

28-45: ⚠️ Potential issue

Fix missing closing triple-quote in Python test task
The run block for python:test starts with """ but lacks a matching closing """, causing a TOML syntax error. Add the closing triple-quote after the last command:

   ...
   uv run coverage xml \
       --data-file .python_coverage.output \
       -o .python_coverage.xml
+  """
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

[tasks."python:test"]
description = "Run Python tests"
run = """
uv run coverage run \
    --parallel-mode \
    --omit '*/__init__.py,**/test_*.py' \
    --data-file .python_coverage.output \
    --module pytest

uv run coverage combine \
    --data-file .python_coverage.output

uv run coverage report \
    --data-file .python_coverage.output

uv run coverage xml \
    --data-file .python_coverage.output \
    -o .python_coverage.xml
"""

@chrisaddy chrisaddy closed this May 13, 2025
Copy link
Copy Markdown
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 (3)
.mise.toml (3)

1-3: Ensure Python tasks include installation dependency.
The new python:install task correctly installs dependencies, but downstream Python tasks (format, dead-code, lint) should explicitly depend on it to guarantee the environment is prepared before execution.

Consider adding:

 [tasks."python:format"]
+depends = ["python:install"]
 ...
 [tasks."python:dead-code"]
+depends = ["python:install"]
 ...
 [tasks."python:lint"]
+depends = ["python:install"]
 ...

28-46: Add dependency on linting before tests.
The python:test task should depend on python:lint to ensure code quality checks run prior to test execution. Otherwise, tests may run against unformatted or unchecked code, and missing dependencies could cause failures.

 [tasks."python:test"]
+depends = ["python:lint"]
 description = "Run Python tests"
 run = """
   uv run coverage run \
   --parallel-mode \
   --omit '*/__init__.py,**/test_*.py' \
   --data-file .python_coverage.output \
   --module pytest

   uv run coverage combine \
   --data-file .python_coverage.output

   uv run coverage report \
   --data-file .python_coverage.output

   uv run coverage xml \
   --data-file .python_coverage.output \
   -o .python_coverage.xml
 """

59-66: Run services in detached mode.
Adding -d to the docker run command will allow containers to run in the background, enabling non-blocking workflows and easier management of multiple services.

 [tasks."application:service:run"]
 run = """
 docker run \
+    -d \
     --env-file .env \
     --publish 8080:8080 \
     pocketsizefund/{{arg(name="service_name")}}:latest \
 """
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e4ceaa8 and d50c317.

⛔ Files ignored due to path filters (1)
  • platform/stack.yaml.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .flox/env/manifest.toml (1 hunks)
  • .gitignore (0 hunks)
  • .mise.toml (2 hunks)
  • README.md (2 hunks)
  • platform/Dockerfile (0 hunks)
  • platform/Setup.hs (0 hunks)
  • platform/app/Main.hs (0 hunks)
  • platform/compose.yaml (0 hunks)
  • platform/package.yaml (0 hunks)
  • platform/platform.cabal (0 hunks)
  • platform/src/Account.hs (0 hunks)
  • platform/src/Lib.hs (0 hunks)
  • platform/stack.yaml (0 hunks)
  • platform/test/Spec.hs (0 hunks)
💤 Files with no reviewable changes (11)
  • platform/stack.yaml
  • platform/compose.yaml
  • platform/app/Main.hs
  • .gitignore
  • platform/Dockerfile
  • platform/src/Lib.hs
  • platform/src/Account.hs
  • platform/package.yaml
  • platform/Setup.hs
  • platform/test/Spec.hs
  • platform/platform.cabal
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .flox/env/manifest.toml
🔇 Additional comments (4)
.mise.toml (4)

6-6: Skipping trivial description update.


11-11: Skipping trivial description update.


21-21: Skipping trivial description update.


48-57: Dynamic Docker build task looks solid.
The parameterized application:service:build correctly builds images with both latest and timestamp tags. Usage of {{arg(name="service_name")}} is clear and replaces the removed Haskell-specific tasks appropriately.

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