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

Fix some typos #2355

Closed
wants to merge 1 commit into from
Closed
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 crates/fluvio-controlplane/src/requests/register_spu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl RegisterSpuResponse {

pub fn failed_registration() -> Self {
RegisterSpuResponse {
error_code: ErrorCode::SpuRegisterationFailed,
error_code: ErrorCode::SpuRegistrationFailed,
error_message: None,
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/fluvio-dataplane-protocol/src/error_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub enum ErrorCode {
SpuError,
#[fluvio(tag = 1001)]
#[error("failed to register an SPU")]
SpuRegisterationFailed,
SpuRegistrationFailed,
#[fluvio(tag = 1002)]
#[error("the SPU is offline")]
SpuOffline,
Expand Down Expand Up @@ -106,7 +106,7 @@ pub enum ErrorCode {
// Stream Fetch error
#[fluvio(tag = 3002)]
#[error("the fetch session was not found")]
FetchSessionNotFoud,
FetchSessionNotFound,

// Legacy SmartModule errors
#[deprecated(since = "0.9.13")]
Expand Down Expand Up @@ -291,7 +291,7 @@ mod test {

// Spu errors
assert_tag!(ErrorCode::SpuError, 1000, 0);
assert_tag!(ErrorCode::SpuRegisterationFailed, 1001, 0);
assert_tag!(ErrorCode::SpuRegistrationFailed, 1001, 0);
assert_tag!(ErrorCode::SpuOffline, 1002, 0);
assert_tag!(ErrorCode::SpuNotFound, 1003, 0);
assert_tag!(ErrorCode::SpuAlreadyExists, 1004, 0);
Expand All @@ -309,7 +309,7 @@ mod test {
assert_tag!(ErrorCode::PartitionNotLeader, 3001, 0);

// Stream Fetch error
assert_tag!(ErrorCode::FetchSessionNotFoud, 3002, 0);
assert_tag!(ErrorCode::FetchSessionNotFound, 3002, 0);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-sc/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl TlsConfig {
info!("using tls anonymous access");
TlsAcceptor::builder().map_err(|err| err.into_io_error())?
})
.with_certifiate_and_key_from_pem_files(server_crt_path, server_key_path)
.with_certificate_and_key_from_pem_files(server_crt_path, server_key_path)
.map_err(|err| err.into_io_error())?;

Ok(builder.build())
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-sc/src/controllers/partitions/Test.MD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
- Statu's Replica should have value of leader

* Follower up:
- Partition with 2 replicas.
- Partition with 2 replicas.
- Shutdown all SPU. This should set partition status to ElectionNoLeaderFounded
- Bring up follower SPU.
- It should do election (doesn't)
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-sc/src/k8/controllers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ mod k8_operator {
global_ctx.spgs().clone(),
);
});
whitelist!(config, "k8_managed_connector_delpoyment", {
whitelist!(config, "k8_managed_connector_deployment", {
ManagedConnectorDeploymentController::start(
global_ctx.managed_connectors().clone(),
managed_connector_deployments_ctx,
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-sc/src/k8/objects/spu_k8_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ mod extended {
.with_context(ctx),
)
}
Err(err) => Err(K8ConvertError::KeyConvertionError(IoError::new(
Err(err) => Err(K8ConvertError::KeyConversionError(IoError::new(
ErrorKind::InvalidData,
format!("error converting metadata: {:#?}", err),
))),
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-sc/src/stores/spu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ mod health_check {
}

pub fn listener(&self) -> OffsetChangeListener {
self.event.change_listner()
self.event.change_listener()
}

/// update health check
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/config/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl SpuOpt {
} else {
TlsAcceptor::builder().map_err(|err| err.into_io_error())?
})
.with_certifiate_and_key_from_pem_files(server_crt_path, server_key_path)
.with_certificate_and_key_from_pem_files(server_crt_path, server_key_path)
.map_err(|err| err.into_io_error())?;

Ok(Some(builder.build()))
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/replication/follower/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ mod inner {
let (mut sink, mut stream) = socket.split();
let mut api_stream = stream.api_stream::<FollowerPeerRequest, FollowerPeerApiEnum>();

let mut event_listener = self.group.events.change_listner();
let mut event_listener = self.group.events.change_listener();

// starts initial sync
debug!("performing initial offset sync to leader");
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/replication/leader/spu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub struct FollowerSpuPendingUpdates {

impl FollowerSpuPendingUpdates {
pub fn listener(&self) -> OffsetChangeListener {
self.event.change_listner()
self.event.change_listener()
}

/// add replica to be updated
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/services/public/offset_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub async fn handle_offset_update(
);
OffsetUpdateStatus {
session_id: update.session_id,
error: ErrorCode::FetchSessionNotFoud,
error: ErrorCode::FetchSessionNotFound,
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-spu/src/services/public/stream_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl StreamFetchHandler {
if let Some(leader_state) = ctx.leaders_state().get(&replica).await {
let (stream_id, offset_publisher) =
ctx.stream_publishers().create_new_publisher().await;
let consumer_offset_listener = offset_publisher.change_listner();
let consumer_offset_listener = offset_publisher.change_listener();

spawn(async move {
if let Err(err) = StreamFetchHandler::fetch(
Expand Down
4 changes: 2 additions & 2 deletions crates/fluvio-spu/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ where
/// listen to offset based on isolation
pub fn offset_listener(&self, isolation: &Isolation) -> OffsetChangeListener {
match isolation {
Isolation::ReadCommitted => self.hw.change_listner(),
Isolation::ReadUncommitted => self.leo.change_listner(),
Isolation::ReadCommitted => self.hw.change_listener(),
Isolation::ReadUncommitted => self.leo.change_listener(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ mod convert {
debug!("skipping: {} {}", S::LABEL, obj.metadata.name);
continue;
}
K8ConvertError::KeyConvertionError(err) => return Err(err.into()),
#[allow(deprecated)]
K8ConvertError::KeyConversionError(err)
| K8ConvertError::KeyConvertionError(err) => return Err(err.into()),
K8ConvertError::Other(err) => return Err(err.into()),
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ where
}

pub async fn delete(&self, meta: K8MetaItem) -> Result<(), C::MetadataClientError> {
use k8_metadata_client::k8_types::options::{DeleteOptions, PropogationPolicy};
use k8_metadata_client::k8_types::options::{DeleteOptions, PropagationPolicy};

let options = if S::DELETE_WAIT_DEPENDENTS {
Some(DeleteOptions {
propagation_policy: Some(PropogationPolicy::Foreground),
propagation_policy: Some(PropagationPolicy::Foreground),
..Default::default()
})
} else {
Expand Down
7 changes: 5 additions & 2 deletions crates/fluvio-stream-model/src/store/k8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ where
/// skip, this object, it is not considered valid object
Skip(K8Obj<S>),
/// Converting error
#[deprecated = "Replace by KeyConversionError"]
KeyConvertionError(IoError),
/// Converting error
KeyConversionError(IoError),
Other(IoError),
}

Expand Down Expand Up @@ -192,13 +195,13 @@ where
Ok(MetadataStoreObject::new(key, local_spec, local_status)
.with_context(MetadataContext::new(ctx_item, owner)))
}
Err(err) => Err(K8ConvertError::KeyConvertionError(IoError::new(
Err(err) => Err(K8ConvertError::KeyConversionError(IoError::new(
ErrorKind::InvalidData,
format!("error converting metadata: {:#?}", err),
))),
}
}
Err(err) => Err(K8ConvertError::KeyConvertionError(IoError::new(
Err(err) => Err(K8ConvertError::KeyConversionError(IoError::new(
ErrorKind::InvalidData,
format!("error converting key: {:#?}", err),
))),
Expand Down
9 changes: 7 additions & 2 deletions crates/fluvio-types/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ pub mod offsets {
self.update(self.current_value() + 1);
}

#[deprecated = "Replace by change_listener"]
morenol marked this conversation as resolved.
Show resolved Hide resolved
pub fn change_listner(self: &Arc<Self>) -> OffsetChangeListener {
self.change_listener()
}

pub fn change_listener(self: &Arc<Self>) -> OffsetChangeListener {
OffsetChangeListener::new(self.clone())
}
}
Expand Down Expand Up @@ -238,7 +243,7 @@ mod test {
#[fluvio_future::test]
async fn test_offset_listener_no_wait() {
let publisher = OffsetPublisher::shared(0);
let listener = publisher.change_listner();
let listener = publisher.change_listener();
let status = Arc::new(AtomicBool::new(false));

TestController::start(listener, status.clone());
Expand All @@ -265,7 +270,7 @@ mod test {
#[fluvio_future::test]
async fn test_offset_listener_wait() {
let publisher = OffsetPublisher::shared(0);
let listener = publisher.change_listner();
let listener = publisher.change_listener();
let status = Arc::new(AtomicBool::new(false));

TestController::start(listener, status.clone());
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio/src/config/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ cfg_if::cfg_if! {
info!("Using anonymous TLS");
let builder = TlsConnector::builder()
.map_err(|err| IoError::new(IoErrorKind::InvalidData, err))?
.with_hostname_vertification_disabled()
.with_hostname_verification_disabled()
.map_err(|err| IoError::new(IoErrorKind::InvalidData, err))?;

let connector: TlsAnonymousConnector = builder.build().into();
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio/src/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ where
);

let publisher = OffsetPublisher::shared(0);
let mut listener = publisher.change_listner();
let mut listener = publisher.change_listener();

// update stream with received offsets
spawn(async move {
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mod context {
&0
}

/// always return true, this should be changed
/// always return tru, this should be changed
fn is_newer(&self, _another: &Self) -> bool {
true
}
Expand Down