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

Add 'set-migrations' subcommand to updata #756

Merged
merged 1 commit into from
Feb 21, 2020
Merged

Conversation

zmrow
Copy link
Contributor

@zmrow zmrow commented Feb 20, 2020

Issue number:
N/A

Description of changes:
This commit adds a 'set-migrations' subcommand to updata that will
copy the migrations section from a file to another file. This
subcommand replaces the add-migration and remove-migration
subcommands. It is meant to be used to take migrations data from
Release.toml and copy it to manifest.json.

Testing done:

  • Added new unit tests for new functionality
  • All unit tests continue to pass
  • Built image boots successfully

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@@ -80,6 +80,14 @@ pub struct Manifest {
pub datastore_versions: BTreeMap<SemVer, DataVersion>,
}

#[derive(Debug, Default, Serialize, Deserialize)]
pub struct Release {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not really keen on having this struct here, but it represents the best and easiest place to deal with ser/deserializing Release.toml data for now.

As we do a few more releases and get a better idea of how we're going to use this data I think it will move. But short-term, this will do the job.

This commit adds a 'set-migrations' subcommand to updata that will
copy the migrations section from a file to another file. This
subcommand replaces the `add-migration` and `remove-migration`
subcommands. It is meant to be used to take migrations data from
`Release.toml` and copy it to `manifest.json`.
@zmrow
Copy link
Contributor Author

zmrow commented Feb 20, 2020

Add comment suggested by @tjkirch

Copy link
Contributor

@sam-aws sam-aws left a comment

Choose a reason for hiding this comment

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

🐶

@zmrow zmrow removed the request for review from bcressey February 20, 2020 21:09
@zmrow zmrow merged commit a1d831a into develop Feb 21, 2020
@zmrow zmrow deleted the updata-set-migrations branch February 21, 2020 14:51
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.

None yet

3 participants