Skip to content

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

Merged
choonkeat1986 merged 2 commits into
mainfrom
jira#1095
Oct 27, 2026
Merged

choonkeat1986 merged 2 commits 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.32%. Comparing base (25b0f46) to head (03c7fc3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1326      +/-   ##
==========================================
+ Coverage   62.28%   62.32%   +0.04%     
==========================================
  Files         159      159              
  Lines       13420    13435      +15     
==========================================
+ Hits         8358     8373      +15     
  Misses       5062     5062              

☔ 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
@choonkeat1986
choonkeat1986 force-pushed the jira#1095 branch 2 times, most recently from 89f48de to 0219fcd Compare October 26, 2026 02:24
@choonkeat1986
choonkeat1986 merged commit 36ac246 into main Oct 27, 2026
22 checks passed
@choonkeat1986
choonkeat1986 deleted the jira#1095 branch October 27, 2026 02:21
@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 1.47.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants