Skip to content

Add service update command and tighten CI change detection#818

Merged
forstmeier merged 2 commits intomasterfrom
minor-tweaks-and-features
Apr 6, 2026
Merged

Add service update command and tighten CI change detection#818
forstmeier merged 2 commits intomasterfrom
minor-tweaks-and-features

Conversation

@forstmeier
Copy link
Copy Markdown
Collaborator

@forstmeier forstmeier commented Apr 6, 2026

Overview

Changes

  • Add mask infrastructure service update <service_name> command to force-redeploy an ECS service on demand, providing a way to pick up new model artifacts without requiring a code change to trigger the deploy pipeline
  • Remove maskfile.md from the Rust and Python change detection filters in the CI workflow

Context

maskfile.md changes only warranted running Rust and Python checks if the mask development commands themselves were broken — a narrow and incomplete guarantee since most mask commands interact with external systems that cannot be exercised in CI. The file still triggers the Markdown check job.

The new service update command addresses a gap where a freshly trained TiDE model would not be picked up by the ensemble manager until the ECS service was restarted, which previously required a code change to trigger a redeployment.

Summary by CodeRabbit

  • New Features

    • Added a new service update command to trigger ECS service redeployments with validation, deployment, and stability wait steps.
    • Clarified deployment error messaging to show the correct command for setting the default Pulumi organization.
  • Chores

    • Adjusted CI filter rules so changes to the maskfile no longer trigger language-specific code checks.

Add `mask infrastructure service update <service_name>` command to
force-redeploy an ECS service on demand. This provides a straightforward
way to pick up new model artifacts (e.g. a freshly trained TiDE model)
without requiring a code change to trigger the deploy pipeline.

Remove maskfile.md from the Rust and Python change detection filters in
the CI workflow. Changes to maskfile.md only warranted running those
checks if the mask development commands themselves were broken, which is
a narrow and incomplete guarantee since most mask commands interact with
external systems that cannot be exercised in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 6, 2026 17:27
@github-project-automation github-project-automation Bot moved this to In Progress in Overview Apr 6, 2026
@github-actions github-actions Bot requested a review from chrisaddy April 6, 2026 17:27
@github-actions github-actions Bot added markdown Markdown code updates yaml YAML code updates labels Apr 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

Removed maskfile.md as a trigger for Rust and Python code checks in the GitHub Actions workflow. Updated maskfile.md error text for Pulumi org guidance and added a new service update (service_name) Mask command that selects a production stack and forces an ECS service redeployment.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/run_code_checks.yaml
Removed maskfile.md from the detect_changes path-filter outputs for the rust and python categories so maskfile-only edits no longer trigger those checks.
Maskfile Documentation & Commands
maskfile.md
Rewrote Pulumi “default organization not set” guidance to pulumi org set-default <organization> and added service update (service_name) command: validates service name, reads Pulumi default org and selects ${org}/fund/production stack, retrieves aws_ecs_cluster_name, runs aws ecs update-service --force-new-deployment, and waits for aws ecs wait services-stable.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (runs command)
    participant Mask as Maskfile CLI
    participant Pulumi as Pulumi (config/stack)
    participant AWS as AWS ECS

    Dev->>Mask: service update <service_name>
    Mask->>Pulumi: read default org (fail w/ guidance if unset)
    Pulumi-->>Mask: organization_name
    Mask->>Pulumi: select stack `${organization_name}/fund/production`
    Pulumi-->>Mask: stack outputs (aws_ecs_cluster_name)
    Mask->>Mask: validate service_name (data-manager|portfolio-manager|ensemble-manager)
    Mask->>AWS: aws ecs update-service --force-new-deployment (service="fund-<service>-server")
    AWS-->>Mask: update acknowledged
    Mask->>AWS: aws ecs wait services-stable
    AWS-->>Mask: service stable
    Mask->>Dev: print completion
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add service update command and tighten CI change detection' clearly summarizes both main changes: the new service update command and the CI workflow refinements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch minor-tweaks-and-features

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 6, 2026

