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

migration-helpers: ReplaceListMigration -> ReplaceListsMigration #1262

Merged

Conversation

etungsten
Copy link
Contributor

Issue number:
N/A

Description of changes:

ReplaceListMigration becomes ReplaceListsMigration.
ReplaceListsMigration now can handle multiple settings that contain lists to be replaced.

Testing done:
Unit tests updated and passes

Testing sysctl-subcommand migration:
Downgrade:

$ VARIANT=aws-k8s-1.17 cargo run -- --source-datastore ~/thar/testing/ds-test/current --target-datastore ~/thar/testing/ds-test/backward --backward

Changed value of 'services.sysctl.restart-commands' from ["/usr/bin/corndog sysctl"] to ["/usr/bin/corndog"] on downgrade
Found no 'services.sysctl.restart-commands' to change on downgrade

Forward:

$ VARIANT=aws-k8s-1.17 cargo run -- --source-datastore ~/thar/testing/ds-test/backward --target-datastore ~/thar/testing/ds-test/current --forward
Changed value of 'services.sysctl.restart-commands' from ["/usr/bin/corndog"] to ["/usr/bin/corndog sysctl"] on upgrade
Found no 'services.sysctl.restart-commands' to change on upgrade

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.

ReplaceListMigration becomes ReplaceListsMigration.
ReplaceListsMigration now can handle multiple settings that contain
lists to be replaced.
@etungsten
Copy link
Contributor Author

Push above addresses @tjkirch 's comments.
Unit tests still pass. sysctl migration still works as expected.

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

Nice work!

🥇

@etungsten etungsten merged commit 1ca6f0a into bottlerocket-os:develop Jan 6, 2021
@etungsten etungsten deleted the replace-lists-migration branch January 6, 2021 21:42
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.

3 participants