Skip to content

RE1-T114 Fixes#413

Merged
ucswift merged 2 commits into
masterfrom
develop
Jun 22, 2026
Merged

RE1-T114 Fixes#413
ucswift merged 2 commits into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Corrected caching behavior for department module settings so reads and updates use the proper cache entry, ensuring consistent retrieval and invalidation.
    • Updated the Workers.Console container base image to include the required ASP.NET Core shared framework, preventing launch failures.
  • Documentation
    • Added comments to the Dockerfile explaining why the ASP.NET Core base image is required for Workers.Console.

@request-info

request-info Bot commented Jun 22, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f445cd2d-8a02-4d58-a4dc-df4a03195e47

📥 Commits

Reviewing files that changed from the base of the PR and between be58bfb and afeed92.

📒 Files selected for processing (1)
  • Core/Resgrid.Services/DepartmentSettingsService.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Core/Resgrid.Services/DepartmentSettingsService.cs

📝 Walkthrough

Walkthrough

Two independent fixes: DepartmentSettingsService gains a dedicated ModuleSettingsCacheKey constant, corrects GetDepartmentModuleSettingsAsync to use it instead of the wrong StaffingSupressInfo key, and adds cache invalidation for DepartmentSettingTypes.ModuleSettings in SaveOrUpdateSettingAsync. The Workers.Console Dockerfile switches its base image from the dotnet runtime to the ASP.NET Core runtime image.

Changes

Module Settings Cache Key Fix

Layer / File(s) Summary
Module settings cache key constant, invalidation, and read fix
Core/Resgrid.Services/DepartmentSettingsService.cs
Adds ModuleSettingsCacheKey constant, extends the SaveOrUpdateSettingAsync cache invalidation to handle both first-time writes and the switch statement for DepartmentSettingTypes.ModuleSettings, and fixes GetDepartmentModuleSettingsAsync to read from ModuleSettingsCacheKey instead of the incorrect StaffingSupressInfo key.

Workers.Console Dockerfile Base Image Fix

Layer / File(s) Summary
Switch base image to aspnetcore runtime
Workers/Resgrid.Workers.Console/Dockerfile
Changes the base stage FROM to dhi.io/aspnetcore:9.0.16-debian13 and adds inline comments explaining the ASP.NET Core shared-framework requirement and the prior runtime failure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Resgrid/Core#380: Introduced the Docker Hardened Images migration for the same Workers.Console Dockerfile, switching to pinned dhi.io/dotnet images — the base image being corrected in this PR.
  • Resgrid/Core#397: Modifies the same Workers.Console Dockerfile with changes to docker-compose-wait wiring and ENTRYPOINT setup, overlapping with this PR's base image updates.

Suggested reviewers

  • github-actions
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'RE1-T114 Fixes' is vague and generic, providing no meaningful information about what the pull request actually changes. Replace with a descriptive title that summarizes the main changes, such as 'Fix department module settings cache key usage and update Workers.Console base image'
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Core/Resgrid.Services/DepartmentSettingsService.cs`:
- Around line 71-73: The cache invalidation for
DepartmentSettingTypes.ModuleSettings currently only executes in the
savedSetting != null branch of the switch statement. When savedSetting is null
(first-time write), the code writes module settings to the database but never
clears the stale cache that may have been populated by the fallback new
DepartmentModuleSettings(). Add cache invalidation using the
ModuleSettingsCacheKey in the savedSetting == null branch to ensure cache is
properly cleared whenever module settings are written, regardless of whether
this is an update or initial creation.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 91537c84-c712-4f56-a4e8-eea28bea2cc2

📥 Commits

Reviewing files that changed from the base of the PR and between 0ea0d7e and be58bfb.

📒 Files selected for processing (2)
  • Core/Resgrid.Services/DepartmentSettingsService.cs
  • Workers/Resgrid.Workers.Console/Dockerfile

Comment thread Core/Resgrid.Services/DepartmentSettingsService.cs
@ucswift

ucswift commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift ucswift merged commit e348678 into master Jun 22, 2026
18 of 19 checks passed
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