Block reload config files in Railtie if they already uploaded#382
Open
Block reload config files in Railtie if they already uploaded#382
Conversation
It affects tests which execute `rails runner`
Member
Author
|
@pkuczynski @vovanmozg @Fryguy |
There was a problem hiding this comment.
Pull Request Overview
This PR blocks the reloading of configuration files in the Rails Railtie if they have already been uploaded, preventing duplicate loading of settings. The change adds a guard clause to check if the configuration constant is already defined before proceeding with the default configuration loading.
Key changes:
- Added guard clause in Railtie to prevent duplicate config loading
- Enhanced test coverage for Rails context configuration scenarios
- Updated documentation to clarify custom settings file loading
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/config/integrations/rails/railtie.rb | Added guard clause to prevent reloading if config constant already exists |
| spec/config_spec.rb | Added comprehensive test suite for Rails context configuration loading |
| spec/config_env_spec.rb | Added ENV backup/restore functionality for test isolation |
| spec/app/rails_*/config/boot.rb | Added logger requirement across Rails test apps |
| spec/app/rails_5.2/config/application.rb | Commented out config_available? call for test context |
| README.md | Added documentation for custom settings file loading |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Member
Author
|
@pkuczynski lets also get this merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation for #353
Fixes #352