Skip to content

fix: Pipeline.upsert() TypeError (real agent 1773873366) (#66666)#6

Closed
aviruthen wants to merge 1 commit intomasterfrom
fix/pipeline-upsert-typeerror-real-agent-1773873366-66666
Closed

fix: Pipeline.upsert() TypeError (real agent 1773873366) (#66666)#6
aviruthen wants to merge 1 commit intomasterfrom
fix/pipeline-upsert-typeerror-real-agent-1773873366-66666

Conversation

@aviruthen
Copy link
Copy Markdown
Owner

Description

The Pipeline.create(), update(), upsert(), and put_triggers() methods accept role_arn typed as str but never validate its type. When a non-string value like a dict is passed, it propagates to the boto3 API call and raises an unhelpful TypeError. The fix is to add a _validate_role_arn() helper that checks isinstance(role_arn, str) after config resolution (but before the None check), and raises a clear ValueError with the parameter name and actual type. This validation should be added in all four methods after resolve_value_from_config() returns but before the existing 'not role_arn' check.

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