Skip to content
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

Calendar events created for policies with invalid SQL #18350

Closed
getvictor opened this issue Apr 16, 2024 · 1 comment
Closed

Calendar events created for policies with invalid SQL #18350

getvictor opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Milestone

Comments

@getvictor
Copy link
Member

Fleet version:
4.48.0
Web browser and operating system:


💥  Actual behavior

With calendar events enabled on a policy with invalid SQL, calendar event is created, and end user has no idea why.

🧑‍💻  Steps to reproduce

  1. Using gitops (or fleetctl apply), create an invalid policy with calendar enabled for this policy only:
- name: macOS - Check if latest version
  query: SELECT 1 WHERE 
    EXISTS ( 
      SELECT major, concat_ws(".", major, minor, patch) AS "macOS Version" FROM os_version --Sonoma WHERE 
        (major = "14" AND "macOS Version" < "14.4.1")
    );
  critical: false
  description: This policy check if macOS version is most recent version available.
  resolution: From the Apple menu, select System Settings. Navigate to General > Software Update.
  platform: darwin
  calendar_events_enabled: true
  1. Calendar event gets created, even though this policy has no results.

🕯️ More info (optional)

N/A

@getvictor getvictor added #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. bug Something isn't working as documented ~backend Backend-related issue. ~released bug This bug was found in a stable release. labels Apr 16, 2024
@getvictor getvictor self-assigned this Apr 16, 2024
getvictor added a commit that referenced this issue Apr 16, 2024
…y has an invalid SQL query. (#18352)

For calendar integration, calendar event no longer created when policy
has an invalid SQL query.
#18350 

# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
@sharon-fdm sharon-fdm added this to the 4.49.0-tentative milestone Apr 18, 2024
@fleet-release
Copy link
Contributor

SQL error in event,
Fleet's fix brings clarity,
Users breathe easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

4 participants