Skip to content

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

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

Merged
merged 3 commits into from
Apr 9, 2025

Conversation

ivanbelenky
Copy link
Contributor

@ivanbelenky ivanbelenky commented Oct 25, 2024

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
Copy link
Contributor Author

ivanbelenky commented Oct 28, 2024

@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

Copy link

@XChikuX XChikuX left a comment

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
Collaborator

Let's try it. 👍

Copy link
Collaborator

@abrookins abrookins left a comment

Choose a reason for hiding this comment

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

LGTM

@abrookins abrookins merged commit 233615b into redis:main Apr 9, 2025
10 checks passed
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