Greptile Summary

This PR adds a mask infrastructure service update <service_name> command for force-redeploying any of the three ECS services on demand, and removes maskfile.md from the Rust/Python CI change-detection filters. Both changes are well-reasoned, consistent with existing codebase patterns, and correctly scoped — the new command covers exactly the three ECS services defined in Pulumi infrastructure, follows the same operation ordering as the existing invoke command, and uses the established fund-${service_name}-server naming convention.

Confidence Score: 5/5

This PR is safe to merge — no P0 or P1 issues found.

All changes are additive, follow existing codebase patterns, and are correctly scoped. The new command covers exactly the three Pulumi-defined ECS services, uses the established naming convention, and mirrors the operation ordering of the existing invoke command. The CI filter removal is intentional and well-explained.

No files require special attention.

Important Files Changed

Filename Overview
maskfile.md Adds service update subcommand for ECS force-redeploy; fixes error message wording from <org> to <organization> for consistency.
.github/workflows/run_code_checks.yaml Removes maskfile.md from Rust and Python change-detection path filters; file still triggers the markdown check job.

Reviews (2): Last reviewed commit: "Add bot pull request feedback" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an on-demand Mask command to force-redeploy an ECS service (to pick up new artifacts without a code-triggered deploy), and updates CI change detection so Rust/Python checks don’t run solely due to maskfile.md edits.

Changes:

  • Add mask infrastructure service update <service_name> to force a new ECS deployment and wait for service stability.
  • Remove maskfile.md from Rust and Python paths-filter triggers in the code-checks workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
maskfile.md Adds an ECS service force-redeploy command and tweaks a Pulumi org error message placeholder.
.github/workflows/run_code_checks.yaml Tightens Rust/Python change filters by excluding maskfile.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maskfile.md
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.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@maskfile.md`:
- Around line 438-445: Validate the service_name value before using it to build
the service variable and before calling aws ecs update-service/aws ecs wait; add
a local whitelist (the same allowed service names used by the deploy command)
and check that service_name exists in that list, and if not print a clear error
and exit non‑zero so we fail fast. Ensure the validation happens prior to the
line that sets service="fund-${service_name}-server" and before invoking aws ecs
update-service/aws ecs wait so no external API calls are made for unsupported
service names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0d76b6f3-039b-4dc3-ac06-5cd137e0f7b3

📥 Commits

Reviewing files that changed from the base of the PR and between 25f919f and 8de29c4.

📒 Files selected for processing (2)
  • .github/workflows/run_code_checks.yaml
  • maskfile.md
💤 Files with no reviewable changes (1)
  • .github/workflows/run_code_checks.yaml

Comment thread maskfile.md
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 6, 2026

Coverage Status

coverage: 78.162%. remained the same — minor-tweaks-and-features into master

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.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@maskfile.md`:
- Around line 427-435: The Pulumi stack-resolution logic (checking pulumi org
default, erroring, selecting stack and reading outputs via organization_name and
cluster) is duplicated; extract it into a reusable helper (e.g.,
get_pulumi_stack or resolve_pulumi_stack) and call it from both this block and
the existing deploy flow: move the org check (pulumi org get-default), the error
message for missing default org, the pulumi stack select
"${organization_name}/fund/production", and the pulumi stack output
aws_ecs_cluster_name retrieval into that helper, return or export the cluster
value, and replace the duplicated code with a single call to that helper in both
places so future changes are centralized.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b7b0dd8e-cf8c-4c94-9fcf-4c2c44fc6ada

📥 Commits

Reviewing files that changed from the base of the PR and between 8de29c4 and 8ecd2fb.

📒 Files selected for processing (1)
  • maskfile.md

Comment thread maskfile.md
@forstmeier forstmeier merged commit 8f39795 into master Apr 6, 2026
14 checks passed
@forstmeier forstmeier deleted the minor-tweaks-and-features branch April 6, 2026 20:22
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Overview Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

markdown Markdown code updates yaml YAML code updates

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants