Add host name template endpoint#48774
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
WalkthroughChangesThis PR adds a new capability for updating an MDM team-level "host name template" setting. It introduces Sequence Diagram(s)See sequence diagrams embedded in the hidden review stack artifact above, illustrating the endpoint request flow and the enterprise persistence/enforcement flow. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)server/service/integration_core_test.goast-grep timed out on this file 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ee/server/service/teams.go`:
- Around line 2299-2326: The activity in applyHostNameTemplateChange is recorded
before the host name enforcement reconciliation succeeds, so reorder the logic
to perform the datastore change first and only emit the
fleet.ActivityTypeEditedHostNameTemplate after
DeleteHostDeviceNameEnforcementForTeam or BulkUpsertHostDeviceNameEnforcement
completes successfully. Keep the existing ctxerr.Wrap error handling for the
reconciliation step, and mirror the pattern used by updateTeamMDMDiskEncryption
so the audit trail reflects only successfully applied changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a362b839-d13a-4c43-a59a-143842f1b24b
📒 Files selected for processing (8)
ee/server/service/service.goee/server/service/teams.goserver/fleet/service.goserver/mock/service/service_mock.goserver/service/apple_mdm_test.goserver/service/handler.goserver/service/integration_core_test.goserver/service/mdm.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 38806-macos-iosipados-rename-hosts #48774 +/- ##
======================================================================
- Coverage 68.03% 68.03% -0.01%
======================================================================
Files 3683 3683
Lines 234190 234245 +55
Branches 12419 12419
======================================================================
+ Hits 159342 159369 +27
- Misses 60515 60531 +16
- Partials 14333 14345 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2b3c3de to
930a1e5
Compare
930a1e5 to
410ff4e
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
410ff4e to
049d8eb
Compare
Relates to #48623 Adds POST /api/v1/fleet/name_template endpoint.
049d8eb to
119918f
Compare
f5aeda7
into
38806-macos-iosipados-rename-hosts
Relates to #48623
Adds POST /api/v1/fleet/name_template endpoint.
Checklist for submitter
If some of the following don't apply, delete the relevant line.
Testing
Summary by CodeRabbit
New Features
Bug Fixes
Tests