Skip to content

fix: Pipeline TypeError: can only concatenate list (not "NoneType") to list Using Sou (#5518)#5679

Closed
aviruthen wants to merge 1 commit intoaws:masterfrom
aviruthen:fix/pipeline-typeerror-can-only-concatenate-list-not-5518-3
Closed

fix: Pipeline TypeError: can only concatenate list (not "NoneType") to list Using Sou (#5518)#5679
aviruthen wants to merge 1 commit intoaws:masterfrom
aviruthen:fix/pipeline-typeerror-can-only-concatenate-list-not-5518-3

Conversation

@aviruthen
Copy link
Copy Markdown
Collaborator

Description

The bug is a TypeError when SourceCode.requirements is None (its default). In get_code_hash(), source_code.requirements (which is None) is passed as the dependencies parameter to get_training_code_hash(). In SDK v3.3.1, get_training_code_hash() did [source_dir] + dependencies directly, causing TypeError: can only concatenate list (not 'NoneType') to list. The current master code already has a fix: it checks if dependencies: before concatenating. However, there are no unit tests for get_code_hash() specifically with a TrainingStep using SourceCode(requirements=None), which is the exact user scenario. We should add such tests to prevent regression, and also verify the existing fix is correct.

Related Issue

Fixes #5518

Changes Made

  • sagemaker-core/tests/unit/workflow/test_utilities.py

AI-Generated PR

This PR was automatically generated by the PySDK Issue Agent.

  • Confidence score: 85%
  • Classification: bug
  • SDK version target: V3

Merge Checklist

  • Changes are backward compatible
  • Commit message follows prefix: description format
  • Unit tests added/updated
  • Integration tests added (if applicable)
  • Documentation updated (if applicable)

@aviruthen aviruthen closed this Mar 26, 2026
@aviruthen aviruthen deleted the fix/pipeline-typeerror-can-only-concatenate-list-not-5518-3 branch March 26, 2026 16:53
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.

Pipeline TypeError: can only concatenate list (not "NoneType") to list Using SourceCode

1 participant