Skip to content

add scheduled spec run for fdsh gw#280

Open
jacobkagon wants to merge 1 commit intotrunkfrom
CU_868fn07y3_add_gh_scheduled_runs
Open

add scheduled spec run for fdsh gw#280
jacobkagon wants to merge 1 commit intotrunkfrom
CU_868fn07y3_add_gh_scheduled_runs

Conversation

@jacobkagon
Copy link
Copy Markdown
Contributor

@jacobkagon jacobkagon commented Sep 18, 2025

https://app.clickup.com/t/868fn07y3

Summary by CodeRabbit

  • Chores
    • Updated continuous integration to run on a daily schedule at 05:00 UTC, in addition to running on code pushes.
    • No changes to build, test, or deployment steps; this only affects when automated checks are executed.
    • Enhances reliability by detecting issues even during periods without new commits.
    • No product changes; no impact on application behavior, performance, or user experience.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 18, 2025

Walkthrough

The GitHub Actions workflow .github/workflows/rspec.yml now triggers on both push events and a daily scheduled cron at 05:00 UTC. No changes were made to jobs or steps.

Changes

Cohort / File(s) Summary
GitHub Actions: Trigger configuration
.github/workflows/rspec.yml
Replaced single on: push with on: mapping including push and schedule (cron: '0 5 * * *'). No job/step modifications.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Push Event
    participant Cron as Scheduler (05:00 UTC)
    participant GH as GitHub Actions
    participant WF as rspec Workflow
    participant Job as rspec Job(s)

    Dev->>GH: Push to repository
    GH->>WF: Trigger workflow (on: push)
    WF->>Job: Execute tests

    Cron->>GH: Daily cron tick
    GH->>WF: Trigger workflow (on: schedule)
    WF->>Job: Execute tests
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I thump at dawn, a punctual bun,
Cron bells ring—it’s testing fun!
Push or sunrise, I don’t delay,
Specs hop nightly, greet the day.
Green lights twinkle, whiskers cheer,
CI hums soft: “All clear, my dear.” 🐇✨

Pre-merge checks and finishing touches

✅ 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 scheduled spec run for fdsh gw" is concise and accurately summarizes the primary change in the PR—adding a scheduled rspec/spec run to the fdsh_gateway CI workflow (.github/workflows/rspec.yml)—and is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CU_868fn07y3_add_gh_scheduled_runs

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@jacobkagon jacobkagon changed the title add scheduled rspec run for fdsh gw add scheduled spec run for fdsh gw Sep 18, 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 (8)
.github/workflows/rspec.yml (8)

2-5: Schedule addition looks good; add manual trigger and avoid overlaps.

Cron runs at 05:00 UTC daily. Consider adding workflow_dispatch for ad‑hoc runs and top‑level concurrency to prevent overlapping scheduled runs. If you only want CI on trunk pushes, also scope push to trunk.

 on: 
   push:
+    branches:
+      - trunk
   schedule:
     - cron: '0 5 * * *'
+  workflow_dispatch:

+concurrency:
+  group: rspec-${{ github.workflow }}-${{ github.ref || github.run_id }}
+  cancel-in-progress: true

Verify that 05:00 UTC aligns with your intended local time (e.g., 1:00 ET during DST).


11-11: Upgrade checkout action.

actions/checkout@v2 is legacy; use v4 (ideally pinned to a commit SHA).

-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4

53-55: assets-cache reference is undefined; step always runs.

You gate assets:precompile on steps.assets-cache.outputs.cache-hit, but no step sets id: assets-cache. Define a cache step or remove the condition.

+      - name: Cache compiled assets
+        id: assets-cache
+        uses: actions/cache@v4
+        with:
+          path: public/assets
+          key: assets-v1-${{ runner.os }}-${{ github.sha }}
+          restore-keys: |
+            assets-v1-${{ runner.os }}-
       - name: Compile assets
-        if: steps.assets-cache.outputs.cache-hit != 'true'
+        if: steps.assets-cache.outputs.cache-hit != 'true'
         run: bundle exec rails assets:precompile

21-25: Make apt installs non-interactive and resilient.

Add -y to avoid prompts and consider ensuring the service is started.

       - name: Boot RabbitMQ
         run: |
           sudo apt-get update
-          sudo apt-get install rabbitmq-server
+          sudo apt-get install -y rabbitmq-server
           sudo rabbitmqctl add_vhost event_source
           sudo rabbitmqctl set_permissions -p event_source guest ".*" ".*" ".*"

17-19: Mongo action is very old.

wbari/start-mongoDB@v0.2 is unmaintained. Consider mongodb-actions/setup-mongodb@v2 (or a services: mongo container) for stability.


9-9: Set a reasonable job timeout.

Prevents hung scheduled runs from piling up.

   rspec:
     runs-on: ubuntu-latest
+    timeout-minutes: 30

15-16: libsodium package naming can drift per Ubuntu image.

ubuntu-latest may advance; confirm libsodium23 exists on the runner image (24.04 currently). If it breaks, fall back to apt-get install -y libsodium23 || sudo apt-get install -y libsodium.


56-61: Optional hygiene: set RAILS_ENV and fail-fast shell.

Helps avoid surprises in scheduled runs.

-      - name: run rubocop
+      - name: run rubocop
         run: |
           bundle exec rubocop
-      - name: run tests
+      - name: run tests
         run: |
-          bundle exec rspec
+          RAILS_ENV=test bundle exec rspec --format documentation
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46cf4a7 and e2ee324.

📒 Files selected for processing (1)
  • .github/workflows/rspec.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-and-upload-image
🔇 Additional comments (2)
.github/workflows/rspec.yml (2)

26-28: Ruby 2.7.8 is EOL — upgrade CI to Ruby 3.2+ and enable bundler-cache

Ruby 2.7 reached EOL (Mar 31, 2023); plan migration to a supported 3.x (3.2/3.3/3.4) and enable bundler-cache via ruby/setup-ruby to speed CI. If you can’t migrate yet, at minimum add bundler-cache on 2.7. (ruby-lang.org)

-      - uses: ruby/setup-ruby@v1
+      - uses: ruby/setup-ruby@v1
         with:
-          ruby-version: 2.7.8
+          ruby-version: 3.2
+          bundler-cache: true

35-37: Node 14 is EOL; bump to supported LTS.

Use Node 18 (or your app’s minimum) and the latest setup-node.

-      - uses: actions/setup-node@v3
+      - uses: actions/setup-node@v4
         with:
-          node-version: '14.x'
+          node-version: '18.x'
+          cache: 'yarn'

If you adopt setup-node’s cache, you can drop the manual node_modules cache step. Confirm app compatibility before merging.

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.

1 participant