-
Notifications
You must be signed in to change notification settings - Fork 524
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
Remove host container migration #4324
Open
vyaghras
wants to merge
12
commits into
bottlerocket-os:develop
Choose a base branch
from
vyaghras:remove_host_container_migration
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8caaf6d
apiclient: update README to document version 2 of /tx API
vyaghras 407a79b
Upgrade Bottlerocket version to 1.33.0
vyaghras e27ea8b
migrations: Remove metadata and data AWS Admin
vyaghras b6c6839
migrations: Remove metadata and data AWS Control
vyaghras 114aed6
migrations: Remove metadata and data public Admin
vyaghras 666df78
migrations: Remove metadata and data public Control
vyaghras 65c8097
migrations: Remove all metadata and weak settings on downgrade
vyaghras 885d618
shared-defaults: change aws host container source setting-generator t…
vyaghras a58877f
shared-defaults: add strength metadata for public host container
vyaghras 656b55d
common_migrations: add new migrations to handle settings-generator as…
vyaghras fa9ffb6
models: Add Strength enum and Setting-Generator struct
vyaghras cbe0f74
datastore: changes to match changes in Core kit datastore
vyaghras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
sources/settings-migrations/v1.33.0/aws-remove-schnauzer-admin/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "aws-remove-schnauzer-admin" | ||
version = "0.1.0" | ||
authors = ["Shikha Vyaghra <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
edition = "2021" | ||
publish = false | ||
# Don't rebuild crate just because of changes to README. | ||
exclude = ["README.md"] | ||
|
||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
migration-helpers.workspace = true |
24 changes: 24 additions & 0 deletions
24
sources/settings-migrations/v1.33.0/aws-remove-schnauzer-admin/src/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use migration_helpers::common_migrations::RemoveSchnauzerMigration; | ||
use migration_helpers::{migrate, Result}; | ||
use std::process; | ||
|
||
const OLD_ADMIN_CTR_CMDLINE: &str = | ||
"schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.16'"; | ||
|
||
/// We bumped the version of the default admin container | ||
fn run() -> Result<()> { | ||
migrate(RemoveSchnauzerMigration { | ||
setting: "settings.host-containers.admin.source", | ||
old_cmdline: OLD_ADMIN_CTR_CMDLINE, | ||
}) | ||
} | ||
|
||
// Returning a Result from main makes it print a Debug representation of the error, but with Snafu | ||
// we have nice Display representations of the error, so we wrap "main" (run) and print any error. | ||
// https://github.com/shepmaster/snafu/issues/110 | ||
fn main() { | ||
if let Err(e) = run() { | ||
eprintln!("{}", e); | ||
process::exit(1); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: inaccurate comment.