Skip to content

fix: Pipeline.upsert() TypeError (real agent 1773874470) (#66666)#7

Closed
aviruthen wants to merge 1 commit intomaster-v2from
fix/pipeline-upsert-typeerror-real-agent-1773874470-66666
Closed

fix: Pipeline.upsert() TypeError (real agent 1773874470) (#66666)#7
aviruthen wants to merge 1 commit intomaster-v2from
fix/pipeline-upsert-typeerror-real-agent-1773874470-66666

Conversation

@aviruthen
Copy link
Copy Markdown
Owner

Description

The Pipeline methods create(), update(), and upsert() accept role_arn typed as str but perform no type validation. When a non-string value like a dict is passed, it flows through resolve_value_from_config() unchanged and eventually causes an unhelpful TypeError deep in the API call. The fix is to add a _validate_role_arn() helper that raises a clear ValueError if role_arn is not a string or None, and call it at the top of create(), update(), and upsert() before any other processing.

Related Issue

Fixes #66666

Changes Made

  • src/sagemaker/workflow/pipeline.py
  • tests/unit/sagemaker/workflow/test_pipeline.py

AI-Generated PR

This PR was automatically generated by the PySDK Issue Agent.

  • Confidence score: 80%
  • Classification: bug
  • SDK version target: V2

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 18, 2026
@aviruthen aviruthen deleted the fix/pipeline-upsert-typeerror-real-agent-1773874470-66666 branch March 18, 2026 22:56
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.

1 participant