flashers: fix handling of local file#371
Conversation
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
WalkthroughThe change refactors the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (7)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| file_hash = self._sha256_file(src_operator, src_path) | ||
| if to_storage.hash(src_path.name) == file_hash: | ||
| self.logger.info(f"Image {src_path} already exists in storage with matching hash, skipping") | ||
| if to_storage.exists(filename) and to_storage.hash(filename) == file_hash: |
There was a problem hiding this comment.
ooh , good catch!
I probably tried it with a file I already had uploaded previously.
|
|
||
| # last attempt to check if the image in storage matches the known metadata | ||
| metadata, metadata_json = self._create_metadata_and_json(src_operator, src_path) | ||
| metadata_file = src_path.name + ".metadata" |
There was a problem hiding this comment.
I need to work on moving all this logic to the opendal storage driver directly :D
Summary by CodeRabbit