Add unified catalog integration, replaced external feeders, added field tracking#23
Merged
Add unified catalog integration, replaced external feeders, added field tracking#23
Conversation
…ance YAML feeder with field tracking - Implemented `toml_field_tracking_test.go` to validate TOML configuration feeding and field tracking. - Created `unified_catalog_integration_test.go` to test environment variable precedence and field tracking across multiple feeders. - Enhanced `yaml.go` to support field tracking during YAML feeding, allowing detailed tracking of field populations. - Introduced `field_tracker_bridge.go` to adapt between main package and feeders package field tracker interfaces. - Added `user_scenario_test.go` to demonstrate and verify user scenarios involving database DSN configuration with instance-aware environment variables.
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive field-tracking across all configuration feeders, integrates a unified environment catalog for consistent OS and .env precedence, and introduces extensive tests covering TOML, YAML, JSON, and environment-based feeding scenarios.
- Extend all feeders with
SetFieldTrackerand record detailedFieldPopulationevents - Introduce
EnvCatalogfor unified environment variable management and integrate it into feeders - Add new tests (
toml_field_tracking_test.go,unified_catalog_integration_test.go,user_scenario_test.go, etc.) to validate field tracking, precedence, and user scenarios
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| user_scenario_test.go | Fix how field populations are retrieved from the tracker |
| feeders/affixed_env.go | Missing import for the cast package when converting env values |
| feeders/yaml.go | Large, complex feeder logic handling both normal and tracked feeds |
| config_provider.go | Reflection-based SetFieldTracker injection in AddFeeder |
Comments suppressed due to low confidence (3)
feeders/yaml.go:15
- [nitpick] The
YamlFeederimplementation is over 400 lines in a single file and mixes parsing, reflection, and tracking logic. Consider refactoring into smaller helper modules (e.g., separate parsers, trackers, and setters) to improve readability and maintainability.
feeder.Yaml
user_scenario_test.go:137
- DefaultFieldTracker does not expose a public
FieldPopulationsfield; usetracker.GetFieldPopulations()to retrieve recorded populations.
populations := tracker.FieldPopulations
feeders/affixed_env.go:196
- The code uses
cast.FromTypebut thecastpackage is not imported; add an import such asgithub.com/spf13/castor use another conversion approach.
convertedValue, _ := cast.FromType(envValue, field.Type())
…wrappers - Removed unused error wrapper functions for JSON and TOML feeders. - Updated JSON, TOML, and YAML feeders to use a consistent approach for feeding data, regardless of field tracking state. - Enhanced error handling in YAML feeder for better clarity on conversion issues. - Added comprehensive tests to ensure consistent behavior across different feeder types (YAML, JSON, TOML). - Introduced a new consistency test to verify that feeders produce the same results with and without field tracking. - Improved logging capabilities for debugging purposes in YAML feeder.
…e .env file permissions for security
Copilot AI
added a commit
that referenced
this pull request
Aug 24, 2025
* Initial plan * Implement route-level feature flag support in reverseproxy module Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix linting errors: remove extra blank lines and handle write errors in tests Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
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.
toml_field_tracking_test.goto validate TOML configuration feeding and field tracking.unified_catalog_integration_test.goto test environment variable precedence and field tracking across multiple feeders.yaml.goto support field tracking during YAML feeding, allowing detailed tracking of field populations.field_tracker_bridge.goto adapt between main package and feeders package field tracker interfaces.user_scenario_test.goto demonstrate and verify user scenarios involving database DSN configuration with instance-aware environment variables.