Skip to content

Conversation

@refeed
Copy link
Member

@refeed refeed commented Nov 19, 2025

This is to fix get_value not being able to do
*.somevalue and some other cases.

…upport

This is to fix get_value not being able to do
`*.somevalue` and some other cases.
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tirith/providers/common.py 97.95% 0 Missing and 1 partial ⚠️
src/tirith/providers/kubernetes/handler.py 83.33% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/tirith/core/core.py 82.22% <100.00%> (+5.81%) ⬆️
src/tirith/providers/json/handler.py 88.88% <100.00%> (+9.40%) ⬆️
src/tirith/providers/common.py 98.14% <97.95%> (-1.86%) ⬇️
src/tirith/providers/kubernetes/handler.py 65.62% <83.33%> (+49.55%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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 enhances the get_path_value_from_dict function to properly support wildcard patterns (e.g., *.somevalue, items.*.name) by consolidating duplicate implementations from the JSON and Kubernetes providers into a unified implementation in the common module.

Key Changes:

  • Implemented a new recursive wildcard-aware path traversal algorithm that handles * at any position in the path
  • Consolidated duplicate path traversal logic from JSON and Kubernetes handlers into providers/common.py
  • Modified YAML input loading to return lists directly instead of wrapping them in a {"yamls": [...]} structure

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/tirith/providers/common.py Added comprehensive wildcard-aware path traversal implementation with documentation
src/tirith/providers/json/handler.py Removed local implementation in favor of common implementation
src/tirith/providers/kubernetes/handler.py Removed local implementation and updated to use direct list input structure
src/tirith/core/core.py Changed YAML loading to return raw list/dict instead of wrapped structure
tests/providers/test_common.py Added comprehensive test suite covering wildcard patterns, nested structures, and edge cases
tests/providers/kubernetes/test_attribute.py Added integration test for Kubernetes wildcard attribute path support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Copy link

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@refeed refeed merged commit 900c64d into main Nov 19, 2025
27 checks passed
@refeed refeed deleted the fix-json-get-value branch November 19, 2025 12:54
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.

4 participants