Skip to content

Query validator: Allow saving invalid SQL #35058

@noahtalerman

Description

@noahtalerman

Goal

User story
As an IT admin,
I want to be able to save any query, even though it may get flagged as 'invalid' by Fleet,
so that I can create custom queries.

Roadmap item

None

Original requests

None. Transformed into user story after initial bug was submitted (#34628). Original comment here.

Resources

None

Changes

Product

  • UI changes:
    • Change copy for error message on "New Query" page: Queries > "Add Query". New error message: "Syntax error. Please review before saving."
    • Do not disable the "Save" button, even if there is an error. The error font color and border should remain the same.
    • Do not change the behavior for if query is empty (keep error message and disabled button).
Image
  • CLI (fleetctl) usage changes: No changes
  • YAML changes: No changes
  • REST API changes: No changes
  • Fleet's agent (fleetd) changes: No changes
  • GitOps mode UI changes: No changes
  • GitOps generation changes: No changes
  • Activity changes: No changes
  • Permissions changes: No changes
  • Changes to paid features or tiers: No changes
  • My device and fleetdm.com/better changes: No changes
  • Usage statistics: No changes
  • Other reference documentation changes: No changes
  • First draft of test plan added
  • Once shipped, requester has been notified
  • Once shipped, dogfooding issue has been filed

Engineering

  • Test plan is finalized
  • Contributor API changes: TODO
  • Feature guide changes: TODO
  • Database schema migrations: TODO
  • Load testing: TODO
  • Load testing/osquery-perf improvements: TODO
  • This is a premium only feature: Yes / No

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires testing in a hosted environment: TODO
  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Test plan

Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.

  1. On Queries page, add a new query with an intentional error Example query
  2. Ensure the new messaging is "Syntax error. Please review before saving." and that the "Save" button is not disabled. When you save the invalid query, confirm it has been added to the list of queries.
  3. Ensure if query is empty, error message and button is disabled.

Testing notes

Confirmation

  1. Engineer: Added comment to user story confirming successful completion of test plan.
  2. QA: Added comment to user story confirming successful completion of test plan.

Metadata

Metadata

Labels

#g-security-complianceSecurity & Compliance product group:productProduct Design department (shows up on 🦢 Drafting board)customer-numastoryA user story defining an entire feature~assisting g-orchestrationThis is a #g-orchestration issue that another product group is assisting~assisting qaThis issue can be QA'd by anyone outside the QA team when capacity allows~spiffierImprovements to the Fleet product's UX or look and feel

Type

No type

Projects

Status

📨 New requests

Status

✔️Awaiting QA

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions