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

MM-61311: Version-controlled config samples #839

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

agarciamontoro
Copy link
Member

@agarciamontoro agarciamontoro commented Oct 25, 2024

Summary

This is something I've been wanting to do for a long while: having a set of config files that can be used as starter packs for other workflows. We already use two sets internally, which are the ones that I've uploaded here: the config files for release testing of the tool itself, and the config files for the performance comparisons of Mattermost new releases.

Some questions you may have:

  • Why now? Because we've spent soooo much time these days trying to merge old config files with new fields for the latest release testing.
  • And why TOML and not JSON? Because I want to start using it. The possibility of having comments in the files is incredibly useful, and just that outweighs other minor annoyances (e.g. TOML arrays, which are a bit weird). In any case, it's an experiment. If it doesn't work, we can revert back to JSON, no strings attached.
  • And how are we going to keep these updated? Well, I'm going to add a step now in both the release testing and performance comparison playbooks to review these before we run the corresponding tests.

Ah! I've also added sample files in the config/ directory for the coordinator and comparison files in TOML, which we were missing. This is unrelated to the original goal of the PR.

Ticket Link

https://mattermost.atlassian.net/browse/MM-61311

@agarciamontoro agarciamontoro added the 2: Dev Review Requires review by a core committer label Oct 25, 2024
Copy link
Contributor

@streamer45 streamer45 left a comment

Choose a reason for hiding this comment

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

Looks good, some non-blocking questions:

  • What's needed for the tool to pick up a .toml vs a .json?
  • What happens if both files are present?
  • Should we surface (e.g. log) which config file is loaded at any given time?

Copy link
Member

@agnivade agnivade left a comment

Choose a reason for hiding this comment

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

Nice!

@agarciamontoro
Copy link
Member Author

After double-checking with @fmartingr:

What's needed for the tool to pick up a .toml vs a .json?

One needs to pass its path as CLI flags. The flags are a bit eclectic: config for the deployer, ltconfig for config, comparison-config for the comparison and coordinator-config for the coordinator. I still need to test all this works.

What happens if both files are present?

By default it picks JSON. If the config flags are passed, those have priority.

Should we surface (e.g. log) which config file is loaded at any given time?

Maybe that's a good idea. Were you thinking of logging the whole thing? Just the path?

@streamer45
Copy link
Contributor

After double-checking with @fmartingr:

What's needed for the tool to pick up a .toml vs a .json?

One needs to pass its path as CLI flags. The flags are a bit eclectic: config for the deployer, ltconfig for config, comparison-config for the comparison and coordinator-config for the coordinator. I still need to test all this works.

Thanks

What happens if both files are present?

By default it picks JSON. If the config flags are passed, those have priority.

👍

Should we surface (e.g. log) which config file is loaded at any given time?

Maybe that's a good idea. Were you thinking of logging the whole thing? Just the path?

I think the path would be sufficient.

@agarciamontoro
Copy link
Member Author

I think the path would be sufficient.

Doing this in a future PR

@agarciamontoro agarciamontoro merged commit efe47c9 into master Nov 11, 2024
1 check passed
@agarciamontoro agarciamontoro deleted the MM-61311.version-control.config.samples branch November 11, 2024 09:11
@agarciamontoro agarciamontoro added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants