Skip to content

Comments

feat: add HostName field to WorkloadViews for inventory host filter#604

Merged
kooomix merged 2 commits intomainfrom
feature/SUB-6828-inventory-host-type-filters
Feb 10, 2026
Merged

feat: add HostName field to WorkloadViews for inventory host filter#604
kooomix merged 2 commits intomainfrom
feature/SUB-6828-inventory-host-type-filters

Conversation

@kooomix
Copy link
Contributor

@kooomix kooomix commented Feb 9, 2026

Summary

  • Adds HostName string field to WorkloadViews struct in armotypes/workloadview.go
  • Supports the new Host filter on the inventory page (SUB-6828)
  • Base library change — postgres-connector and cadashboardbe depend on this

Jira

SUB-6828

Multi-Repo Merge Order

  1. This PR (armoapi-go) — merge first
  2. postgres-connector — UNION cloud_hosts_agents into workload_views CTE
  3. cadashboardbe — go.mod bump only

Test plan

  • go build ./... passes
  • Downstream repos (postgres-connector, cadashboardbe) build with this commit

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Workload information now includes additional fields for type and hostname details.
  • Deprecations

    • The Kind field has been marked as deprecated.

SUB-6828: Supports the new Host filter on the inventory page by adding
a HostName field to the API model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 9, 2026 14:24
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

Adds a HostName field to the shared armotypes.WorkloadViews DTO to support inventory host filtering (SUB-6828) across downstream services that consume this module.

Changes:

  • Extend WorkloadViews with HostName string serialized as hostName (omitempty).

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

…deprecation

Add a new Type field to the WorkloadViews struct for enhanced workload classification. The existing Kind field is marked for deprecation in future versions, ensuring a smoother transition for API consumers.
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds two new fields (Type and HostName) to the WorkloadViews struct, with Type mapping to JSON and HostName as an optional field. Includes a deprecation note on the existing Kind field. No logic or control flow modifications.

Changes

Cohort / File(s) Summary
Struct Field Additions
armotypes/workloadview.go
Added Type and HostName fields to WorkloadViews struct with JSON serialization tags; added deprecation comment to Kind field.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Two fields hop into view,
Type and HostName, shiny and new,
Kind takes a bow with grace,
JSON tags mark their place! 🎉

✨ 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 feature/SUB-6828-inventory-host-type-filters

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.

@kooomix kooomix merged commit 52a5255 into main Feb 10, 2026
2 of 3 checks passed
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.

1 participant