Back to all reviewers

Stable configuration management

kubeflow/kubeflow
Based on 2 comments
TSX

Always ensure configuration values are managed consistently and sourced from stable locations. 1. Use defined constants instead of string literals for configuration values to improve maintainability and reduce errors when values change

Configurations TSX

Reviewer Prompt

Always ensure configuration values are managed consistently and sourced from stable locations.

  1. Use defined constants instead of string literals for configuration values to improve maintainability and reduce errors when values change
  2. Source configuration files from stable branches or tagged releases rather than potentially unstable sources like master
  3. Clearly document when configuration values are environment-specific or will be overridden

Example:

// โŒ Poor configuration management
enum ConfigPath {
  V05 = 'v0.5-branch/config/kfctl_config.yaml',
  V06 = 'master/bootstrap/config/kfctl_gcp_iap.yaml'  // Unstable source
}

const versionList = ['v0.7.0', 'v0.6.0'];  // Hard-coded literals

// โœ… Better configuration management
enum Version {
  V05 = 'v0.5.0',
  V06 = 'v0.6.0',
  V07 = 'v0.7.0'
}

enum ConfigPath {
  V05 = 'v0.5-branch/config/kfctl_config.yaml',
  V06 = 'v0.6-branch/config/kfctl_gcp_iap.0.6.yaml'  // Stable source
}

// Use constants and document environment-specific values
const versionList = [
  Version.V07,  // For local testing, will be overwritten by env vars
  Version.V06
];
2
Comments Analyzed
TSX
Primary Language
Configurations
Category

Source Discussions