-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Pipeline TypeError: can only concatenate list (not "NoneType") to list Using Sou (#5518) #24
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -249,6 +249,33 @@ def test_get_processing_code_hash_s3_uri(self): | |
|
|
||
| assert result is None | ||
|
|
||
| def test_get_processing_code_hash_with_none_dependencies(self): | ||
| """Test get_processing_code_hash with None dependencies does not raise TypeError""" | ||
| with tempfile.TemporaryDirectory() as temp_dir: | ||
| code_file = Path(temp_dir, "script.py") | ||
| code_file.write_text("print('hello')") | ||
|
|
||
| result = get_processing_code_hash( | ||
| code=str(code_file), source_dir=temp_dir, dependencies=None | ||
| ) | ||
|
|
||
| assert result is not None | ||
| assert len(result) == 64 | ||
|
|
||
| def test_get_processing_code_hash_code_only_with_none_dependencies(self): | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: This test uses |
||
| """Test get_processing_code_hash with code only and None dependencies""" | ||
| with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f: | ||
| f.write("print('hello')") | ||
| temp_file = f.name | ||
|
|
||
| try: | ||
| result = get_processing_code_hash(code=temp_file, source_dir=None, dependencies=None) | ||
|
|
||
| assert result is not None | ||
| assert len(result) == 64 | ||
| finally: | ||
| os.unlink(temp_file) | ||
|
|
||
| def test_get_processing_code_hash_with_dependencies(self): | ||
| """Test get_processing_code_hash with dependencies""" | ||
| with tempfile.TemporaryDirectory() as temp_dir: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical bug in the diff: It appears the
if source_dir:line was removed (shown as- if source_dir:in the diff), but the indented block below it still expects that conditional guard. This would cause the code under the oldif source_dir:block to execute unconditionally, meaning whensource_dir=None, the function would attempturlparse(None)instead of falling through to the code-only path.The fix should be:
Please verify the diff is correct — the
if source_dir:line must be preserved. If this is a diff rendering issue, please confirm the actual file still contains the conditional.