Skip to content

RE1-T121 console fixes#399

Merged
ucswift merged 1 commit into
masterfrom
develop
Jun 5, 2026
Merged

RE1-T121 console fixes#399
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Improved worker process configuration handling for enhanced compatibility with hardened and read-only container environments.

@request-info

request-info Bot commented Jun 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges.

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: dc867c59-6a59-438c-b5df-d0104edadcd1

📥 Commits

Reviewing files that changed from the base of the PR and between e905a1e and 5c84952.

📒 Files selected for processing (2)
  • Workers/Resgrid.Workers.Console/Program.cs
  • Workers/Resgrid.Workers.Events.Console/Program.cs

📝 Walkthrough

Walkthrough

Both worker console programs refactor their SetConnectionString() methods to eliminate disk-based configuration persistence. The Console worker simplifies the approach to direct in-memory injection, while the Events.Console worker uses reflection to temporarily disable read-only constraints on ConfigurationManager.ConnectionStrings before injecting the connection string. Both avoid disk writes to support hardened, read-only container environments.

Changes

Connection String Injection Refactoring

Layer / File(s) Summary
Console worker in-memory injection
Workers/Resgrid.Workers.Console/Program.cs
SetConnectionString() removes executable config file access and disk-write operations (config.Save(), ConfigurationManager.RefreshSection()), instead relying on direct in-memory injection of ResgridContext into ConfigurationManager.ConnectionStrings with explanatory comments for read-only container environments.
Events.Console worker reflection-based injection
Workers/Resgrid.Workers.Events.Console/Program.cs
SetConnectionString() uses reflection to toggle _readOnly fields on ConfigurationManager.ConnectionStrings and related collections, injects ResgridContext with DataConfig.ConnectionString in-memory, and restores read-only state without reading or writing the executable configuration file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'RE1-T121 console fixes' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes made. Replace with a more descriptive title that specifies the main change, such as 'Remove disk persistence from console Program.SetConnectionString()' or 'Refactor connection string handling to use in-memory injection'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@ucswift

ucswift commented Jun 5, 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 410095d into master Jun 5, 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