-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore comments at the top of XML files #27176
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #27176 +/- ##
==========================================
- Coverage 63.80% 63.79% -0.02%
==========================================
Files 1729 1729
Lines 164109 164111 +2
Branches 4481 4481
==========================================
- Hits 104707 104690 -17
- Misses 51254 51269 +15
- Partials 8148 8152 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this submission!
Addresses #26443 (comment) after #27176 was merged. # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - I did this in #27176, same change message. - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality
Addresses #26443 (comment) after #27176 was merged. Reading XML as a string in this way feels wrong, but I don't want to avoid a refactor, so I'm checking for a "comment" string in this PR. I tested by building fleetctl locally and running: ```sh $ make fleetctl; ./build/fleetctl gitops -f it-and-security/teams/test.yml --dry-run ... Client Version: tf-mod-addon-monitoring-v1.5.1-1091-g8eb9111c6-dirty Server Version: 0.0.0-SNAPSHOT-85f4f65 [+] applying MDM profiles for team TEST Error: applying custom settings for team "TEST": POST /api/latest/fleet/mdm/profiles/batch received status 422 Validation Failed: disable-onedrive is not a valid macOS or Windows configuration profile. macOS profiles must be valid .mobileconfig or .json files. Windows configuration profiles can only have <Replace> or <Add> top level elements. ``` I'm not sure if the error above ([code](https://github.com/fleetdm/fleet/blob/8eb9111c67c017d3a7b6e448b7e333c8e43f2f6a/server/service/mdm.go#L2160)) is caused by my test environment not yet having the updated server code. The `--dry-run` passed in my test, as seen by the `[+] applying MDM profiles for team TEST` line. I can't get any test code to be reflected in the server response, so my hunch is that the issue should be fixed after this PR. # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - I did this in #27176, same change message. - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality
Allows comments to be at the top of Fleet XML CSP files (addresses #26443)
We should validate that this fixes the errors with GitOps pushes, but I don't know how to do that without pushing this change through to QA.
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.