Skip to content

Conversation

@solababs
Copy link
Contributor

@solababs solababs commented Nov 27, 2025

Summary by CodeRabbit

  • Breaking Changes

    • Removed the is_visible property from attributes, simplifying attribute metadata and altering attribute payloads and responses.
  • Schema Updates

    • Payload generation and schema for attribute creation no longer include visibility parameters.
  • Tests

    • Test fixtures and expectations updated to reflect the removed visibility field across node and relation data.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

This pull request removes the is_visible property across the infrahub SDK. The public attribute is removed from the Attribute class, PROPERTIES_FLAG no longer includes is_visible, the Attribute protocol field is deleted, and InfrahubSchemaBase.generate_payload_create no longer injects is_visible. Unit test fixtures and expected payloads were updated to omit is_visible.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.34% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'merge develop to infrahub-develop' is overly vague and generic, describing a branch merge operation rather than the actual substantive changes in the pull request (removal of is_visible property). Revise the title to reflect the main change, such as 'Remove is_visible property from Attribute and related components' for clarity about what was actually changed.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch merge-develop

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 310296b and e14e838.

📒 Files selected for processing (1)
  • infrahub_sdk/node/attribute.py (0 hunks)
💤 Files with no reviewable changes (1)
  • infrahub_sdk/node/attribute.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: documentation
  • GitHub Check: Cloudflare Pages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: e14e838
Status: ✅  Deploy successful!
Preview URL: https://8db74a83.infrahub-sdk-python.pages.dev
Branch Preview URL: https://merge-develop.infrahub-sdk-python.pages.dev

View logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b199ef6 and 310296b.

📒 Files selected for processing (7)
  • changelog/+08aa1a85.removed.md (1 hunks)
  • infrahub_sdk/node/attribute.py (1 hunks)
  • infrahub_sdk/node/constants.py (1 hunks)
  • infrahub_sdk/protocols_base.py (0 hunks)
  • infrahub_sdk/schema/__init__.py (0 hunks)
  • tests/unit/sdk/conftest.py (5 hunks)
  • tests/unit/sdk/test_node.py (3 hunks)
💤 Files with no reviewable changes (2)
  • infrahub_sdk/schema/init.py
  • infrahub_sdk/protocols_base.py
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All async operations must have corresponding sync implementations following the dual implementation pattern
Use mypy with strict configuration for type checking in Python files

Files:

  • infrahub_sdk/node/constants.py
  • tests/unit/sdk/conftest.py
  • tests/unit/sdk/test_node.py
  • infrahub_sdk/node/attribute.py
**/node/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/node/*.py: Implement lazy loading for node attributes and relationships to load on demand
Support batch operations for bulk create/update/delete operations on nodes
Include built-in data validation with GraphQL query generation for nodes

Files:

  • infrahub_sdk/node/constants.py
  • infrahub_sdk/node/attribute.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place unit tests in tests/unit/ directory for testing individual components in isolation

Files:

  • tests/unit/sdk/conftest.py
  • tests/unit/sdk/test_node.py
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.md: Use markdownlint for documentation consistency
Use Vale for documentation style checking
Follow markdown style as defined in .markdownlint.yaml configuration

Files:

  • changelog/+08aa1a85.removed.md
🪛 GitHub Actions: CI
infrahub_sdk/node/attribute.py

[error] 56-56: Ruff: 1 error found. Replace data.get("is_protected", None) with data.get("is_protected").

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
changelog/+08aa1a85.removed.md (1)

1-1: LGTM! Clear changelog entry.

The changelog entry accurately documents the removal of the is_visible property from Infrahub.

infrahub_sdk/node/constants.py (1)

4-4: LGTM! Property flag updated correctly.

The removal of is_visible from PROPERTIES_FLAG is consistent with the PR objective and properly updates the constant used throughout the codebase.

tests/unit/sdk/conftest.py (1)

1238-1238: LGTM! Test fixtures updated consistently.

All test fixtures have been properly updated to remove is_visible from the properties dictionaries, aligning with the removal of this property from the codebase.

Also applies to: 1330-1330, 1338-1338, 1348-1348, 1910-1910, 1918-1918, 1997-1997, 2005-2005

tests/unit/sdk/test_node.py (1)

1673-1673: LGTM! Test expectations updated correctly.

Test expectations have been properly updated to reflect the removal of is_visible from the data structures. The changes are consistent across multiple test scenarios.

Also applies to: 1676-1676, 1827-1827, 1830-1830, 2053-2055

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                 Coverage Diff                  @@
##           infrahub-develop     #662      +/-   ##
====================================================
+ Coverage             75.60%   75.61%   +0.01%     
====================================================
  Files                   113      113              
  Lines                  9522     9518       -4     
  Branches               1452     1451       -1     
====================================================
- Hits                   7199     7197       -2     
+ Misses                 1832     1830       -2     
  Partials                491      491              
Flag Coverage Δ
integration-tests 34.96% <0.00%> (+<0.01%) ⬆️
python-3.10 49.00% <0.00%> (+0.01%) ⬆️
python-3.11 49.00% <0.00%> (+0.01%) ⬆️
python-3.12 49.00% <0.00%> (+0.01%) ⬆️
python-3.13 49.00% <0.00%> (+0.03%) ⬆️
python-filler-3.12 24.26% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/node/attribute.py 95.00% <ø> (-0.07%) ⬇️
infrahub_sdk/node/constants.py 100.00% <100.00%> (ø)
infrahub_sdk/protocols_base.py 74.01% <ø> (-0.21%) ⬇️
infrahub_sdk/schema/__init__.py 67.90% <ø> (+0.38%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@solababs solababs merged commit e39957b into infrahub-develop Nov 27, 2025
19 checks passed
@solababs solababs deleted the merge-develop branch November 27, 2025 10:19
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.

2 participants