Skip to content
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

Fix bug with resource data offset in FreeSpaceModifier introduced in #505 #569

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

alchzh
Copy link
Collaborator

@alchzh alchzh commented Jan 13, 2025

One sentence summary of this PR (This should go in the CHANGELOG!)
Fix bug with resource data offset in free_space.py introduced in #505. (No changelog necessary, fixes a bug recently introduced)

Link to Related Issue(s)

Please describe the changes in your request.

  • Fix a typo where (await resource.get_data_range_within_parent()).start was accidentally replaced with (await parent.get_data_range_within_parent()).start in FreeSpaceModifier
  • Change the free space modifier tests to use a child memoryregion with non-zero offset to catch this bug in the future.

Anyone you think should look at this, specifically?

@alchzh alchzh requested review from rbs-jacob and whyitfor January 13, 2025 16:44
Copy link
Contributor

@whyitfor whyitfor left a comment

Choose a reason for hiding this comment

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

Thanks for catching this. Please see my suggestions -- they mainly revolve around making this test case a little easier to understand.

While I agree that this doesn't require a separate change log entry, i wonder if we should update the existing one to list both 505 and 509? @rbs-jacob, we should probably have a standard approach to things like this.

ofrak_core/test_ofrak/components/test_free_space.py Outdated Show resolved Hide resolved
ofrak_core/test_ofrak/components/test_free_space.py Outdated Show resolved Hide resolved
ofrak_core/test_ofrak/components/test_free_space.py Outdated Show resolved Hide resolved
@whyitfor whyitfor added this to the 3.3.0 Release milestone Jan 14, 2025
@alchzh alchzh requested a review from whyitfor January 14, 2025 16:43
@rbs-jacob
Copy link
Member

While I agree that this doesn't require a separate change log entry, i wonder if we should update the existing one to list both 505 and 509? @rbs-jacob, we should probably have a standard approach to things like this.

I'm in favor of standardizing on listing all relevant PRs for a changelog entry. I'll make a PR that updates the contributor guidelines accordingly to codify this.

Copy link
Contributor

@whyitfor whyitfor left a comment

Choose a reason for hiding this comment

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

@alchzh, per #569 (comment), can you update the CHANGELOG to list this PR in addition to 505?

Other than that this looks good to me, feel free to merge in once the CHANGELOG is updated and you are ready.

@rbs-jacob rbs-jacob removed their request for review January 14, 2025 17:42
@whyitfor whyitfor merged commit 0a630ea into master Jan 15, 2025
4 checks passed
@whyitfor whyitfor deleted the fix/free-space-typo branch January 15, 2025 13:50
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