Skip to content

(feature): Enable ScalingEngine in mtar deployment #3797

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

Open
wants to merge 180 commits into
base: main
Choose a base branch
from

Conversation

bonzofenix
Copy link
Contributor

No description provided.

bonzofenix and others added 30 commits March 13, 2025 16:04
 • Centralize database configuration logic into db.ConfigureDb and db.ConfigureStoredProcedureDb
 • Remove individual configurePolicyDb and configureBindingDb functions
 • Move DatabaseConfig struct to a new models.go file in the db package
 • Update calls to database configuration in both API and metrics forwarder to use the new centralized functions
 • Change db.ConfigureDb calls to vcapReader.ConfigureDb for PolicyDb and BindingDb.
 • Introduce vcapReader.ConfigureStoredProcedureDb for handling stored procedure database configuration.
 • Remove ConfigureStoredProcedureDb and ConfigureDb from db/helper.go.
 • Update tests to reflect changes in database configuration methods.
 - Import the "time" package in db.go for time.Duration usage.
 - Introduce DatabaseConfig struct in db.go with connection parameters.
 - Delete models.go, moving DatabaseConfig to db.go.
 • Implement configuration loading for stored procedure database in config.go
 • Enable tests for stored procedure database when cred_helper_impl is set to default in config_test.go
…ting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…tgenerator module with configuration and routes, and set default instances to 0 for new modules in autoscaler app.
… eventgenerator

 • Refactor LoadConfig to read from file and VCAP services
 • Add error variables for configuration loading issues
 • Introduce loadYamlFile and loadVcapConfig helper functions
 • Update tests with new configuration loading logic and VCAP reader mocks
 • Remove unused imports and adjust defaultConfig function signature
 - Correct grammar in test descriptions for database configuration calls.
 - Change cred_helper_impl to 'stored_procedure' for storedProcedure_db service.
 - Remove redundant storedProcedureConfig and read directly from VCAP services.
 - Remove outdated tests related to default cred_helper_impl for storedProcedure_db.
… eventgenerator

 • Refactor LoadConfig to read from file and VCAP services
 • Add error variables for configuration loading issues
 • Introduce loadYamlFile and loadVcapConfig helper functions
 • Update tests with new configuration loading logic and VCAP reader mocks
 • Remove unused imports and adjust defaultConfig function signature
…enerator config

 • Implement ConfigureDb method in VCAPConfiguration to set database URL
 • Use ConfigureDb to configure PolicyDb and AppMetricsDb in eventgenerator
 • Add AppMetricsDb constant to db package
 • Update tests to reflect changes in database configuration methods
…ventgenerator

 • Update DBConfig and DatabaseConfig struct references to use pointers in eventgenerator_suite_test.go and main.go.
 • Change struct field names from DB to Db and PolicyDB to PolicyDb, AppMetricDB to AppMetricDb to align with Go naming conventions.
 - Update eventgenerator configuration to use pointers for optional structs and add JSON tags
 - Modify eventgenerator test suite to handle CF environment variables and dynamically set config
 - Adjust eventgenerator main.go to load and validate config with VCAP services support
 - Implement ToJSON method in config.go for marshaling configuration to JSON
 - Change environment variable keys in mta.tpl.yaml to uppercase and use placeholders for Go version
 • Introduce eventgenerator_health_password in build-extension-file.sh for event generator health checks.
 • Add eventgenerator-config resource with basic auth password in mta.tpl.yaml.
 • Implement configureMetricsCollectorTLS function in eventgenerator/config/config.go to load TLS configuration for the metrics collector from logcache-client.
 • Update eventgenerator unit tests to reflect new TLS configuration loading.
 • Remove scaling engine and metric collector TLS configs from default_config.json, streamline cf_server and db configurations.
 • Add logcache-client as a user-provided service in mta.tpl.yaml.
 - Introduce pool configuration to manage eventgenerator node count and index
 - Remove commented-out XFCC and route registration configurations
 - Implement instance index and space/org GUID retrieval in configutil
 - Adjust eventgenerator main.go to use new pool configuration
 - Update tests and default JSON config to reflect changes
@bonzofenix bonzofenix changed the title 885 enable scalingengine via mtar (feature): Enable ScalingEngine in mtar deployment May 16, 2025
@bonzofenix bonzofenix force-pushed the 885-enable-scalingengine-via-mtar branch 13 times, most recently from 5242e4a to 85a4f24 Compare May 21, 2025 09:37
@bonzofenix bonzofenix force-pushed the 885-enable-scalingengine-via-mtar branch from 678356b to 6ab0a78 Compare May 21, 2025 09:46
@bonzofenix bonzofenix force-pushed the 877-enable-operator-via-mtar branch from 8172aa9 to 8e9e6ab Compare May 29, 2025 14:03
bonzofenix and others added 2 commits May 29, 2025 16:05
 • Remove unused databaseNames declaration from top-level scope
 • Declare databaseNames within the relevant BeforeEach block in tests
Base automatically changed from 877-enable-operator-via-mtar to main May 29, 2025 15:55
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
26.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-to-cf it tells that the PRs are related to deploy to cf migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant