Skip to content

Fix org flag matching: resolve org name via accounts mgmt API#348

Open
clcollins wants to merge 2 commits into
mainfrom
srepd/fix-org-flag-matching
Open

Fix org flag matching: resolve org name via accounts mgmt API#348
clcollins wants to merge 2 commits into
mainfrom
srepd/fix-org-flag-matching

Conversation

@clcollins

Copy link
Copy Markdown
Owner

Summary

  • Fixed :flag org never matching — info.Organization was storing the subscription UUID instead of the customer name
  • Added OrganizationID field to ClusterInfo and enrichOrganization helper that resolves the org name via the accounts management organizations API
  • :flag org now matches against both Organization (name) and OrganizationID transparently
  • Cluster tab now displays both Organization and Organization ID

Test plan

  • All existing tests pass (make test-all)
  • Three new flag test cases: org ID match, org ID exact match, org name match when ID differs
  • Race detection clean
  • Lint clean
  • Manual: run srepd, set :flag org <customer-name>, verify incidents are flagged
  • Manual: verify Cluster tab shows both Organization and Organization ID

🤖 Generated with Claude Code

The :flag org command never matched because info.Organization was set
to the subscription UUID instead of the customer name. Now GetCluster
resolves the actual org name via the accounts management organizations
API and stores both Organization (name) and OrganizationID (ID).

The flag system matches against both fields transparently, and the
Cluster tab displays both values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 51.16279% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.14%. Comparing base (1a9e1de) to head (45a7725).

Files with missing lines Patch % Lines
pkg/ocm/client.go 0.00% 21 Missing ⚠️

❌ Your patch status has failed because the patch coverage (51.16%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #348      +/-   ##
==========================================
- Coverage   66.23%   66.14%   -0.09%     
==========================================
  Files          50       50              
  Lines        8126     8149      +23     
==========================================
+ Hits         5382     5390       +8     
- Misses       2367     2383      +16     
+ Partials      377      376       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

The incident viewer height was not reduced when help expanded because
helpLines was not subtracted from the calculation. Additionally,
recomputeLayout (called by toggleHelp) never applied the updated
height to the incident/log viewer viewports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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