Skip to content

Commit 1b995a7

Browse files
bazel: Reformat for clang-format-22
1 parent cd3a9f6 commit 1b995a7

360 files changed

Lines changed: 3369 additions & 3394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/transform-sdk/cpp/examples/schema_registry.cc

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ constexpr std::string_view schema_def = R"({
4141

4242
int main() {
4343
sr_client = sr::new_client();
44-
if (auto res = sr_client->create_schema(
45-
"avro-value",
46-
sr::schema::new_avro(
47-
std::string{schema_def.data(), schema_def.size()}));
48-
!res.has_value()) {
44+
if (
45+
auto res = sr_client->create_schema(
46+
"avro-value",
47+
sr::schema::new_avro(
48+
std::string{schema_def.data(), schema_def.size()}));
49+
!res.has_value()) {
4950
return 0;
5051
}
5152
redpanda::on_record_written(do_transform);
@@ -67,8 +68,9 @@ do_transform(redpanda::write_event event, redpanda::record_writer* writer) {
6768
return id_e.error();
6869
}
6970
std::optional<sr::schema> raw_schema;
70-
if (auto rs_e = sr_client->lookup_schema_by_id(id.value());
71-
rs_e.has_value()) {
71+
if (
72+
auto rs_e = sr_client->lookup_schema_by_id(id.value());
73+
rs_e.has_value()) {
7274
raw_schema.emplace(std::move(rs_e).value());
7375
} else {
7476
return rs_e.error();
@@ -77,17 +79,19 @@ do_transform(redpanda::write_event event, redpanda::record_writer* writer) {
7779
// auto schema = avro::schema::parse_str(raw_schema.value().schema());
7880

7981
std::optional<sr::subject_schema> latest_schema;
80-
if (auto latest_e = sr_client->lookup_latest_schema("avro-value");
81-
latest_e.has_value()) {
82+
if (
83+
auto latest_e = sr_client->lookup_latest_schema("avro-value");
84+
latest_e.has_value()) {
8285
latest_schema.emplace(std::move(latest_e).value());
8386
} else {
8487
return latest_e.error();
8588
}
8689

8790
std::optional<sr::subject_schema> latest_direct;
88-
if (auto latest_e = sr_client->lookup_schema_by_version(
89-
"avro-value", latest_schema->version);
90-
latest_e.has_value()) {
91+
if (
92+
auto latest_e = sr_client->lookup_schema_by_version(
93+
"avro-value", latest_schema->version);
94+
latest_e.has_value()) {
9195
latest_direct.emplace(std::move(latest_e).value());
9296
} else {
9397
return latest_e.error();

src/transform-sdk/cpp/include/redpanda/transform_sdk.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct simple_named_type {
3939

4040
private:
4141
friend bool operator==(
42-
const simple_named_type<type, Tag>&, const simple_named_type<type, Tag>&)
43-
= default;
42+
const simple_named_type<type, Tag>&,
43+
const simple_named_type<type, Tag>&) = default;
4444
type _val;
4545
};
4646

@@ -319,8 +319,8 @@ struct subject_schema {
319319
schema_version version;
320320
schema_id id;
321321

322-
friend bool operator==(const subject_schema&, const subject_schema&)
323-
= default;
322+
friend bool
323+
operator==(const subject_schema&, const subject_schema&) = default;
324324
};
325325

326326
/**
@@ -332,8 +332,8 @@ class schema_registry_client {
332332
schema_registry_client(const schema_registry_client&) = delete;
333333
schema_registry_client& operator=(const schema_registry_client&) = delete;
334334
schema_registry_client(schema_registry_client&&) noexcept = delete;
335-
schema_registry_client& operator=(schema_registry_client&&) noexcept
336-
= delete;
335+
schema_registry_client&
336+
operator=(schema_registry_client&&) noexcept = delete;
337337
virtual ~schema_registry_client() = default;
338338

339339
/**
@@ -347,8 +347,7 @@ class schema_registry_client {
347347
*/
348348
[[nodiscard]] virtual std::expected<subject_schema, std::error_code>
349349
lookup_schema_by_version(
350-
std::string_view subject, schema_version version) const
351-
= 0;
350+
std::string_view subject, schema_version version) const = 0;
352351

353352
/**
354353
* Look up the latest version of a schema (by subject)

src/v/cloud_io/basic_cache_service_api.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class basic_cache_service_api {
9696
public:
9797
basic_cache_service_api() = default;
9898
basic_cache_service_api(const basic_cache_service_api&) = default;
99-
basic_cache_service_api& operator=(const basic_cache_service_api&)
100-
= default;
99+
basic_cache_service_api&
100+
operator=(const basic_cache_service_api&) = default;
101101
basic_cache_service_api(basic_cache_service_api&&) = default;
102102
basic_cache_service_api& operator=(basic_cache_service_api&&) = default;
103103
virtual ~basic_cache_service_api() = default;
@@ -110,8 +110,7 @@ class basic_cache_service_api {
110110
virtual ss::future<std::optional<cache_item_stream>> get_stream(
111111
std::filesystem::path key,
112112
size_t read_buffer_size = default_read_buffer_size,
113-
unsigned int read_ahead = default_read_ahead)
114-
= 0;
113+
unsigned int read_ahead = default_read_ahead) = 0;
115114

116115
/// Get a range of a cached value as a stream if it exists
117116
///
@@ -125,8 +124,7 @@ class basic_cache_service_api {
125124
uint64_t offset,
126125
uint64_t length,
127126
size_t read_buffer_size = default_read_buffer_size,
128-
unsigned int read_ahead = default_read_ahead)
129-
= 0;
127+
unsigned int read_ahead = default_read_ahead) = 0;
130128

131129
/// Add new value to the cache, overwrite if it's already exist
132130
///
@@ -142,8 +140,7 @@ class basic_cache_service_api {
142140
ss::input_stream<char>& data,
143141
basic_space_reservation_guard<Clock>& reservation,
144142
size_t write_buffer_size = default_write_buffer_size,
145-
unsigned int write_behind = default_write_behind)
146-
= 0;
143+
unsigned int write_behind = default_write_behind) = 0;
147144

148145
/// \brief Checks if the value is cached
149146
///

src/v/cloud_io/cache_service.cc

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ ss::future<> cache::clean_up_at_start() {
207207
auto filepath_to_remove = file_item.path;
208208

209209
// delete only tmp files that are left from previous RedPanda run
210-
if (std::string_view(filepath_to_remove)
211-
.ends_with(cache_tmp_file_extension)) {
210+
if (
211+
std::string_view(filepath_to_remove)
212+
.ends_with(cache_tmp_file_extension)) {
212213
try {
213214
co_await delete_file_and_empty_parents(filepath_to_remove);
214215
deleted_bytes += file_item.size;
@@ -574,8 +575,9 @@ ss::future<> cache::trim(
574575
exhaustive_result.deleted_size, size_to_delete);
575576
objects_to_delete -= std::min(
576577
exhaustive_result.deleted_count, objects_to_delete);
577-
if ((size_to_delete > undeletable_bytes
578-
|| objects_to_delete > undeletable_objects)) {
578+
if (
579+
(size_to_delete > undeletable_bytes
580+
|| objects_to_delete > undeletable_objects)) {
579581
const auto msg = fmt::format(
580582
"trim: failed to free sufficient space in exhaustive trim, {} "
581583
"bytes, {} objects still require deletion",
@@ -720,8 +722,9 @@ ss::future<cache::trim_result> cache::do_trim(
720722
}
721723

722724
// skip tmp files since someone may be writing to it
723-
if (std::string_view(file_stat.path)
724-
.ends_with(cache_tmp_file_extension)) {
725+
if (
726+
std::string_view(file_stat.path)
727+
.ends_with(cache_tmp_file_extension)) {
725728
return true;
726729
}
727730

@@ -1226,8 +1229,8 @@ ss::future<> cache::put(
12261229
probe.put_ended();
12271230
});
12281231
auto filename = normal_key_path.filename();
1229-
if (std::string_view(filename.native())
1230-
.ends_with(cache_tmp_file_extension)) {
1232+
if (
1233+
std::string_view(filename.native()).ends_with(cache_tmp_file_extension)) {
12311234
throw std::invalid_argument(
12321235
fmt::format(
12331236
"Cache file key {} is ending with tmp extension {}.",
@@ -1601,9 +1604,10 @@ cache::trim_carryover(uint64_t delete_bytes, uint64_t delete_objects) {
16011604
/ std::filesystem::relative(
16021605
std::filesystem::path(file_stat.path), _cache_dir);
16031606

1604-
if (auto estimate = _access_time_tracker.get(rel_path.native());
1605-
estimate.has_value()
1606-
&& estimate->time_point() != file_stat.access_time) {
1607+
if (
1608+
auto estimate = _access_time_tracker.get(rel_path.native());
1609+
estimate.has_value()
1610+
&& estimate->time_point() != file_stat.access_time) {
16071611
vlog(
16081612
log.trace,
16091613
"carryover file {} was accessed ({}) since the last trim ({}), "

src/v/cloud_io/recursive_directory_walker.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ struct walk_accumulator {
4545
if (entry.type && entry.type == ss::directory_entry_type::regular) {
4646
size_t file_size{0};
4747
std::chrono::system_clock::time_point atime;
48-
if (const auto tracker_entry = tracker.get(entry_path);
49-
tracker_entry.has_value()) {
48+
if (
49+
const auto tracker_entry = tracker.get(entry_path);
50+
tracker_entry.has_value()) {
5051
file_size = tracker_entry->size;
5152
atime = tracker_entry->time_point();
5253
} else {

src/v/cloud_io/remote_api.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ class remote_api {
8080
const cloud_storage_clients::bucket_name& bucket,
8181
const cloud_storage_clients::object_key& path,
8282
retry_chain_node& parent,
83-
std::string_view object_type)
84-
= 0;
83+
std::string_view object_type) = 0;
8584

8685
/// \brief Upload small objects to bucket. Suitable for uploading simple
8786
/// strings, does not check for leadership before upload like the segment
@@ -95,8 +94,7 @@ class remote_api {
9594
const reset_input_stream& reset_str,
9695
lazy_abort_source& lazy_abort_source,
9796
const std::string_view stream_label,
98-
std::optional<size_t> max_retries)
99-
= 0;
97+
std::optional<size_t> max_retries) = 0;
10098

10199
virtual ss::future<download_result> download_stream(
102100
transfer_details transfer_details,
@@ -105,8 +103,7 @@ class remote_api {
105103
bool acquire_hydration_units,
106104
std::optional<cloud_storage_clients::http_byte_range> byte_range
107105
= std::nullopt,
108-
std::function<void(size_t)> throttle_metric_ms_cb = {})
109-
= 0;
106+
std::function<void(size_t)> throttle_metric_ms_cb = {}) = 0;
110107
};
111108

112109
} // namespace cloud_io

src/v/cloud_io/tests/s3_imposter.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@ struct s3_imposter_fixture::content_handler {
225225
request.content_length,
226226
request._method);
227227

228-
if (auto maybe_resp = fixture.should_fail_request(ri);
229-
maybe_resp.has_value()) {
228+
if (
229+
auto maybe_resp = fixture.should_fail_request(ri);
230+
maybe_resp.has_value()) {
230231
vlog(
231232
fixt_log.debug,
232233
"S3 imposter request {} - {} - {} marked as failed, response {}",

src/v/cloud_roles/apply_aws_credentials.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ static std::string_view sha_for_verb(boost::beast::http::verb verb) {
6060
}
6161

6262
apply_aws_credentials::apply_aws_credentials(aws_credentials credentials)
63-
: _signature{credentials.service, credentials.region, credentials.access_key_id, credentials.secret_access_key}
63+
: _signature{
64+
credentials.service,
65+
credentials.region,
66+
credentials.access_key_id,
67+
credentials.secret_access_key}
6468
, _session_token{credentials.session_token} {}
6569

6670
std::error_code

src/v/cloud_roles/apply_credentials.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class apply_credentials {
2626
/// token added as an authorization header, to multiple headers added
2727
/// along with signing of the request payload.
2828
virtual std::error_code
29-
add_auth(http::client::request_header& header) const
30-
= 0;
29+
add_auth(http::client::request_header& header) const = 0;
3130

3231
/// Changes the authentication key and secret or the oauth token
3332
/// associated with the credentials. The concept of temporary

src/v/cloud_roles/auth_refresh_bg_op.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ uint64_t auth_refresh_bg_op::token_refresh_count() const noexcept {
124124
}
125125

126126
cloud_roles::credentials auth_refresh_bg_op::build_static_credentials() const {
127-
if (auto creds = std::get_if<cloud_roles::credentials>(&_source_config);
128-
creds) {
127+
if (
128+
auto creds = std::get_if<cloud_roles::credentials>(&_source_config);
129+
creds) {
129130
return *creds;
130131
} else {
131132
throw std::runtime_error(

0 commit comments

Comments
 (0)