-
Notifications
You must be signed in to change notification settings - Fork 3
Reorganize Stroma with hierarchical settings storage #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Added `Servactory::Stroma` module with hierarchical configuration support: `ExtensionConfigs`, `RegistryKeyConfigs`, and `ExtensionConfig` classes. - Updated all service extension modules to use isolated `extension_config` for scoped settings: - `Authorization` now stores `method_name` in the isolated config. - `Transactional` encapsulates settings like `enabled` and `transaction_class`. - `Idempotent` manages `key_input` and `store` settings dynamically. - Additional support for scoped configurations in `PostCondition`, `Rollbackable`, and `ExternalApiRequest`. - Introduced unit tests for new configuration classes and the updated extensions to ensure proper functionality and isolation. - Enhanced extension specs with deep duplication and shared config coordination cases.
- Rename Configuration to State to avoid naming conflict - Move hooks into Stroma::Hooks namespace (Hook, Collection, Factory, Applier) - Move settings into Stroma::Settings namespace (Setting, RegistrySettings, Collection) - Remove extension_config helper - use direct stroma.settings access - Migrate all extensions to new stroma.settings[:registry][:ext][:key] pattern - Reorganize specs and RBS files to match new structure
- Replaced `VALID_HOOK_TYPES.include?` with `VALID_HOOK_TYPES.exclude?` for clearer negative condition. - Preserved behavior to raise `Exceptions::InvalidHookType` on invalid hook types. - Improved code readability and maintainability by using a more concise method.
- Updated `Setting#fetch` to use default argument syntax for better clarity. - Added `# rubocop:disable` comments to handle specific violations (e.g., `Naming/VariableNumber`, `Metrics/MethodLength`). - Marked a spec with `:aggregate_failures` for improved test output clarity. - Small refinements across specs to ensure compliance with lint rules.
- Updated `Servactory::Stroma::Hook` references to `Servactory::Stroma::Hooks::Hook`. - Updated `Servactory::Stroma::HooksFactory` references to `Servactory::Stroma::Hooks::Factory`. - Documented `InvalidHookType` error in `Stroma::Exceptions::Base`. - Improved code comments for clarity regarding hook validation and exception handling.
- Updated `call!` in `Idempotent::DSL` to skip stage execution on cache hits, avoiding redundant processing. - Ensured cached outputs populate correctly without reinitializing execution logic. - Moved `Idempotent::DSL` to an `after :actions` hook for accurate execution flow. - Modified `Setting#to_h` to return a deep copy for better data integrity. - Refined specs to validate true idempotency behavior and improve clarity, including corrections to expected execution counts.
- Rearranged `incoming_arguments` in method parameters for clarity. - Added `# rubocop:disable` and `# rubocop:enable` comments to handle `Metrics/MethodLength` and `Metrics/AbcSize`. - Ensured no change to core execution logic.
- Added `Usual::Extensions::Idempotent::Example2` service showcasing idempotent execution. - Implemented `LikeAnIdempotencyStore` to track requests and avoid redundant executions. - Ensured inputs are validated, and outputs are cached based on raw keys. - Added comprehensive specs to test idempotency behavior, caching logic, and validation rules.
- Revised `Idempotent::DSL#call!` to use the raw key directly for caching, ensuring consistency with the read operation. - Simplified caching flow and improved clarity in key handling logic. - Maintained existing validation and execution behavior.
- Updated comment in `Setting` to specify handling of nested `Hash` and `Array` structures during deep duplication. - Ensured improved accuracy and clarity in the code documentation.
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.
No description provided.