Skip to content

fix: cast from db connections with non decoded output - #664

Merged
abrookins merged 3 commits into
redis:mainfrom
ivanbelenky:fix/647
Apr 9, 2025
Merged

abrookins merged 3 commits into
redis:mainfrom
ivanbelenky:fix/647

Conversation

@ivanbelenky

@ivanbelenky ivanbelenky commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor

Describe your changes

As stated on this issue, the connections objects may be set without decoding. Therefore, the stored hash can be a bytes object. This is an issue that clashes with

  • schema_out_of_date false positive: different type will force inequality checks to always be True
  • IndexMigration expects previous_hash to be of str type

This small check and reassignment for stored_hash, fixes the issue and enables correct detection.

@ivanbelenky ivanbelenky changed the title cast from db connections with non decoded output fix: cast from db connections with non decoded output Oct 25, 2024
@ivanbelenky

ivanbelenky commented Oct 28, 2024 •

Copy link
Copy Markdown
Contributor Author

@sav-norem @bsbodden (saw slorello in PR #663 tagging you, so Ill repeat the pattern)

I am all ears for suggestions &| clarifications on this one

@XChikuX XChikuX left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faced this issue myself for bytes storage.

I used the same fix in my production code, so Looks Good to Me

@abrookins

Copy link
Copy Markdown
Collaborator

Let's try it. 👍

@abrookins abrookins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants