hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

Feature: Moved all the connector config values into a seperate file

Open subhajit20 opened this issue 10 months ago • 2 comments

Type of Change

  • [ ] Bugfix
  • [x] New feature
  • [ ] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

  • Created a separate file called connector.toml
  • Added all the connector config value into connector.toml
  • #1109

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • [ ] I formatted the code cargo +nightly fmt --all
  • [ ] I addressed lints thrown by cargo clippy
  • [ ] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible
  • [ ] I added a CHANGELOG entry if applicable

subhajit20 avatar Apr 18 '24 14:04 subhajit20

Hi @subhajit20, There are few more changes required to complete this.

  • Since the connector configs are moved to a separate file now, changes need to be made to read these configs from the separate file. You can have a look at how the application config is read by having a look at this function https://github.com/juspay/hyperswitch/blob/9bf16b1a0787f9badb4a6decd38e3e5d69a3ea51/crates/router/src/configs/settings.rs#L650-L651

  • You have made the changes only to loadtest/development.toml This file is read when we are running the application in loadtest mode .There is another file which is read by the application during startup ( while running the application locally ), this file is development.toml

  • Once you have made the changes, you can check whether the configs are read by checking the startup config log line. This will be visible once you have run the cargo r command. Screenshot 2024-04-22 at 12 09 11 PM

Narayanbhat166 avatar Apr 22 '24 06:04 Narayanbhat166

Hi @subhajit20, There are few more changes required to complete this.

  • Since the connector configs are moved to a separate file now, changes need to be made to read these configs from the separate file. You can have a look at how the application config is read by having a look at this function https://github.com/juspay/hyperswitch/blob/9bf16b1a0787f9badb4a6decd38e3e5d69a3ea51/crates/router/src/configs/settings.rs#L650-L651
  • You have made the changes only to loadtest/development.toml This file is read when we are running the application in loadtest mode .There is another file which is read by the application during startup ( while running the application locally ), this file is development.toml
  • Once you have made the changes, you can check whether the configs are read by checking the startup config log line. This will be visible once you have run the cargo r command. Screenshot 2024-04-22 at 12 09 11 PM

I have created new config file for the develop startup as well, can you guide me what should I do right now? I am little confused

subhajit20 avatar Apr 29 '24 04:04 subhajit20