Skip to content

feat: return a 409 error when a device reaches max 8 wireless profiles - #1326

Open
choonkeat1986 wants to merge 1 commit into
mainfrom
jira#1095
Open

choonkeat1986 wants to merge 1 commit into
mainfrom
jira#1095

Conversation

@choonkeat1986

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.21%. Comparing base (59c10e0) to head (3f21d32).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1326      +/-   ##
==========================================
+ Coverage   62.17%   62.21%   +0.04%     
==========================================
  Files         159      159              
  Lines       13414    13429      +15     
==========================================
+ Hits         8340     8355      +15     
  Misses       5074     5074              

☔ 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The mandatory Postman contract update for the new capacity-limit response is missing.

1 open finding
What changed in this PR

Adds an eight-profile capacity check to Console’s device wireless-profile creation flow, returning HTTP 409 when full.

Changes:

  • Rejects additions before certificate installation, excluding AMT “User Settings” entries from the count.
  • Maps the capacity error to HTTP 409 and documents the limit.
  • Adds use-case and HTTP-handler tests.
File Description
internal/​usecase/​devices/​wifiprofile.go Adds profile counting and capacity rejection.
internal/​usecase/​devices/​wifiprofile_test.go Tests capacity boundaries and certificate-side-effect prevention.
internal/​controller/​openapi/​devicemanagement.go Documents capacity and duplicate conflicts.
internal/​controller/​httpapi/​v1/​wifiprofile.go Returns HTTP 409 for capacity errors.
internal/​controller/​httpapi/​v1/​wifiprofile_test.go Tests the capacity-conflict status.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/controller/httpapi/v1/wifiprofile.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review identified no blocking issues in this focused change; tests were inspected but not executed.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@rsdmike rsdmike left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

moving my comment to correct PR :)

@rsdmike
rsdmike self-requested a review October 16, 2026 22:18
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.

3 participants