8000 Replace lstrip with substring to resolve #685 by jorenkoyen · Pull Request #686 · linode/linode-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Replace lstrip with substring to resolve #685 #686

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

Conversation

jorenkoyen
Copy link
Contributor

📝 Description

This PR fixes the issue described in #685.
It replaces the existing lstrip call to extract the object prefix with a substring based on the length of the bucket name.

✔️ How to Test

Tested full objects module and new test case which tries to reproduce the case described in #685.

  • make MODULE=obj testint
  • make MODULE=obj TEST_CASE=test_obj_single_file_single_bucket_with_prefix_ltrim testint

@jorenkoyen jorenkoyen requested a review from a team as a code owner November 27, 2024 22:00
@jorenkoyen jorenkoyen requested review from zliang-akamai and yec-akamai and removed request for a team November 27, 2024 22:00
@jorenkoyen
Copy link
Contributor Author

I took the liberty of opening up a PR myself as it is only a small fix. I hope the integration test is up to spec as I'm not a day to day python developer.

Copy link
Contributor
@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Thank you for putting up the fix!

@jorenkoyen jorenkoyen force-pushed the bugfix/lstrip_incorrect_for_bucket_prefix branch from a823ae9 to 6575720 Compare December 7, 2024 12:18
Copy link
Member
@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@zliang-akamai
Copy link
Member
zliang-akamai commented Dec 9, 2024

Thank you for your contribution! We will merge it after bumping the Python version because removeprefix requires 3.9.

See #698

@zliang-akamai zliang-akamai linked an issue Dec 9, 2024 that may be closed by this pull request
@zliang-akamai zliang-akamai merged commit d4224ff into linode:dev Dec 9, 2024
10 checks passed
@yec-akamai yec-akamai added the bugfix for any bug fixes in the changelog. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix for any bug fixes in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Lstrip is incorrect when removing bucket from prefix
3 participants
0