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

trivial: Fix various typos and spelling errors #835

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/resource-agent/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::provider::ProviderError;
use std::error::Error;
use std::fmt::{Debug, Display, Formatter};

/// This is the error type returned by an [`Agent`] object. When receiving this error tyoe you will
/// This is the error type returned by an [`Agent`] object. When receiving this error type you will
/// typically want to display it and exit your main function with a non-zero exit code.
#[derive(Debug)]
pub enum AgentError {
Expand Down
4 changes: 2 additions & 2 deletions agent/test-agent-cli/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub(crate) type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Snafu)]
#[snafu(visibility(pub(crate)))]
pub(crate) enum Error {
#[snafu(display("An error occured while creating archive: {}", source))]
#[snafu(display("An error occurred while creating archive: {}", source))]
Archive { source: std::io::Error },

#[snafu(display("Unable to communicate with Kuberenetes: {}", source))]
#[snafu(display("Unable to communicate with Kubernetes: {}", source))]
Client { source: test_agent::ClientError },

#[snafu(display("Configuration missing from the test secret data"))]
Expand Down
2 changes: 1 addition & 1 deletion agent/test-agent-cli/src/terminate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Terminate {
async fn keep_running(&self, k8s_client: &DefaultClient) -> bool {
match k8s_client.keep_running().await {
Err(e) => {
error!("Unable to communicate with Kuberenetes: '{}'", e);
error!("Unable to communicate with Kubernetes: '{}'", e);
// If we can't communicate Kubernetes, its safest to
// stay running in case some debugging is needed.
true
Expand Down
2 changes: 1 addition & 1 deletion agent/test-agent/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ where
async fn keep_running(&self) -> bool {
match self.client.keep_running().await {
Err(e) => {
error!("Unable to communicate with Kuberenetes: '{}'", e);
error!("Unable to communicate with Kubernetes: '{}'", e);
// If we can't communicate Kubernetes, its safest to
// stay running in case some debugging is needed.
true
Expand Down
2 changes: 1 addition & 1 deletion agent/test-agent/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub(crate) enum InnerError {
source: tokio::time::error::Elapsed,
},

#[snafu(display("An error occured while creating archive: {}", source))]
#[snafu(display("An error occurred while creating archive: {}", source))]
Archive { source: std::io::Error },

#[snafu(display("Info Client: {}", source))]
Expand Down
2 changes: 1 addition & 1 deletion agent/test-agent/src/k8s_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) enum InnerError {
source: testsys_model::clients::Error,
},

#[snafu(display("An error occured while creating a `TempDir`: {}", source))]
#[snafu(display("An error occurred while creating a `TempDir`: {}", source))]
TempDirCreate { source: std::io::Error },
}

Expand Down
2 changes: 1 addition & 1 deletion agent/test-agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub trait Client: Sized {
async fn send_test_update(&self, results: TestResults) -> Result<(), Self::E>;

/// Add a TestResults object to the CRDs array of TestResults without signaling that the test
/// is complete. This is used to send TestResults when some failures have occured and we are
/// is complete. This is used to send TestResults when some failures have occurred and we are
/// going to re-run the failed test cases.
async fn send_test_results(&self, results: TestResults) -> Result<(), Self::E>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async fn wait_for_successful_run_instances(
if let Err(SdkError::ServiceError(service_error)) = &run_instance_result {
if matches!(&service_error.err().code(), Some("InvalidParameterValue")) {
warn!(
"An error occured while trying to run instances '{}'. Retrying in 10s.",
"An error occurred while trying to run instances '{}'. Retrying in 10s.",
service_error.err()
);
tokio::time::sleep(Duration::from_secs(10)).await;
Expand Down Expand Up @@ -604,7 +604,7 @@ async fn deregister_ecs_container_instances(
let mut container_instances = Vec::new();
// Kick off ECS instance deregistration
for instance_id in &memo.instance_ids {
// Find the containter instance ID associated with the EC2 instance ID
// Find the container instance ID associated with the EC2 instance ID
if let Ok(list_output) = ecs_client
.list_container_instances()
.cluster(&memo.cluster_name)
Expand Down
4 changes: 2 additions & 2 deletions bottlerocket/agents/src/bin/ecs-workload-agent/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async fn wait_for_cluster_ready(

/// Retrieves the task_definition and revision of a matching test task definition. If the
/// task definition doesn't exist, it will be created. If the task definition exists but
/// the container defintions doesn't match the current settings in the config, a new task
/// the container definitions doesn't match the current settings in the config, a new task
/// definition revision will be created.
async fn create_or_find_task_definition(
ecs_client: &aws_sdk_ecs::Client,
Expand Down Expand Up @@ -392,7 +392,7 @@ async fn find_task_rev(
Err(Error::TaskDefinitionMissing)
}

/// Compares an indivdual task definition to see if its settings match the test settings.
/// Compares an individual task definition to see if its settings match the test settings.
fn is_matching_definition(test_def: &WorkloadTest, task_def: &TaskDefinition) -> bool {
if let Some(containers) = task_def.container_definitions() {
if containers.len() != 1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ spec:
## How to set up EKS Anywhere cluster for use as management cluster

EKS Anywhere recommends using a separate management cluster for managing different vSphere clusters.
EKS Anywhere's "Getting Started" instructions has a [section on setting up an inital management cluster](https://anywhere.eks.amazonaws.com/docs/getting-started/production-environment/vsphere-getstarted/#create-an-initial-cluster).
EKS Anywhere's "Getting Started" instructions have a [section on setting up an initial management cluster](https://anywhere.eks.amazonaws.com/docs/getting-started/production-environment/vsphere-getstarted/#create-an-initial-cluster).

Once the management cluster created, you can base64-encode the kubeconfig for the management cluster and plug the value in the `mgmtClusterKubeconfigBase64` field of the Resource agent configuration.
4 changes: 2 additions & 2 deletions bottlerocket/agents/src/sonobuoy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ where
.for_each(|e| error!("Unable to send test update: {}", e));

error!(
"An error occured while serializing sonobuoy status: \n'{:?}'\n(This can happen if sonobuoy is not ready)\nWill try again in 30s",
"An error occurred while serializing sonobuoy status: \n'{:?}'\n(This can happen if sonobuoy is not ready)\nWill try again in 30s",
err
);
retries += 1;
Expand Down Expand Up @@ -606,7 +606,7 @@ mod test_sonobuoy {

#[test]
fn test_process_results_multiple_timeout_and_failure() {
// Failure takes precendence over timeout.
// Failure takes precedence over timeout.
let result =
process_sonobuoy_test_results(
&json!({
Expand Down
2 changes: 1 addition & 1 deletion cli/src/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Delete {
while let Some(delete) = stream
.try_next()
.await
.context("A deletion error occured")?
.context("A deletion error occurred")?
{
match delete {
DeleteEvent::Starting(crd) => println!("Starting delete for {}", crd.name()),
Expand Down
2 changes: 1 addition & 1 deletion docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The architecture diagram shows a user using the `testsys` CLI to create three CR

* Cluster Resource CRD represents an external Kubernetes cluster that needs to be created for testing.
* Instances Resource CRD represents Bottlerocket instances that will run as nodes in the external cluster.
* Sonobuoy Test CRD represents the desired test that will run agains the external cluster and nodes.
* Sonobuoy Test CRD represents the desired test that will run against the external cluster and nodes.

The controller sees these CRD instances and:

Expand Down
4 changes: 2 additions & 2 deletions model/src/clients/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub(crate) enum InnerError {
#[snafu(display("{}", source))]
ConfigSerde { source: ModelError },

#[snafu(display("An error occured while resolving the config: {}", what))]
#[snafu(display("An error occurred while resolving the config: {}", what))]
ConfigResolution { what: String },

#[snafu(display("Error serializing object '{}': {}", what, source))]
Expand Down Expand Up @@ -52,7 +52,7 @@ pub(crate) enum InnerError {
DuplicateFinalizer { finalizer: String },

#[snafu(display(
"An attempt was made to delete the non-existant finalizer '{}'",
"An attempt was made to delete the non-existent finalizer '{}'",
finalizer,
))]
DeleteMissingFinalizer { finalizer: String },
Expand Down
2 changes: 1 addition & 1 deletion model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub mod system;
mod test;
pub mod test_manager;

/// `CrdName` provides a way of determing which type of testsys object a name refers to.
/// `CrdName` provides a way of determining which type of testsys object a name refers to.
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum CrdName {
Test(String),
Expand Down
4 changes: 2 additions & 2 deletions model/src/test_manager/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl TestManager {
}
}

/// Asyncronously delete all objects in `deletion_order` and send each `DeleteEvent` to `tx`.
/// Asynchronously delete all objects in `deletion_order` and send each `DeleteEvent` to `tx`.
async fn async_deletion(
tx: &mut Sender<Result<DeleteEvent>>,
deletion_order: &mut TopologicalSort<CrdName>,
Expand Down Expand Up @@ -159,7 +159,7 @@ async fn async_deletion(
})?;
if let Some(resource) = resource {
// If the resource errored during deletion alert the user that a problem
// occured
// occurred
if resource
.status()
.map(|status| status.destruction.task_state == TaskState::Error)
Expand Down