Skip to content
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

ISAICP-5988: Command config cannot be overridden #135

Merged
merged 9 commits into from
Aug 17, 2022
Merged

Conversation

claudiu-cristea
Copy link
Contributor

@claudiu-cristea claudiu-cristea commented Jun 9, 2020

ISAICP-5988

Description

Each command class is able load configuration from a file by implementing AbstractCommands::getConfigurationFile() and returning a hardcoded file path. The method's docblock states:

/**
 * Path to YAML configuration file containing command defaults.
 */

But, unfortunately, these are not defaults because they cannot be overridden. Instead, the runner.yml.dist and runner.yml configs are overridden by values from the AbstractCommands::getConfigurationFile() file.

The first commit (1a4a840) of this PR proves the bug.

Proposal

  • Don't process early the tokens.
  • After commands from classes were discovered, merge config providers configuration on top of default configuration provided by commands and process the replacements.
  • This should happen before the dynamic commands discovery and that discovery should benefit from the whole processed configuration.

Change log

  • Added:
  • Changed:
  • Deprecated:
  • Removed:
  • Fixed:
  • Security:

Commands

N/A

@claudiu-cristea claudiu-cristea changed the title ISAICP-5988: Run-time config cannot be overriddeden ISAICP-5988: Command config cannot be overridden Jun 10, 2020
@claudiu-cristea claudiu-cristea added this to the 2.0-alpha1 milestone Jul 8, 2020
@geek-merlin
Copy link

It looks to me this is the same bug that i fixed in #157 via SelfProcessingRoboConfig. (There i thought i implemented a new feature that is needed as part of the base feature, but reading this, it looks like it's a bug that was there in the first place.)

@claudiu-cristea claudiu-cristea changed the base branch from master to 2.x June 4, 2022 09:34
@claudiu-cristea
Copy link
Contributor Author

claudiu-cristea commented Jun 4, 2022

@geek-merlin I wonder what it's your opinion regarding my approach.

@ademarco This is a but that affects our project. Could you, please, take a look? It needs 2 approvals. Will get one from our team (Thanks!)

@claudiu-cristea claudiu-cristea merged commit c727356 into 2.x Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants