Skip to content

fix: deprecate tag logic on Association #2552

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

Merged
merged 2 commits into from
Aug 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/sagemaker/lineage/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@

from typing import Optional, Iterator
from datetime import datetime
import logging

from sagemaker.apiutils import _base_types
from sagemaker.lineage import _api_types
from sagemaker.lineage._api_types import AssociationSummary

logger = logging.getLogger(__name__)


class Association(_base_types.Record):
"""An Amazon SageMaker artifact, which is part of a SageMaker lineage.
Expand Down Expand Up @@ -73,6 +76,10 @@ def set_tag(self, tag=None):
Returns:
list({str:str}): a list of key value pairs
"""
logger.warning(
"set_tag on Association is deprecated. Use set_tag on the source or destination\
entity instead."
)
return self._set_tags(resource_arn=self.source_arn, tags=[tag])

def set_tags(self, tags=None):
Expand All @@ -84,6 +91,10 @@ def set_tags(self, tags=None):
Returns:
list({str:str}): a list of key value pairs
"""
logger.warning(
"set_tags on Association is deprecated. Use set_tags on the source or destination\
entity instead."
)
return self._set_tags(resource_arn=self.source_arn, tags=tags)

@classmethod
Expand Down