Skip to content

Commit 1769d69

Browse files
allow deprecated calls to prost (#6251)
* allow deprecated calls to prost * fix deprecation warning with tempdir * add curl apparently required for rdkafka now
1 parent d614082 commit 1769d69

File tree

8 files changed

+8
-2
lines changed

8 files changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
if: always() && steps.modified.outputs.rust_src == 'true'
144144
run: |
145145
sudo apt-get update
146-
sudo apt-get -y install protobuf-compiler
146+
sudo apt-get -y install protobuf-compiler libcurl4-openssl-dev
147147
- name: Setup nightly Rust Toolchain (for rustfmt)
148148
if: steps.modified.outputs.rust_src == 'true'
149149
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master

quickwit/quickwit-proto/src/types/doc_mapping_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ impl prost::Message for DocMappingUid {
9999
)?;
100100
let ulid_bytes: [u8; ULID_SIZE] =
101101
buffer.try_into().map_err(|buffer: Vec<u8>| {
102+
#[allow(deprecated)]
102103
prost::DecodeError::new(format!(
103104
"invalid length for field `doc_mapping_uid`, expected 16 bytes, got {}",
104105
buffer.len()

quickwit/quickwit-proto/src/types/doc_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ impl prost::Message for DocUid {
9898
)?;
9999
let ulid_bytes: [u8; ULID_SIZE] =
100100
buffer.try_into().map_err(|buffer: Vec<u8>| {
101+
#[allow(deprecated)]
101102
prost::DecodeError::new(format!(
102103
"invalid length for field `doc_uid`, expected 16 bytes, got {}",
103104
buffer.len()

quickwit/quickwit-proto/src/types/index_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ impl prost::Message for IndexUid {
137137
)?;
138138
let ulid_bytes: [u8; ULID_SIZE] =
139139
buffer.try_into().map_err(|buffer: Vec<u8>| {
140+
#[allow(deprecated)]
140141
prost::DecodeError::new(format!(
141142
"invalid length for field `incarnation_id`, expected 16 bytes, got {}",
142143
buffer.len()

quickwit/quickwit-proto/src/types/pipeline_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ impl prost::Message for PipelineUid {
102102
)?;
103103
let ulid_bytes: [u8; ULID_SIZE] =
104104
buffer.try_into().map_err(|buffer: Vec<u8>| {
105+
#[allow(deprecated)]
105106
prost::DecodeError::new(format!(
106107
"invalid length for field `pipeline_uid`, expected 16 bytes, got {}",
107108
buffer.len()

quickwit/quickwit-proto/src/types/position.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ impl prost::Message for Position {
273273
error
274274
},
275275
)?;
276+
#[allow(deprecated)]
276277
let byte_string = ByteString::try_from(value)
277278
.map_err(|_| DecodeError::new("position is not valid UTF-8"))?;
278279
*self = Self::from(byte_string);

quickwit/quickwit-proto/src/types/shard_id.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl prost::Message for ShardId {
104104
error
105105
},
106106
)?;
107+
#[allow(deprecated)]
107108
let byte_string = ByteString::try_from(value)
108109
.map_err(|_| DecodeError::new("shard_id is not valid UTF-8"))?;
109110
*self = Self(byte_string);

quickwit/quickwit-storage/src/storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl DownloadTempFile {
181181
}
182182

183183
pub async fn persist(mut self) -> io::Result<u64> {
184-
TempPath::from_path(&self.temp_filepath).persist(&self.target_filepath)?;
184+
TempPath::try_from_path(&self.temp_filepath)?.persist(&self.target_filepath)?;
185185
self.has_attempted_deletion = true;
186186
let num_bytes = std::fs::metadata(&self.target_filepath)?.len();
187187
Ok(num_bytes)

0 commit comments

Comments
 (0)