-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[ENH] ScoutLogs issues a HEAD if possible. #5376
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -67,6 +67,10 @@ impl LocalStorage { | |||||||||||||||||||||||||||
Ok((bytes, Some(etag))) | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
pub async fn confirm_same(&self, _: &str, _: &ETag) -> Result<bool, StorageError> { | ||||||||||||||||||||||||||||
Err(StorageError::NotImplemented) | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
Comment on lines
+70
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [TestCoverage] This
Suggested change
⚡ Committable suggestion Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. |
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
pub async fn put_bytes( | ||||||||||||||||||||||||||||
&self, | ||||||||||||||||||||||||||||
key: &str, | ||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -153,6 +153,10 @@ impl ObjectStore { | |||||||||||||||||||||
Err(StorageError::NotImplemented) | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
pub async fn confirm_same(&self, _: &str, _: &ETag) -> Result<bool, StorageError> { | ||||||||||||||||||||||
Err(StorageError::NotImplemented) | ||||||||||||||||||||||
} | ||||||||||||||||||||||
Comment on lines
+156
to
+158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [BestPractice] Similar to the
Suggested change
⚡ Committable suggestion Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. |
||||||||||||||||||||||
|
||||||||||||||||||||||
pub async fn get_parallel(&self, key: &str) -> Result<Arc<Vec<u8>>, StorageError> { | ||||||||||||||||||||||
let meta = self.object_store.head(&Path::from(key)).await?; | ||||||||||||||||||||||
let file_size = meta.size; | ||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[BestPractice]
The use of
unwrap_or_default()
here effectively treats any error during manifest verification as a cache miss. While this is a safe fallback, it hides potentially important errors (e.g., network issues, S3 permissions) that could indicate a deeper problem. Logging these errors would improve observability and help diagnose issues that might cause frequent cache misses.⚡ Committable suggestion
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Context for Agents