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

use pydantic for config validation #455

Merged
merged 47 commits into from
Dec 28, 2020
Merged

use pydantic for config validation #455

merged 47 commits into from
Dec 28, 2020

Conversation

ITProKyle
Copy link
Collaborator

@ITProKyle ITProKyle commented Sep 16, 2020

Why This Is Needed

resolves #431

What Changed

Added

  • added data classes for Runway & CFNgin configurations including dedicated data classes for each complex component
    • provide type checking when parsing the configuration files and through processing as values are resolved
    • transforms data as needed
    • can be used to export a JSON schema
    • raises a detailed error pinpointing invalid configuration

Changed

  • CFNgin package cache directory is now ./.runway/cache
  • the runway config class is now runway.config.RunwayConfig
  • renamed and moved Runway config component classes
  • Runway config component (definition) classes no longer handle data parsing and instead use a data class
    • they now act as a higher level API for working with the config
  • the CFNgin config class is now runway.config.CfnginConfig
    • renamed and moved config component classes
  • updated documentation for Runway and CFNgin configuration

Removed

  • removed support for stacker* keys in the CFNgin config
  • removed support for legacy environment mappings in fields such as env_vars, parameters, etc
  • removed support for legacy environments usage (functionally that was moved to parameters)

@ITProKyle ITProKyle added the feature Request or pull request for a new feature label Sep 16, 2020
@ITProKyle ITProKyle self-assigned this Sep 16, 2020
@ITProKyle ITProKyle added the breaking Issue or PR is for a breaking change. Bug is a breaking bug with no workaround. label Oct 1, 2020
@ITProKyle ITProKyle marked this pull request as ready for review October 1, 2020 22:35
@ITProKyle
Copy link
Collaborator Author

I am going to merge this in for now to reduce the amount of rebase catchup required to keep it up to date.

After having used used this branch and the schema it produces for a while, I think it is at least vary close to feature parity if not already there. (I fixed some of the annoyances I had noticed)

If any future changes are needed, they can be addressed individually.

@ITProKyle ITProKyle merged commit 20d88e2 into rackspace:v2 Dec 28, 2020
@ITProKyle ITProKyle deleted the feature/pydantic-config branch December 28, 2020 20:52
ITProKyle added a commit that referenced this pull request Jan 15, 2021
ITProKyle added a commit that referenced this pull request Feb 16, 2021
ITProKyle added a commit that referenced this pull request Feb 25, 2021
ITProKyle added a commit that referenced this pull request Mar 22, 2021
@ITProKyle ITProKyle added the changelog:major Major change resulting in a major release label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Issue or PR is for a breaking change. Bug is a breaking bug with no workaround. changelog:major Major change resulting in a major release feature Request or pull request for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TODO] investigate using pydantic for config file validation & implement if appropriate
1 participant