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

feat: support config versioning #1225

Merged
merged 7 commits into from
Dec 20, 2022
Merged

feat: support config versioning #1225

merged 7 commits into from
Dec 20, 2022

Conversation

markphelps
Copy link
Collaborator

@markphelps markphelps commented Dec 15, 2022

adds optional version number support to our config

* main:
  feat: deprecate ui enabled (#1227)
  chore: move migrator back to main so we dont need it in grpc server (#1224)
  chore: refactor deprecations checking to own method (#1226)
@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 16, 2022
@markphelps markphelps changed the title feat(wip): add config version feat: support config versioning Dec 16, 2022
@markphelps markphelps marked this pull request as ready for review December 16, 2022 16:40
@markphelps markphelps requested a review from a team as a code owner December 16, 2022 16:40
@@ -173,6 +181,15 @@ func bindEnvVars(v *viper.Viper, prefix string, field reflect.StructField) {
v.MustBindEnv(key)
}

func (c *Config) validate() (err error) {
if c.Version != "" {
if strings.TrimSpace(c.Version) != "1.0" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id like to make this smarter in the future, potentially using some form of semver parsing (to two places x.x), wyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that could be good. Like a way to ratchet up minor version changes in the config.

Copy link
Member

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Very valuable going forward.

@markphelps markphelps merged commit 292fdac into main Dec 20, 2022
@markphelps markphelps deleted the config-version branch December 20, 2022 16:03
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.

2 participants