fix(prefect-gcp): prevent double-nesting in GcsBucket._resolve_path#20177
fix(prefect-gcp): prevent double-nesting in GcsBucket._resolve_path#20177
Conversation
When storage_block_id is null (e.g., context serialized to Ray workers), create_result_record() adds bucket_folder to storage_key via _resolve_path. Then write_path() calls _resolve_path again, causing double-nested paths like "results/results/abc123" instead of "results/abc123". Add duplicate-prefix check to _resolve_path, matching the existing check in _join_bucket_folder. Fixes #20174 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- fix .prefectignore content in test fixture (remove leading whitespace) - add filterwarnings to pyproject.toml to suppress upstream deprecation warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
remove extra disable_logging fixture and temporary_settings wrapper to match pattern used by prefect-aws and other integrations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
caa3a20 to
0d23491
Compare
fixes ephemeral server startup timeouts on Python 3.11+ with xdist workers see #16397 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| "ignore:'setName' deprecated:DeprecationWarning:httplib2", | ||
| "ignore:'setParseAction' deprecated:DeprecationWarning:httplib2", | ||
| "ignore:'addParseAction' deprecated:DeprecationWarning:httplib2", | ||
| "ignore:'leaveWhitespace' deprecated:DeprecationWarning:httplib2", | ||
| "ignore:'delimitedList' deprecated:DeprecationWarning:httplib2", | ||
| "ignore:GitWildMatchPattern .* is deprecated:DeprecationWarning:pathspec", | ||
| "ignore:You are using a Python version .* which Google will stop supporting:FutureWarning:google.api_core", | ||
| "ignore:codecs.open\\(\\) is deprecated:DeprecationWarning:coolname", |
There was a problem hiding this comment.
Would updating the versions of libraries these warnings are originating get rid of the warnings?
There was a problem hiding this comment.
defining pathspec specifically as a dep would fix the GitWildMatchPattern but for httplib2 and coolname no, it would not
There was a problem hiding this comment.
I meant updating the uv.lock for prefect-gcp specific libraries since I don't know the last time that was updated.
There was a problem hiding this comment.
yea, that's what i did locally. im saying that even with updating prefect-gcp to latest versions for the problematic packages, i still see the warnings. the only mediation i saw was upgrading pathspec fixes the GitWildMatchPattern warning, but the rest still warn on their newest versions
There was a problem hiding this comment.
actually i think pathspec is still warning even on the latest
|
when can we expect a release with the fix applied? |
closes #20174
this pr fixes the
GcsBucket._resolve_pathdouble-nesting bug that occurs whenstorage_block_idis null (e.g., when context is serialized to remote workers like Ray).changes
_resolve_path()to prevent double-nesting when path already starts withbucket_foldertest_push_to_gcsfixture that had broken.prefectignorepatterns due to leading whitespaceprior art
this is the same fix that was applied to
_join_bucket_folderin #18237 - the_resolve_pathmethod had the same bug but wasn't fixed at that time.reproduction script
🤖 Generated with Claude Code