Skip to content

Commit

Permalink
feat docs: fix typos
Browse files Browse the repository at this point in the history
Tests: протестировано CI
commit_hash:d85e2530ad4391b27b0d9badf011d0094db7b9ce
  • Loading branch information
apolukhin committed Dec 17, 2024
1 parent f5d4cef commit 785aa1b
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
storages::postgres::ClusterHostType::kSlave,
// Query is converted into a prepared statement. Subsequent requests
// send only parameters in a binary form and meta information is
// discarded on the DB side, significantly saving network bandwith.
// discarded on the DB side, significantly saving network bandwidth.
"SELECT value FROM key_value_table WHERE key=$1", key
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ClientImpl::ClientImpl(const USERVER_NAMESPACE::chaotic::openapi::client::Config
auto r = http_client_.CreateRequest();
SerializeRequest(request, r);
ApplyConfig(r, command_control, config_);
{# TODO: apply extentions #}
{# TODO: apply extensions #}
auto response = r.perform();
return {{ op.cpp_namespace() }}::ParseResponse(*response);
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/server/http/http2_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ class Http2ResponseWriter final {
if (headers.find(USERVER_NAMESPACE::http::headers::kContentType) == end) {
header_writer.AddKeyValue(USERVER_NAMESPACE::http::headers::kContentType, kDefaultContentType);
}
std::string_view content_lenght_header{USERVER_NAMESPACE::http::headers::kContentLength};
std::string_view content_length_header{USERVER_NAMESPACE::http::headers::kContentLength};
for (const auto& [key, value] : headers) {
if (key == content_lenght_header) {
if (key == content_length_header) {
continue;
}
header_writer.AddKeyValue(key, value);
Expand Down
2 changes: 1 addition & 1 deletion grpc/tests/tests/service_multichannel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace tests {

/// Sets up a mini gRPC server using a single default-constructed service
/// implementation. Will create the client with number of connections
/// dependening on the UTEST_P parameter value.
/// depending on the UTEST_P parameter value.
template <typename GrpcService>
// NOLINTNEXTLINE(fuchsia-multiple-inheritance)
class ServiceFixtureMultichannel : public ::testing::Test,
Expand Down
4 changes: 2 additions & 2 deletions kafka/include/userver/kafka/offset_range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ namespace kafka {
/// @brief Represents the range of offsets for certain topic.
struct OffsetRange final {
/// @brief The low watermark offset. It indicates the earliest available offset in Kafka.
/// @note low offset is guaranteed to be commited
/// @note low offset is guaranteed to be committed
std::uint32_t low{};

/// @brief The high watermark offset. It indicates the next offset that will be written in Kafka.
/// @note high offset is not required to be commited yet
/// @note high offset is not required to be committed yet
std::uint32_t high{};
};

Expand Down
2 changes: 1 addition & 1 deletion kafka/src/kafka/impl/producer_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ProducerImpl final {
/// @brief Callback called on each succeeded/failed message delivery.
/// @param message represents the delivered (or not) message. Its `_private`
/// field contains and `opaque` argument, which was passed to
/// `rd_kafka_producev`, i.e. the Promise which must be setted to notify
/// `rd_kafka_producev`, i.e. the Promise which must be set to notify
/// waiter about the delivery.
void DeliveryReportCallback(const rd_kafka_message_s* message) const;

Expand Down
2 changes: 1 addition & 1 deletion kafka/tests/consumer_kafkatest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ UTEST_F_MT(ConsumerTest, OneConsumerPartitionOffsets, 2) {
);
EXPECT_EQ(offset_range.low, 0u);

// Note that offset is not yet commited, just fetched
// Note that offset is not yet committed, just fetched
if (msg.GetPartition() != kFirstPartition) {
EXPECT_EQ(offset_range.high, 1u);
} else {
Expand Down
2 changes: 1 addition & 1 deletion libraries/grpc-reflection/library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project-alt-names:
description: library with reflection implementation

maintainers:
- Common componets
- Common components

libraries:
- userver-core
4 changes: 2 additions & 2 deletions libraries/grpc-reflection/proto/reflection.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ message ExtensionRequest {
message ServerReflectionResponse {
string valid_host = 1;
ServerReflectionRequest original_request = 2;
// The server set one of the following fields accroding to the message_request
// The server set one of the following fields according to the message_request
// in the request.
oneof message_response {
// This message is used to answer file_by_filename, file_containing_symbol,
Expand All @@ -83,7 +83,7 @@ message ServerReflectionResponse {
// that were previously sent in response to earlier requests in the stream.
FileDescriptorResponse file_descriptor_response = 4;

// This message is used to answer all_extension_numbers_of_type requst.
// This message is used to answer all_extension_numbers_of_type request.
ExtensionNumberResponse all_extension_numbers_response = 5;

// This message is used to answer list_services request.
Expand Down
4 changes: 2 additions & 2 deletions postgresql/src/storages/postgres/exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ InvalidParserCategory::InvalidParserCategory(
UnknownBufferCategory::UnknownBufferCategory(std::string_view context, Oid type_oid)
: ResultSetError(fmt::format(
"Query {} doesn't have a parser. Database type {} and it was not retrieved in C++ code as a corresponding "
"C++ type. Refer to the 'Supported data types' in the documentation to find a propper C++ type.",
"C++ type. Refer to the 'Supported data types' in the documentation to find a proper C++ type.",
context,
impl::OidPrettyPrint(type_oid)
)),
Expand All @@ -249,7 +249,7 @@ UnknownBufferCategory::UnknownBufferCategory(
)
: ResultSetError(fmt::format(
"Database type {} and it is not representable as a C++ type '{}' within a C++ composite '{}'. Refer to "
"the 'Supported data types' in the documentation to find a propper C++ type.",
"the 'Supported data types' in the documentation to find a proper C++ type.",
impl::OidPrettyPrint(type_oid),
cpp_field_type,
cpp_composite_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ UTEST_P(PostgreConnection, UnknownBufferCategoryExceptionReadability) {
storages::postgres::UnknownBufferCategory,
"Database type is 'tsquery' (oid: 3615) and it is not representable as a C++ type 'int' within a C++ composite "
"'PairForUnknownBufferCategoryExceptionReadabilityTest'. Refer to the 'Supported data types' in the "
"documentation to find a propper C++ type."
"documentation to find a proper C++ type."
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ UTEST_P(PostgreConnection, UnknownParserExceptionReadability) {
storages::postgres::UnknownBufferCategory,
"Query result set field `tsquery` doesn't have a parser. Database type is 'tsquery' (oid: 3615) and it was not "
"retrieved in C++ code as a corresponding C++ type. Refer to the 'Supported data types' in the documentation "
"to find a propper C++ type."
"to find a proper C++ type."
);
}

Expand Down
2 changes: 1 addition & 1 deletion samples/s3api/src/s3api_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace samples {

/// [s3_sample_component]

// This component is not required to create S3 api client. It is used for demonstation
// This component is not required to create S3 api client. It is used for demonstration
// purposes only.
class S3ApiSampleComponent : public components::LoggableComponentBase {
public:
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/en/landing.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) {
storages::postgres::ClusterHostType::kSlave,
// Query is converted into a prepared statement. Subsequent requests
// send only parameters in a binary form and meta information is
// discarded on the DB side, significantly saving network bandwith.
// discarded on the DB side, significantly saving network bandwidth.
"SELECT value FROM key_value_table WHERE key=$1", key
);

Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/en/userver/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ yaml
log-level: WARNING
```

Logging per line and file can be overriden at runtime using @ref USERVER_LOG_DYNAMIC_DEBUG dynamic config.
Logging per line and file can be overridden at runtime using @ref USERVER_LOG_DYNAMIC_DEBUG dynamic config.


### Dynamic change of the logging level
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/test_start_with_testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PG_SERVICE_PID=$!
${BUILD_SYSTEM} start-userver-samples-hello_service &
HELLO_SERVICE_PID=$!

# Disable exitting on error
# Disable exiting on error
set +e

while ! curl --max-time 1 'http://localhost:8080/hello'; do
Expand Down
2 changes: 1 addition & 1 deletion testsuite/pytest_plugins/pytest_userver/plugins/caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def query_caches(
return staged, actions

def commit_staged(self, staged: typing.Dict[str, typing.Any]) -> None:
"""Apply recently commited state."""
"""Apply recently committed state."""
self._context.update(staged)


Expand Down
22 changes: 11 additions & 11 deletions testsuite/pytest_plugins/pytest_userver/plugins/dynamic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ def is_empty(self) -> bool:

class _Changelog:
timestamp: datetime.datetime
commited_entries: typing.List[_ChangelogEntry]
committed_entries: typing.List[_ChangelogEntry]
staged_entry: _ChangelogEntry

def __init__(self):
self.timestamp = datetime.datetime.fromtimestamp(
0, datetime.timezone.utc,
)
self.commited_entries = []
self.committed_entries = []
self.staged_entry = _ChangelogEntry.new(
timestamp=self.service_timestamp(), previous=None,
)
Expand All @@ -126,14 +126,14 @@ def next_timestamp(self) -> str:
return self.service_timestamp()

def commit(self) -> _ChangelogEntry:
"""Commit staged changed if any and return last commited entry."""
"""Commit staged changed if any and return last committed entry."""
entry = self.staged_entry
if entry.has_changes or not self.commited_entries:
if entry.has_changes or not self.committed_entries:
self.staged_entry = _ChangelogEntry.new(
timestamp=self.next_timestamp(), previous=entry,
)
self.commited_entries.append(entry)
return self.commited_entries[-1]
self.committed_entries.append(entry)
return self.committed_entries[-1]

def get_updated_since(
self,
Expand All @@ -157,7 +157,7 @@ def _get_updated_since(
return values, []
dirty_keys = set()
last_known_state = {}
for entry in reversed(self.commited_entries):
for entry in reversed(self.committed_entries):
if entry.timestamp > updated_since:
dirty_keys.update(entry.dirty_keys)
else:
Expand Down Expand Up @@ -187,14 +187,14 @@ def rollback(self, defaults: ConfigDict):
self._do_rollback(defaults)

def _do_rollback(self, defaults: ConfigDict):
if not self.commited_entries:
if not self.committed_entries:
return

maybe_dirty = set()
for entry in self.commited_entries:
for entry in self.committed_entries:
maybe_dirty.update(entry.dirty_keys)

last = self.commited_entries[-1]
last = self.committed_entries[-1]
last_state = last.state
dirty_keys = set()
reverted = {}
Expand All @@ -210,7 +210,7 @@ def _do_rollback(self, defaults: ConfigDict):
dirty_keys=dirty_keys,
prev_state={},
)
self.commited_entries = [entry]
self.committed_entries = [entry]
self.staged_entry = _ChangelogEntry(
timestamp=self.staged_entry.timestamp,
dirty_keys=dirty_keys.copy(),
Expand Down
2 changes: 1 addition & 1 deletion testsuite/pytest_plugins/pytest_userver/plugins/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def readlines(
for line, position in _raw_line_reader(
self.path, self.position, eof_handler=eof_handler,
):
# userver does not give any gurantees about log file encoding
# userver does not give any guarantees about log file encoding
line = line.decode(encoding='utf-8', errors='backslashreplace')
if not first_skipped:
first_skipped = True
Expand Down
2 changes: 1 addition & 1 deletion testsuite/pytest_plugins/pytest_userver/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class RegisteredTrx:
will throw an exception.
If you don't need a fault injection anymore (e.g. you want to test
a successfull retry), you may call `disable_trx_failure` afterwards.
a successful retry), you may call `disable_trx_failure` afterwards.
Example usage:
@snippet integration_tests/tests/test_trx_failure.py fault injection
Expand Down

0 comments on commit 785aa1b

Please sign in to comment.