Skip to content

APP-7889: Fixed handling of source_tag when no attributes present#688

Merged
Aryamanz29 merged 1 commit into
mainfrom
APP-7889
Jul 29, 2025
Merged

APP-7889: Fixed handling of source_tag when no attributes present#688
Aryamanz29 merged 1 commit into
mainfrom
APP-7889

Conversation

@Aryamanz29
Copy link
Copy Markdown
Member

✨ Description

https://atlanhq.atlassian.net/browse/APP-7889

🧩 Type of change

Select all that apply:

  • 🚀 New feature (non-breaking change that adds functionality)
  • 🐛 Bug fix (non-breaking change that fixes an issue) — please include tests! Refer testing-toolkit 🧪
  • 🔄 Refactor (code change that neither fixes a bug nor adds a feature)
  • 🧹 Maintenance (chores, cleanup, minor improvements)
  • 💥 Breaking change (fix or feature that may break existing functionality)
  • 📦 Dependency upgrade/downgrade
  • 📚 Documentation updates

✅ How has this been tested? (e.g. screenshots, logs, workflow links)

Describe how the change was tested. Include:

  • Steps to reproduce
  • Any relevant screenshots, logs, or links to successful workflow runs
  • Details on environment/setup if applicable

📋 Checklist

  • My code follows the project’s style guidelines
  • I’ve performed a self-review of my code
  • I’ve added comments in tricky or complex areas
  • I’ve updated the documentation as needed
  • There are no new warnings from my changes
  • I’ve added tests to cover my changes
  • All new and existing tests pass locally

@Aryamanz29 Aryamanz29 self-assigned this Jul 29, 2025
@Aryamanz29 Aryamanz29 added the bugfix Bug fix pull request label Jul 29, 2025
@Aryamanz29 Aryamanz29 requested a review from Copilot July 29, 2025 09:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the source_tag handling where the code would fail when a tag had no attributes present. The fix adds proper null/existence checks before accessing nested attribute dictionaries.

  • Updated the translator to safely check for attributes existence before accessing nested keys
  • Enhanced test coverage to include scenarios for source tags with attributes, without attributes, and deleted source tags
  • Modified test assertions to account for the additional test cases and different behavior patterns

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyatlan/model/translators.py Added null safety checks when accessing tag attributes to prevent crashes
tests/unit/test_atlan_tag_name.py Enhanced test coverage with multiple source tag scenarios and updated assertions

Comment thread pyatlan/model/translators.py
Comment thread pyatlan/model/translators.py
@Aryamanz29 Aryamanz29 merged commit 7af2190 into main Jul 29, 2025
58 checks passed
@Aryamanz29 Aryamanz29 deleted the APP-7889 branch July 29, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants