Skip to content

fix(Global Tagging): add message field to TagResultsItem#320

Merged
pyrooka merged 4 commits intoIBM:mainfrom
stefano-rm:feat/add-message-field-tagresultsitem
Feb 19, 2026
Merged

fix(Global Tagging): add message field to TagResultsItem#320
pyrooka merged 4 commits intoIBM:mainfrom
stefano-rm:feat/add-message-field-tagresultsitem

Conversation

@stefano-rm
Copy link
Contributor

@stefano-rm stefano-rm commented Feb 12, 2026

PR summary

Add optional message parameter to TagResultsItem class to expose detailed error messages returned by the GhoST Tags API when tagging operations fail.

PR Checklist

  • The commit message follows the Angular Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Current behavior: When a tagging operation fails, the TagResultsItem only contains resource_id and is_error fields. Error details are not exposed to SDK users.

New behavior: The TagResultsItem now includes an optional message parameter that contains the error message returned by the API, providing better error diagnostics.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • Related to (IBM) task #29830
  • Changes are minimal: adds the message parameter to __init__, docstrings, and from_dict method
  • The parameter is optional and backward compatible
  • Swagger definition has been updated and merged in the ghost-for-resources repository

@CLAassistant
Copy link

CLAassistant commented Feb 12, 2026

CLA assistant check
All committers have signed the CLA.

@stefano-rm stefano-rm force-pushed the feat/add-message-field-tagresultsitem branch from 8f85b7b to 0c4e4d8 Compare February 12, 2026 14:11
Copy link

@mkrudele mkrudele left a comment

Choose a reason for hiding this comment

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

There are no unit tests added.

Add optional message field to TagResultsItem class to expose error
messages returned by the GhoST Tags API when tagging operations fail.

Changes:
- Add message parameter to class docstring
- Add message parameter to __init__ method
- Add message field assignment in __init__
- Add message extraction in from_dict method

Related to task #29830

Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
@stefano-rm stefano-rm force-pushed the feat/add-message-field-tagresultsitem branch from 54a1718 to 9ed61e3 Compare February 16, 2026 09:56
Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
@pyrooka pyrooka self-requested a review February 17, 2026 10:43
@pyrooka pyrooka changed the title feat: add message field to TagResultsItem fix(Global Tagging): add message field to TagResultsItem Feb 17, 2026
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

Changes look good, but please provide and evidence of a clean integration and examples test run.

@stefano-rm
Copy link
Contributor Author

Changes look good, but please provide and evidence of a clean integration and examples test run.

Screenshot 2026-02-17 at 13 56 01

@stefano-rm stefano-rm requested a review from pyrooka February 17, 2026 13:39
Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefano-rm
Copy link
Contributor Author

python3 -m pytest test/integration/test_global_tagging_v1.py
============================================== test session starts ==============================================
platform darwin -- Python 3.13.5, pytest-7.4.4, pluggy-1.6.0
rootdir: /Users/stefano/GhoST_repo/platform-services-python-sdk
plugins: mock-3.15.1, anyio-4.9.0, cov-4.1.0, langsmith-0.4.4
collected 11 items                                                                                              

test/integration/test_global_tagging_v1.py ...........                                                    [100%]

============================================== 11 passed in 17.21s ==============================================

@stefano-rm
Copy link
Contributor Author

Examples Test

python3 -m pytest examples/test_global_tagging_v1_examples.py -v

============================= test session starts ==============================
platform darwin -- Python 3.13.5, pytest-7.4.4, pluggy-1.6.0 -- /Library/Frameworks/Python.framework/Versions/3.13/bin/python3
cachedir: .pytest_cache
rootdir: /Users/stefano/GhoST_repo/platform-services-python-sdk
plugins: mock-3.15.1, anyio-4.9.0, cov-4.1.0, langsmith-0.4.4
collecting ... collected 6 items

examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_create_tag_example PASSED [ 16%]
examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_list_tags_example PASSED [ 33%]
examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_attach_tag_example PASSED [ 50%]
examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_detach_tag_example PASSED [ 66%]
examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_delete_tag_example PASSED [ 83%]
examples/test_global_tagging_v1_examples.py::TestGlobalTaggingV1Examples::test_delete_tag_all_example PASSED [100%]

============================== 6 passed in 4.31s ===============================

@pyrooka pyrooka merged commit b7a7a95 into IBM:main Feb 19, 2026
10 checks passed
ibm-devx-sdk pushed a commit that referenced this pull request Feb 19, 2026
## [0.73.3](v0.73.2...v0.73.3) (2026-02-19)

### Bug Fixes

* **Global Tagging:** add `message` field to `TagResultsItem` ([#320](#320)) ([b7a7a95](b7a7a95))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.73.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants